A094743 Beginning with 2, increasing primes such that the sum of successive differences is also prime.
2, 5, 7, 13, 19, 31, 43, 61, 73, 103, 109, 139, 151, 181, 193, 199, 229, 241, 271, 283, 313, 349, 421, 433, 463, 523, 571, 601, 619, 643, 661, 811, 823, 829, 859, 883, 1021, 1033, 1051, 1063, 1093, 1153, 1231, 1279, 1291, 1303, 1321, 1429, 1453, 1483, 1489
Offset: 1
Keywords
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
f[s_List] := Block[{p = NextPrime@ s[[ -1]]}, While[ !PrimeQ[p - 2], p = NextPrime@p]; Append[s, p]]; Nest[f, {2}, 50] (* Robert G. Wilson v, Aug 09 2010 *)
-
PARI
list(lim)=my(v=List([2]),s,p=2); forprime(q=5,lim, if(isprime(s+q-p), listput(v,q); s+=q-p; p=q)); Vec(v) \\ Charles R Greathouse IV, Jan 12 2022
Extensions
Changed offset from 0 to 1 by Vincenzo Librandi, Apr 14 2013
Comments