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.

This page as a plain text file.
%I A094743 #15 Jan 12 2022 11:35:28
%S A094743 2,5,7,13,19,31,43,61,73,103,109,139,151,181,193,199,229,241,271,283,
%T A094743 313,349,421,433,463,523,571,601,619,643,661,811,823,829,859,883,1021,
%U A094743 1033,1051,1063,1093,1153,1231,1279,1291,1303,1321,1429,1453,1483,1489
%N A094743 Beginning with 2, increasing primes such that the sum of successive differences is also prime.
%C A094743 2 along with the larger member of twin primes.
%H A094743 Vincenzo Librandi, <a href="/A094743/b094743.txt">Table of n, a(n) for n = 1..1000</a>
%t A094743 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 A094743 (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 A094743 Cf. A006512, A094744.
%K A094743 nonn
%O A094743 1,1
%A A094743 _Amarnath Murthy_, May 24 2004
%E A094743 Changed offset from 0 to 1 by _Vincenzo Librandi_, Apr 14 2013