The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A343564 a(n) is the sum of 2*n mod p for primes p such that 2*n-p is prime. 2
0, 0, 0, 5, 4, 7, 5, 10, 19, 18, 11, 32, 17, 25, 45, 24, 25, 56, 10, 45, 66, 32, 39, 96, 68, 55, 99, 59, 46, 148, 29, 104, 138, 49, 103, 162, 81, 112, 164, 91, 109, 260, 64, 105, 316, 115, 104, 235, 119, 202, 294, 188, 127, 319, 224, 251, 409, 177, 162, 500, 124, 181, 504, 135, 315, 437, 187, 271 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Conjecture: the only n for which a(n) <= n are 1, 2, 3, 5, 7, 11, 19, and 31.
LINKS
EXAMPLE
For n=5, we have 2*n = 3+7 = 5+5, and a(5) = (10 mod 3)+(10 mod 5)+(10 mod 7) = 1+0+3 = 4.
MAPLE
N:= 1000: # for a(1)..a(N)
P:= select(isprime, [seq(i, i=3..2*N)]):
f:= proc(n) local m, Q, q;
m:= ListTools:-BinaryPlace(P, 2*n);
Q:= convert(P[1..m], set);
Q:= Q intersect map(t -> 2*n-t, Q);
add(2*n mod q, q = Q);
end proc:
map(f, [$1..N]);
PROG
(PARI) a(n) = my(p=2, s=0); forprime(p=2, 2*n, if (isprime(2*n-p), s += (2*n % p))); s; \\ Michel Marcus, Apr 20 2021
CROSSREFS
Sequence in context: A366162 A195428 A254373 * A004446 A115409 A010775
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Apr 20 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 04:08 EDT 2024. Contains 372536 sequences. (Running on oeis4.)