login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A260966
a(0)=1, then a(n) is the least sum of two successive primes that is a multiple of n and > a(n-1).
1
1, 5, 8, 12, 24, 30, 36, 42, 112, 144, 210, 308, 360, 390, 434, 450, 480, 918, 990, 1064, 1120, 1428, 1518, 1656, 1848, 1900, 2132, 2430, 2604, 2610, 2640, 2728, 2912, 2970, 2992, 3010, 3240, 3330, 3952, 4056, 4680, 5740, 6090, 6450, 6600, 6660, 6762, 7990, 8256, 8428, 9000, 9282, 9308
OFFSET
0,2
LINKS
EXAMPLE
a(1)=5=2+3, a(2)=8=3+5, a(3)=12=5+7, a(4)=24=11+13, a(5)=30=13+17.
MAPLE
N:= 10^5: # get all terms using primes <= N
Primes:= select(isprime, [2, (2*i+1 $ i=1..floor((N-1)/2))]):
Sprimes:= Primes[1..-2] + Primes[2..-1]:
A[0]:= 1: x[0]:= 0: ok:= true:
for n from 1 while ok do
ok:= false;
for t from x[n-1]+1 to nops(Sprimes) do
if Sprimes[t] mod n = 0 then
A[n]:= Sprimes[t]; x[n]:= t; ok:= true; break
fi
od
od:
seq(A[i], i=0..n-2); # Robert Israel, Aug 06 2015
MATHEMATICA
Prepend[Reap[n=1; Do[If[Mod[(a=Prime[k]+Prime[k+1]), n]<1, Sow[a]; i++], {k, 1000}]][[2, 1]], 1]
nxt[{n_, a_}]:=Module[{sprs=Total/@Partition[Prime[Range[1000]], 2, 1]}, {n+1, SelectFirst[sprs, Divisible[#, n+1]&&#>a&]}]; Transpose[ NestList[ nxt, {0, 1}, 60]][[2]] (* Harvey P. Dale, Jun 02 2016 *)
CROSSREFS
Sequence in context: A314419 A138051 A026279 * A338547 A124434 A180930
KEYWORD
nonn
AUTHOR
Zak Seidov, Aug 06 2015
STATUS
approved