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.

This page as a plain text file.
%I A268630 #32 Dec 23 2024 14:53:44
%S A268630 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,
%T A268630 19,36,31,48,29,40,21,20,33,34,45,38,39,46,63,44,43,24,17,42,47,58,49,
%U A268630 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
%N A268630 a(n)^2 + a(n+1) is prime; lexicographically earliest sequence of nonnegative integers with this property and containing no duplicates.
%C A268630 Conjectured to be a permutation of the nonnegative integers.
%C A268630 Terms are of alternating parity.
%C A268630 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.
%C A268630 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
%H A268630 Zak Seidov, <a href="/A268630/b268630.txt">Table of n, a(n) for n = 0..50000</a>
%H A268630 E. Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2016-February/016094.html">A formula for a permutation</a>, SeqFan list, Feb. 9, 2016.
%t A268630 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 *)
%o A268630 (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))}
%Y A268630 Cf. A268494, A268495, A268496, A268497 for records and late birds.
%K A268630 nonn
%O A268630 0,2
%A A268630 _Eric Angelini_ and _M. F. Hasler_, Feb 09 2016