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.

A263726 Least prime p such that p^2 + A263977(n)^2 is prime.

Original entry on oeis.org

2, 3, 2, 5, 2, 5, 2, 3, 3, 7, 2, 11, 2, 5, 2, 5, 3, 5, 5, 5, 2, 5, 11, 3, 2, 5, 2, 5, 2, 3, 3, 5, 19, 2, 5, 2, 13, 7, 3, 11, 11, 2, 3, 13, 3, 11, 2, 29, 2, 5, 3, 5, 2, 5, 5, 7, 7, 3, 11, 2, 11, 2, 3, 11, 7, 5, 2, 5, 2, 3, 3, 5, 2, 11, 5, 5, 3, 3, 59, 2, 11, 2, 3, 7, 13, 5, 2, 5, 7
Offset: 1

Views

Author

Keywords

Comments

The least k, such that prime(n) is the smallest prime p for which k^2 + p^2 is also prime, is in A263466.

Examples

			A263977(1) = 1, and 2 and 2^2 + 1^2 = 5 are prime, so a(1) = 2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = 2}, While[! PrimeQ[n^2 + p^2] && p < 1500, p = NextPrime@ p]; If[p > 1500, 0, p]]; lst = {}; k = 1; While[k < 130, If[f@ k > 0, AppendTo[lst, f@ k]]; k++]; lst