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!)
A024381 a(n) = sum of squares of first n positive integers congruent to 1 mod 4. 4

%I #20 Sep 08 2022 08:44:48

%S 1,26,107,276,565,1006,1631,2472,3561,4930,6611,8636,11037,13846,

%T 17095,20816,25041,29802,35131,41060,47621,54846,62767,71416,80825,

%U 91026,102051,113932,126701,140390,155031,170656,187297,204986,223755,243636,264661

%N a(n) = sum of squares of first n positive integers congruent to 1 mod 4.

%H Vincenzo Librandi, <a href="/A024381/b024381.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).

%F 1^2 + 5^2 + 9^2 + ... + (4n+1)^2 = (4n+1)(n+1)+(4^2)(2n+1)(n+1)n/6, which generalizes to (0a+1)^2 + (1a+1)^2 + (2a+1)^2 + ... + (na+1)^2 = (an+1)(n+1) + (a^2)(2n+1)(n+1)n/6. Also Sum{n}_(an+1)^2 = (an+1)(n+1) + (a^2)* sum{n}_(n+1)^2. - Helmut Rasinger (helmut.rasinger(AT)wanadoo.fr), Sep 04 2003

%F G.f.: x*(1 + 22*x + 9*x^2) / (x-1)^4. - _R. J. Mathar_, Oct 08 2011

%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - _Vincenzo Librandi_, Jun 19 2012

%t LinearRecurrence[{4,-6,4,-1},{1,26,107,276},40] (* _Vincenzo Librandi_, Jun 19 2012 *)

%t Accumulate[Range[1,151,4]^2] (* _Harvey P. Dale_, Apr 25 2020 *)

%o (Magma) I:=[1, 26, 107, 276]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // _Vincenzo Librandi_, Jun 19 2012

%K nonn,easy

%O 1,2

%A _Clark Kimberling_

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 March 29 05:48 EDT 2024. Contains 371265 sequences. (Running on oeis4.)