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.

A385821 Numbers k such that ceiling((k^2 + 1)/2) is prime.

Original entry on oeis.org

2, 3, 5, 6, 9, 11, 12, 15, 18, 19, 25, 29, 35, 39, 42, 45, 48, 49, 51, 54, 59, 60, 61, 65, 66, 69, 71, 72, 79, 84, 85, 90, 95, 101, 121, 131, 132, 139, 141, 144, 145, 150, 159, 165, 169, 171, 174, 175, 181, 186, 192, 195, 198, 199, 201, 204, 205, 209, 210, 219, 221, 231, 245, 246
Offset: 1

Views

Author

Emirhan Üçok, Jul 09 2025

Keywords

Examples

			5 is a term since ceiling((5^2 + 1)/2) = 13, which is prime.
8 is not a term since ceiling((8^2 + 1)/2) = 33, which is not prime.
		

Crossrefs

Positions of primes in A080827.

Programs

  • Mathematica
    Select[Range[246],PrimeQ[Ceiling[(#^2+1)/2]]&] (* James C. McMahon, Jul 15 2025 *)
  • PARI
    isok(k) = isprime(ceil((k^2+1)/2)); \\ Michel Marcus, Jul 10 2025
  • Python
    from sympy import isprime
    def ok(k): return isprime((k*k + 2) // 2)
    print([k for k in range(1, 247) if ok(k)])