OFFSET
1,1
COMMENTS
For n > 1, a(2n + 1) = a(2n) because after the primes (2,3,5), all second differences are even numbers. It is not known if the sequence remains finite for all n.
To give an idea of the size of the sequences, the largest prime in the sequence corresponding to a(12) is 1280522207.
For a given n, the Mathematica program uses recursion to find the longest list of primes with second differences bounded by n. This is not the best language to use for this problem. Even n=4 takes quite a while. The program prints longer lists as they are found. - T. D. Noe, Feb 03 2011
LINKS
MathOverflow, Is there an infinite increasing sequence of primes with bounded second or larger differences
Esteban Crespi de Valldaura, C++ program used in computations.
EXAMPLE
For n = 1, the sequence is (2, 3, 5, 7) which has 4 members, so a(1) = 4.
For n = 2, a sequence is (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033, 1097, 1163, 1231, 1301, 1373, 1447, 1523, 1597, 1669, 1741, 1811, 1879, 1949, 2017, 2083) which has 57 members, so a(2) = 57.
MATHEMATICA
Valid[lst_List]:=Module[{r1, r2}, r1=-n+2*lst[[-1]]-lst[[-2]]; r2=r1+2*n; r1=Max[lst[[-1]]+1, r1]; Select[Range[r1, r2], PrimeQ]]; FindPath[lst_List]:=Module[{p, ln}, p=Valid[lst]; If[p=={}, ln=Length[lst]; If[ln>len, len=ln; Print[{len, lst}]], Do[FindPath[Append[lst, i]], {i, p}]]]; n=2; len=0; t={2, 3}; FindPath[t]; len (* T. D. Noe, Feb 03 2011 *)
CROSSREFS
KEYWORD
nonn,nice,more
AUTHOR
Esteban Crespi de Valldaura, Jan 31 2011, Feb 03 2011
STATUS
approved