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.

A145022 Primes p of the form 4k+1 for which s=2 is the least positive integer such that sp-(floor(sqrt(sp)))^2 is a square.

Original entry on oeis.org

41, 61, 89, 113, 149, 157, 181, 193, 233, 269, 277, 313, 317, 337, 389, 421, 433, 557, 569, 613, 617, 709, 761, 773, 853, 881, 929, 937, 1013, 1109, 1117, 1129, 1201, 1213, 1301, 1409, 1429, 1553, 1637, 1741, 1753, 1861, 1873, 1901, 1997, 2113, 2137, 2153
Offset: 1

Views

Author

Vladimir Shevelev, Sep 29 2008

Keywords

Examples

			a(1)=41 since p=41 is the least prime of the form 4k+1 for which p-(floor(sqrt(p)))^2 is not a square, but 2p-(floor(sqrt(2p)))^2 is a square (for p=41 it is 1).
		

Crossrefs

Cf. A145016.

Programs

  • Maple
    filter:= proc(p)
      if not isprime(p) then return false fi;
      if issqr(p-floor(sqrt(p))^2) then return false fi;
      issqr(2*p-floor(sqrt(2*p))^2)
    end proc:
    select(filter, [seq(p,p=1..10000,4)]); # Robert Israel, Dec 04 2018
  • Mathematica
    sQ[n_] := IntegerQ[Sqrt[n - (Floor[Sqrt[n]])^2]]; aQ[n_] := Mod[n, 4] == 1 && PrimeQ[n] && !sQ[n] && sQ[2n]; Select[Range[2200], aQ] (* Amiram Eldar, Dec 04 2018 *)