cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A174723 #43 Jun 13 2025 18:17:24
%S A174723 1,5,16,38,75,131,210,316,453,625,836,1090,1391,1743,2150,2616,3145,
%T A174723 3741,4408,5150,5971,6875,7866,8948,10125,11401,12780,14266,15863,
%U A174723 17575,19406,21360,23441,25653,28000,30486,33115,35891,38818,41900,45141
%N A174723 a(n) = n*(4*n^2 - 3*n + 5)/6.
%C A174723 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 A174723 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 A174723 T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
%D A174723 G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 3rd ed., Oxford Univ. Press, 1954.
%H A174723 Vincenzo Librandi, <a href="/A174723/b174723.txt">Table of n, a(n) for n = 1..1000</a>
%H A174723 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F A174723 G.f. x*(1 + x + 2*x^2) / (x-1)^4. - _R. J. Mathar_, Nov 07 2011
%F A174723 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
%F A174723 a(n) = A022554(n^2). - _Ridouane Oudra_, Jun 13 2025
%e A174723 From _Bruno Berselli_, Feb 17 2015: (Start)
%e A174723 Third differences:  1, 2,  4,  4,   4,   4,   4, (repeat 4) ... (A151798)
%e A174723 Second differences: 1, 3,  7, 11,  15,  19,  23,  27,   31, ... (A131098)
%e A174723 First differences:  1, 4, 11, 22,  37,  56,  79, 106,  137, ... (A084849)
%e A174723 -------------------------------------------------------------------------
%e A174723 This sequence:      1, 5, 16, 38,  75, 131, 210, 316,  453, ...
%e A174723 -------------------------------------------------------------------------
%e A174723 Partial sums:       1, 6, 22, 60, 135, 266, 476, 792, 1245, ... (A071239)
%e A174723 (End)
%p A174723 A174723 := proc(n)
%p A174723         n*(4*n^2-3*n+5)/6 ;
%p A174723 end proc:
%p A174723 seq( A174723(n),n=1..20) ; # _R. J. Mathar_, Nov 07 2011
%t A174723 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 A174723 (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 A174723 (PARI) a(n)=n*(4*n^2-3*n+5)/6 \\ _Charles R Greathouse IV_, Oct 07 2015
%Y A174723 Cf. A000196, A071239, A084849, A131098, A151798, A022554.
%K A174723 nonn,easy
%O A174723 1,2
%A A174723 _Michel Lagneau_, Mar 28 2010