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.

A184866 Numbers k such that floor(1/2+k*sqrt(2)) is prime.

Original entry on oeis.org

2, 5, 8, 9, 12, 16, 22, 26, 29, 33, 42, 43, 50, 56, 59, 63, 73, 76, 77, 80, 90, 97, 98, 107, 111, 115, 118, 122, 128, 135, 139, 141, 149, 158, 162, 165, 169, 182, 186, 190, 196, 199, 200, 207, 217, 220, 221, 224, 234, 238, 247, 254, 264, 268, 271, 275, 281, 289, 296, 298, 305, 306, 313, 323, 326, 330, 339, 347, 353, 356, 360, 370, 387, 394, 398, 402, 404, 408, 415, 419, 425, 429, 436, 438, 446, 453, 455, 462, 466, 476, 479, 483, 496, 501, 514, 518, 531, 535, 538, 544, 572, 582, 585, 586, 593
Offset: 1

Views

Author

Clark Kimberling, Jan 23 2011

Keywords

Crossrefs

Programs

  • Mathematica
    r=2^(1/2); h=1/2; a[n_]:=Floor[n*r+h];
    Table[a[n], {n, 1, 120}] (* A022846, int. nearest 2^(1/2) *)
    t1={}; Do[If[PrimeQ[a[n]], AppendTo[t1, a[n]]], {n, 1, 600}]; t1
    t2={}; Do[If[PrimeQ[a[n]], AppendTo[t2, n]], {n, 1, 600}]; t2
    t3={}; Do[If[MemberQ[t1, Prime[n]], AppendTo[t3, n]], {n, 1, 300}]; t3
    (* Lists t1, t2, t3 match A184865, A184866, A184867. *)
  • PARI
    isok(k) = isprime(floor(1/2+k*sqrt(2))); \\ Michel Marcus, Jan 30 2018