login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181437 Size of the longest increasing sequence of primes starting with 2, 3 and with second-order differences bounded by n. 1
4, 57, 57, 421, 421, 1860, 1860, 24661, 24661, 380028, 380028, 2964603, 2964603 (list; graph; refs; listen; history; text; internal format)
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
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
Sequence in context: A060497 A092273 A193745 * A353001 A156873 A320977
KEYWORD
nonn,nice,more
AUTHOR
Esteban Crespi de Valldaura, Jan 31 2011, Feb 03 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)