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.

This page as a plain text file.
%I A385821 #47 Jul 15 2025 11:05:42
%S A385821 2,3,5,6,9,11,12,15,18,19,25,29,35,39,42,45,48,49,51,54,59,60,61,65,
%T A385821 66,69,71,72,79,84,85,90,95,101,121,131,132,139,141,144,145,150,159,
%U A385821 165,169,171,174,175,181,186,192,195,198,199,201,204,205,209,210,219,221,231,245,246
%N A385821 Numbers k such that ceiling((k^2 + 1)/2) is prime.
%H A385821 James C. McMahon, <a href="/A385821/b385821.txt">Table of n, a(n) for n = 1..10000</a>
%e A385821 5 is a term since ceiling((5^2 + 1)/2) = 13, which is prime.
%e A385821 8 is not a term since ceiling((8^2 + 1)/2) = 33, which is not prime.
%t A385821 Select[Range[246],PrimeQ[Ceiling[(#^2+1)/2]]&] (* _James C. McMahon_, Jul 15 2025 *)
%o A385821 (Python)
%o A385821 from sympy import isprime
%o A385821 def ok(k): return isprime((k*k + 2) // 2)
%o A385821 print([k for k in range(1, 247) if ok(k)])
%o A385821 (PARI) isok(k) = isprime(ceil((k^2+1)/2)); \\ _Michel Marcus_, Jul 10 2025
%Y A385821 Positions of primes in A080827.
%K A385821 nonn,easy
%O A385821 1,1
%A A385821 _Emirhan Üçok_, Jul 09 2025