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.

A284047 a(n) is the smallest positive integer not already in the sequence such that a(n) + a(n-1) and a(n)^2 + a(n-1)^2 are primes, with a(1) = 1.

Original entry on oeis.org

1, 2, 3, 8, 5, 6, 11, 20, 23, 18, 35, 24, 19, 10, 7, 12, 17, 42, 25, 4, 9, 14, 15, 22, 57, 32, 27, 52, 37, 30, 13, 28, 33, 40, 39, 34, 45, 16, 31, 70, 69, 80, 21, 26, 41, 56, 51, 50, 53, 48, 65, 36, 71, 60, 29, 44, 59, 54, 85, 46, 81, 100, 49, 90, 61, 76, 91, 66, 101, 96, 55, 58, 73, 108, 43, 120, 79, 84, 145, 78, 103
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 19 2017

Keywords

Comments

Conjectured to be a permutation of the natural numbers.

Examples

			a(4) = 8 because 1, 2 and 3 have already been used in the sequence, 3 + 4 = 7 is a prime but 3^2 + 4^2 = 25 is not prime, 3 + 5 = 8, 3 + 6 = 9, 3 + 7 = 10 are not primes while 3 + 8 = 11 is a prime and 3^2 + 8^2 = 73 is a prime also.
		

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{k = 1, a = s[[-1]]}, While[MemberQ[s, k] || ! (PrimeQ[a + k] && PrimeQ[a^2 + k^2]), k++]; Append[s, k]]; Nest[f, {1}, 80]