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.

A378186 With p(n) = A002145(n) = n-th non-Pythagorean prime, a(n) is the least k such p(n) + k is a non-Pythagorean prime and 2 p(n) + k - 5 is a Pythagorean prime; and a(n) = 0 if there is no such k .

Original entry on oeis.org

4, 4, 12, 4, 20, 16, 16, 12, 24, 64, 12, 4, 20, 28, 20, 64, 20, 40, 16, 16, 24, 20, 20, 28, 16, 16, 12, 68, 12, 20, 40, 100, 4, 36, 16, 12, 20, 100, 4, 36, 20, 72, 4, 48, 16, 12, 24, 100, 32, 4, 20, 76, 40, 8, 16, 12, 8, 40, 64, 196, 16, 12, 60, 68, 52, 20
Offset: 1

Views

Author

Clark Kimberling, Jan 13 2025

Keywords

Examples

			3 + 4 = 7, the least non-Pythagorean prime after 3,
and 3 + 7 - 5 = 5, a Pythagorean prime, so a(1) = 4.
		

Crossrefs

Programs

  • Mathematica
    s = Select[Prime[Range[450]], Mod[#, 4] == 3 &]
    a[n_] := Select[Range[200],  MemberQ[s, s[[n]] + #] && PrimeQ[2 s[[n]] + # - 5] &, 1]
    Flatten[Table[a[n], {n, 1, 140}]]