login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140612 Integers k such that both k and k+1 are the sum of 2 squares. 8

%I

%S 0,1,4,8,9,16,17,25,36,40,49,52,64,72,73,80,81,89,97,100,116,121,136,

%T 144,145,148,169,180,193,196,225,232,233,241,244,256,260,288,289,292,

%U 305,313,324,337,360,361,369,388,400,404,409,424,441,449,457

%N Integers k such that both k and k+1 are the sum of 2 squares.

%C Equivalently, nonnegative k such that k*(k+1) is the sum of two squares.

%C Also, nonnegative k such that k*(k+1)/2 is the sum of two squares. This follows easily from the "sum of two squares theorem": x is the sum of two (nonnegative) squares iff its prime factorization does not contain p^e where p == 3 (mod 4) and e is odd. - _Robert Israel_, Mar 26 2018

%C Trivially, sequence includes all positive squares.

%H David A. Corneth, <a href="/A140612/b140612.txt">Table of n, a(n) for n = 1..10000</a>

%e 40 = 6^2 + 2^2, 41 = 5^2 + 4^2, so 40 is in the sequence.

%t (*M6*) A1 = {}; Do[If[SquaresR[2, n (n + 1)/2] > 0, AppendTo[A1, n]], {n, 0, 1500}]; A1

%t Join[{0}, Flatten[Position[Accumulate[Range[500]], _?(SquaresR[2, #]> 0&)]]] (* _Harvey P. Dale_, Jun 07 2015 *)

%o (MAGMA) [k:k in [0..460]| forall{k+a: a in [0,1]|NormEquation(1, k+a) eq true}]; // _Marius A. Burtea_, Oct 08 2019

%Y Cf. A000217, A000290, A000404, A001481, A002378, A050795, A073613.

%K nonn,easy

%O 1,3

%A _Franklin T. Adams-Watters_, May 19 2008

%E a(1)=0 prepended and edited by _Max Alekseyev_, Oct 08 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 25 06:59 EDT 2021. Contains 345452 sequences. (Running on oeis4.)