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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

353, 373, 449, 461, 521, 541, 593, 653, 673, 757, 769, 797, 821, 829, 941, 953, 1009, 1021, 1061, 1069, 1097, 1193, 1217, 1249, 1277, 1361, 1381, 1481, 1489, 1549, 1597, 1613, 1657, 1669, 1693, 1709, 1733, 1777, 1801, 1877, 1889, 1973, 2053, 2069, 2081
Offset: 1

Views

Author

Vladimir Shevelev, Sep 29 2008

Keywords

Comments

Primes p == 1 (mod 4) such that A245474(p) = 5. These numbers are a subset of {A245440}. Curiosity: a(n) = A245440(n) for all n < 25. - Thomas Ordowski, Jul 22 2014

Examples

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

Crossrefs

Programs

  • PARI
    s=[]; forprime(p=2, 3000, if(p%4==1 && !issquare(p-sqrtint(p)^2) && !issquare(2*p-sqrtint(2*p)^2) && !issquare(3*p-sqrtint(3*p)^2) && !issquare(4*p-sqrtint(4*p)^2) && issquare(5*p-sqrtint(5*p)^2), s=concat(s, p))); s \\ Colin Barker, Jul 23 2014

A245440 Primes p == 1 (mod 4) such that p - floor(sqrt(p))^2 and 2p - floor(sqrt(2p))^2 are not squares.

Original entry on oeis.org

353, 373, 449, 461, 521, 541, 593, 653, 673, 757, 769, 797, 821, 829, 941, 953, 1009, 1021, 1061, 1069, 1097, 1193, 1217, 1237, 1249, 1277, 1361, 1381, 1481, 1489, 1549, 1597, 1613, 1621, 1657, 1669, 1693, 1709, 1721, 1733, 1777, 1801, 1877, 1889, 1933, 1949
Offset: 1

Views

Author

Thomas Ordowski, Jul 22 2014

Keywords

Comments

Primes p of the form 4k+1 such that A053610(p) > 2 and A053610(2p) > 2.
Note that p = a^2 + b^2 and 2p = (a+b)^2 + (a-b)^2 is the only way. So according to the definition the greedy algorithm cannot give such the sums of two squares.
Interesting fact: a(n) = A145023(n) for all n < 25. Of course A145023 is a subsequence.
Primes p == 1 (mod 4) such that A245474(p) > 2.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | p mod 4 eq 1 and not IsSquare(p-Floor(Sqrt(p))^2) and not IsSquare(2*p-Floor(Sqrt(2*p))^2)]; // Vincenzo Librandi, Sep 19 2017
  • Mathematica
    a245440Q[n_Integer] := If[
      And[PrimeQ[n] == True, Mod[n, 4] == 1],
      If[Or[IntegerQ[Sqrt[n - Floor[Sqrt[n]]^2]] == True,
        IntegerQ[Sqrt[2*n - Floor[Sqrt[2*n]]^2]] == True], False, True],
      False]; a245440[n_Integer] :=
    Flatten[Position[Thread[a245440Q[Range[n]]],
       True]]; a245440[300000]; (* Michael De Vlieger, Aug 05 2014 *)
  • PARI
    s=[]; forprime(p=2, 3000, if(p%4==1 && !issquare(p-floor(sqrt(p))^2) && !issquare(2*p-floor(sqrt(2*p))^2), s=concat(s, p))); s \\ Colin Barker, Jul 22 2014
    

Extensions

More terms from Colin Barker, Jul 22 2014
Showing 1-2 of 2 results.