login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245440 Primes p == 1 (mod 4) such that p - floor(sqrt(p))^2 and 2p - floor(sqrt(2p))^2 are not squares. 2

%I #57 Sep 08 2022 08:46:08

%S 353,373,449,461,521,541,593,653,673,757,769,797,821,829,941,953,1009,

%T 1021,1061,1069,1097,1193,1217,1237,1249,1277,1361,1381,1481,1489,

%U 1549,1597,1613,1621,1657,1669,1693,1709,1721,1733,1777,1801,1877,1889,1933,1949

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

%C Primes p of the form 4k+1 such that A053610(p) > 2 and A053610(2p) > 2.

%C 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.

%C Interesting fact: a(n) = A145023(n) for all n < 25. Of course A145023 is a subsequence.

%C Primes p == 1 (mod 4) such that A245474(p) > 2.

%H Michael De Vlieger, <a href="/A245440/b245440.txt">Table of n, a(n) for n = 1..10461</a> (first 46 terms from Thomas Ordowski and Colin Barker)

%t a245440Q[n_Integer] := If[

%t And[PrimeQ[n] == True, Mod[n, 4] == 1],

%t If[Or[IntegerQ[Sqrt[n - Floor[Sqrt[n]]^2]] == True,

%t IntegerQ[Sqrt[2*n - Floor[Sqrt[2*n]]^2]] == True], False, True],

%t False]; a245440[n_Integer] :=

%t Flatten[Position[Thread[a245440Q[Range[n]]],

%t True]]; a245440[300000]; (* _Michael De Vlieger_, Aug 05 2014 *)

%o (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

%o (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

%Y Cf. A002144, A053610, A145016, A145023, A174806, A245474.

%K nonn

%O 1,1

%A _Thomas Ordowski_, Jul 22 2014

%E More terms from _Colin Barker_, Jul 22 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:37 EDT 2024. Contains 371906 sequences. (Running on oeis4.)