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!)
A094743 Beginning with 2, increasing primes such that the sum of successive differences is also prime. 5

%I #15 Jan 12 2022 11:35:28

%S 2,5,7,13,19,31,43,61,73,103,109,139,151,181,193,199,229,241,271,283,

%T 313,349,421,433,463,523,571,601,619,643,661,811,823,829,859,883,1021,

%U 1033,1051,1063,1093,1153,1231,1279,1291,1303,1321,1429,1453,1483,1489

%N Beginning with 2, increasing primes such that the sum of successive differences is also prime.

%C 2 along with the larger member of twin primes.

%H Vincenzo Librandi, <a href="/A094743/b094743.txt">Table of n, a(n) for n = 1..1000</a>

%t 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 *)

%o (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

%Y Cf. A006512, A094744.

%K nonn

%O 1,1

%A _Amarnath Murthy_, May 24 2004

%E Changed offset from 0 to 1 by _Vincenzo Librandi_, Apr 14 2013

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 April 19 06:16 EDT 2024. Contains 371782 sequences. (Running on oeis4.)