cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, May 24 2004

Keywords

Comments

2 along with the larger member of twin primes.

Crossrefs

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