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.

Showing 1-1 of 1 results.

A284346 a(n) is the least positive integer such that n^2 + a(n)^2 and (n + 1)^2 + (a(n) + 1)^2 are primes.

Original entry on oeis.org

2, 1, 8, 1, 4, 1, 2, 3, 16, 3, 6, 7, 8, 1, 4, 1, 22, 5, 6, 3, 4, 17, 18, 5, 4, 1, 32, 5, 10, 29, 4, 27, 8, 15, 18, 1, 2, 15, 10, 3, 4, 247, 8, 15, 14, 19, 22, 35, 6, 19, 4, 27, 10, 11, 8, 1, 2, 5, 40, 13, 44, 127, 58, 61, 28, 1, 22, 13, 10, 19, 6, 7, 8, 15, 4, 9
Offset: 1

Views

Author

Lars-Erik Svahn, Mar 25 2017

Keywords

Comments

n is odd iff a(n) is even.

Examples

			a(1)=2 since (1 + 1)^2 + (1 + 1)^2 is not prime, but 1^2 + 2^2 = 5 and (1 + 1)^2 + (2 + 1)^2 = 13 are prime.
		

Crossrefs

Programs

  • Mathematica
    Rest@ FoldList[Module[{k = 1}, While[Times @@ Boole@ Map[PrimeQ, {#2^2 + k^2, (#2 + 1)^2 + (k + 1)^2}] < 1, k++]; k] &, 1, Range@ 76] (* Michael De Vlieger, Mar 25 2017 *)
  • PARI
    a(n) = my(k=0); while (! (isprime(n^2+k^2) && isprime((n+1)^2+(k+1)^2)), k++); k;  \\ Michel Marcus, Mar 25 2017
Showing 1-1 of 1 results.