cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A268630 a(n)^2 + a(n+1) is prime; lexicographically earliest sequence of nonnegative integers with this property and containing no duplicates.

Original entry on oeis.org

0, 2, 1, 4, 3, 8, 7, 10, 9, 16, 13, 12, 5, 6, 11, 18, 23, 28, 25, 22, 15, 14, 27, 32, 37, 30, 19, 36, 31, 48, 29, 40, 21, 20, 33, 34, 45, 38, 39, 46, 63, 44, 43, 24, 17, 42, 47, 58, 49, 66, 35, 52, 73, 64, 57, 50, 51, 56, 55, 54, 41, 60, 59, 76, 67, 72, 53, 70, 69, 26, 75, 68, 79, 82, 99, 86, 61, 100, 91, 88, 85, 84, 65, 102, 83, 78, 89, 90, 71, 106, 81
Offset: 0

Views

Author

Eric Angelini and M. F. Hasler, Feb 09 2016

Keywords

Comments

Conjectured to be a permutation of the nonnegative integers.
Terms are of alternating parity.
The sequence cannot have a fixed point other than a(0)=0 because for n>0, the terms are of parity opposite to that of their indices.
The number of distinct m-digit primes arising from the sequence appears to be bounded by the entries of A030186. The counts here for m=1 to 9 are 2,7,21,69,216,684,2162,6801,21623 compared to A030186's 2,7,22,71,228,733,2356,7573,24342. - Bill McEachen, Feb 15 2016

Crossrefs

Cf. A268494, A268495, A268496, A268497 for records and late birds.

Programs

  • Mathematica
    s = {0, 2, 1, 4}; a = 4; Do[b = Mod[a, 2] + 3; While[MemberQ[s, b] || ! PrimeQ[a^2 + b], b = b + 2]; AppendTo[s, b]; a = b, {1000}]; s (* Zak Seidov, Feb 09 2016 *)
  • PARI
    {u=[a=0]; for(n=1, 99, for(k=1, 9e9, setsearch(u,k)&&next; isprime(a*a+k)||next; print1(k","); u=setunion(u,[a=k]); break))}