OFFSET
1,1
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
FORMULA
a(1)=2, a(2)=3, a(n) = A007918(2*a(n-1) - a(n-2)). - Reinhard Zumkeller, Jul 08 2004
MATHEMATICA
d = 2; p = 2; t = {2, 3}; Do[p = NextPrime[p + d - 1]; d = p - t[[-1]]; AppendTo[t, p], {98}]; t (* T. D. Noe, Nov 21 2011 *)
PROG
(PARI) s=1; t=1; for(n=1, 100, s=s+t; while(isprime(s+t)==0, t++); print1(s+t, ", "))
(Julia)
using Primes
function A070866(bound)
a, b = 2, 3
P = [a, b]
while true
p = nextprime(b + (b - a))
p > bound && break
push!(P, p)
a, b = b, p
end
P end
A070866(100000) |> println # Peter Luschny, Dec 23 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, May 16 2002
EXTENSIONS
More terms from Benoit Cloitre, May 20 2002
STATUS
approved