OFFSET
0,1
COMMENTS
The absolute values of the successive difference are 2, 3, 5, 7, 13, 17, 11, 19, 43, 23, 29, 37, 31, ...
Does every composite number occur in the sequence? Does every prime occur as a difference?
MATHEMATICA
a[0]=4; a[n_] := a[n]=Module[{x, d}, For[x=6, True, x++, If[ !PrimeQ[x]&&PrimeQ[d=Abs[x-a[n-1]]]&&!MemberQ[a/@Range[n-1], x]&&!MemberQ[Table[Abs[a[i+1]-a[i]], {i, 0, n-2}], d], Return[x]]]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 18 2003
EXTENSIONS
Edited by Dean Hickerson, Jun 30 2003
STATUS
approved