OFFSET
1,2
COMMENTS
For a(n) > 4, a(n) is divisible by 6.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
MAPLE
A181103 := proc(n) option remember: local p: if(n<=2)then return n+1: fi: p:=procname(n-1): do p:=nextprime(p): if(isprime(abs(p-procname(n-2)-procname(n-1))))then return p: fi: od: end: seq(A181103(n+1)-A181103(n), n=1..69); # Nathaniel Johnston, May 27 2011
MATHEMATICA
nxt[{a_, b_}]:=Module[{lp=NextPrime[b]}, While[!PrimeQ[Abs[a+b-lp]], lp = NextPrime[lp]]; {b, lp}]; Differences[NestList[nxt, {2, 3}, 70][[All, 1]]] (* Harvey P. Dale, Jul 26 2018 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Giovanni Teofilatto
STATUS
approved