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!)
A174723 a(n) = n*(4*n^2 - 3*n + 5)/6. 7

%I #39 Sep 08 2022 08:45:51

%S 1,5,16,38,75,131,210,316,453,625,836,1090,1391,1743,2150,2616,3145,

%T 3741,4408,5150,5971,6875,7866,8948,10125,11401,12780,14266,15863,

%U 17575,19406,21360,23441,25653,28000,30486,33115,35891,38818,41900,45141

%N a(n) = n*(4*n^2 - 3*n + 5)/6.

%C We prove that a(n) = Sum_{k=1..n^2} floor(sqrt(k)): a(n) = Sum_{k=1..3} 1 + Sum_{k=4..8} 2 + ... + Sum_{k=(n-1)^2..n^2 - 1} (n-1) + n = 3*1 + 5*2 + 7*3 + ... + (2n-1)(n-1)+ n = Sum_{k=1..n} (2k-1)*(k-1) + n = 2*Sum_{k=1..n} k^2 - 3*Sum_{k=1..n} k + 2n = 2n(n+1)(2n+1)/6 - 3n(n+1)/2 + 2n = n*(4n^2 - 3n + 5) / 6.

%C Notice that a(4) = 4 + 3*5 + 2*6 + 1*7 and a(8) = 8 + 7*9 + 6*10 + 5*11 + 4*12 + 3*13 + 2*14 + 1*15. In general, a(n) = n + Sum_{k=1..n-1} (n-k)*(n+k). - _J. M. Bergot_, Jul 31 2013

%D T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.

%D G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 3rd ed., Oxford Univ. Press, 1954.

%H Vincenzo Librandi, <a href="/A174723/b174723.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 G.f. x*(1 + x + 2*x^2) / (x-1)^4. - _R. J. Mathar_, Nov 07 2011

%F a(1)=1, a(2)=5, a(3)=16, a(4)=38; for n > 4, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - _Harvey P. Dale_, Jan 16 2012

%e From _Bruno Berselli_, Feb 17 2015: (Start)

%e Third differences: 1, 2, 4, 4, 4, 4, 4, (repeat 4) ... (A151798)

%e Second differences: 1, 3, 7, 11, 15, 19, 23, 27, 31, ... (A131098)

%e First differences: 1, 4, 11, 22, 37, 56, 79, 106, 137, ... (A084849)

%e -------------------------------------------------------------------------

%e This sequence: 1, 5, 16, 38, 75, 131, 210, 316, 453, ...

%e -------------------------------------------------------------------------

%e Partial sums: 1, 6, 22, 60, 135, 266, 476, 792, 1245, ... (A071239)

%e (End)

%p A174723 := proc(n)

%p n*(4*n^2-3*n+5)/6 ;

%p end proc:

%p seq( A174723(n),n=1..20) ; # _R. J. Mathar_, Nov 07 2011

%t Table[n (4n^2-3n+5)/6,{n,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{1,5,16,38},50] (* _Harvey P. Dale_, Jan 16 2012 *)

%o (Magma) I:=[1, 5, 16, 38]; [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..50]]; // _Vincenzo Librandi_, Jul 04 2012

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

%Y Cf. A000196, A071239, A084849, A131098, A151798.

%K nonn,easy

%O 1,2

%A _Michel Lagneau_, Mar 28 2010

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 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)