login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A203836 Smallest sum s of two consecutive primes such that s = 0 mod prime(n). 2
8, 12, 5, 42, 198, 52, 68, 152, 138, 696, 186, 222, 410, 172, 564, 1272, 472, 1220, 268, 852, 1460, 2212, 1494, 712, 1164, 1818, 618, 1284, 872, 2486, 508, 786, 548, 1668, 1192, 906, 3768, 978, 668, 6228, 3222, 6516, 3820, 772, 4728, 3980, 6330, 892, 5448, 1374 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Besides a(3)=5, all terms are even and >=4. - Zak Seidov, Nov 29 2014

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = 4*prime(n) if prime(n) is in A118134. - Robert Israel, May 25 2020

EXAMPLE

a(1) = 8 = 3 + 5 is the least sum of two consecutive primes that is a multiple of prime(1) = 2.

a(3) = 5 = 2 + 3 is the least sum of two consecutive primes that is a multiple of prime(3) = 5.

MAPLE

N := 100: # for a(1)..a(N)

M := ithprime(N):

V := Vector(M):

count:= 0:

for i from 1 while count < N do

  x:= ithprime(i)+ithprime(i+1);

  Q:= convert(select(t -> t <= M and V[t]=0, numtheory:-factorset(x)), list);

  V[Q]:= x;

  count:= count + nops(Q);

od:

seq(V[ithprime(i)], i=1..N); # Robert Israel, May 25 2020

MATHEMATICA

pr=Prime[Range[1000]]; rm=Rest[pr]+Most[pr]; Table[Select[rm, Mod[#, pr[[n]]]==0&][[1]], {n, 50}]

s = Total /@ Partition[Prime@ Range[10^4], 2, 1]; Table[SelectFirst[s, Divisible[#, Prime@ n] &], {n, 52}] (* Michael De Vlieger, Jul 04 2017 *)

PROG

(PARI) a(n)=p = 2; pn = prime(n); forprime(q=3, , if (((s=p+q) % pn) == 0, return (s)); p = q; ); \\ Michel Marcus, Jul 04 2017

(PARI) isA001043(n)=precprime((n-1)/2)+nextprime(n/2)==n&&n>2

a(n, p=prime(n))=if(p==5, return(5)); my(k=2); while(!isA001043(k*p), k+=2); k*p \\ Charles R Greathouse IV, Jul 05 2017

CROSSREFS

Cf. A001043, A062703, A111163, A247245, A247252, A188815 (the smaller prime), A118134.

Sequence in context: A173457 A033198 A072900 * A220665 A166173 A014453

Adjacent sequences:  A203833 A203834 A203835 * A203837 A203838 A203839

KEYWORD

nonn

AUTHOR

Zak Seidov, Jan 06 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 12 16:40 EDT 2020. Contains 336439 sequences. (Running on oeis4.)