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!)
A024215 Sum of squares of first n positive integers congruent to 1 mod 3. 7

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

%S 1,17,66,166,335,591,952,1436,2061,2845,3806,4962,6331,7931,9780,

%T 11896,14297,17001,20026,23390,27111,31207,35696,40596,45925,51701,

%U 57942,64666,71891,79635,87916,96752,106161,116161,126770,138006,149887,162431,175656,189580

%N Sum of squares of first n positive integers congruent to 1 mod 3.

%H Vincenzo Librandi, <a href="/A024215/b024215.txt">Table of n, a(n) for n = 1..10000</a>

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

%F a(n) = n*(6*n^2 - 3*n - 1)/2.

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

%F 2*a(n) = A213826(n). - _Clark Kimberling_, Jul 04 2012

%F E.g.f.: (1/2)*(2*x + 15*x^2 + 6*x^3)*exp(x). - _Franck Maminirina Ramaharo_, Nov 23 2018

%t a[n_] := n*(6*n^2 - 3*n - 1)/2; Array[a, 50] (* _Amiram Eldar_, Nov 23 2018 *)

%t Accumulate[Range[1,202,3]^2] (* _Harvey P. Dale_, Aug 24 2019 *)

%o (Magma) [n*(6*n^2-3*n-1)/2: n in [1..40]]; // _Vincenzo Librandi_, Oct 10 2011

%o (PARI) a(n)=n*(6*n^2-3*n-1)/2 \\ _Charles R Greathouse IV_, Oct 07 2015

%o (Sage) [n*(6*n^2-3*n-1)/2 for n in (1..40)] # _G. C. Greubel_, Nov 23 2018

%Y Cf. A016777 (positive integers congruent to 1 mod 3).

%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 April 25 09:32 EDT 2024. Contains 371967 sequences. (Running on oeis4.)