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.

Original entry on oeis.org

1, 5, 16, 38, 75, 131, 210, 316, 453, 625, 836, 1090, 1391, 1743, 2150, 2616, 3145, 3741, 4408, 5150, 5971, 6875, 7866, 8948, 10125, 11401, 12780, 14266, 15863, 17575, 19406, 21360, 23441, 25653, 28000, 30486, 33115, 35891, 38818, 41900, 45141
Offset: 1

Views

Author

Michel Lagneau, Mar 28 2010

Keywords

Comments

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.
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

Examples

			From _Bruno Berselli_, Feb 17 2015: (Start)
Third differences:  1, 2,  4,  4,   4,   4,   4, (repeat 4) ... (A151798)
Second differences: 1, 3,  7, 11,  15,  19,  23,  27,   31, ... (A131098)
First differences:  1, 4, 11, 22,  37,  56,  79, 106,  137, ... (A084849)
-------------------------------------------------------------------------
This sequence:      1, 5, 16, 38,  75, 131, 210, 316,  453, ...
-------------------------------------------------------------------------
Partial sums:       1, 6, 22, 60, 135, 266, 476, 792, 1245, ... (A071239)
(End)
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 3rd ed., Oxford Univ. Press, 1954.

Crossrefs

Programs

  • 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
    
  • Maple
    A174723 := proc(n)
            n*(4*n^2-3*n+5)/6 ;
    end proc:
    seq( A174723(n),n=1..20) ; # R. J. Mathar, Nov 07 2011
  • Mathematica
    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 *)
  • PARI
    a(n)=n*(4*n^2-3*n+5)/6 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f. x*(1 + x + 2*x^2) / (x-1)^4. - R. J. Mathar, Nov 07 2011
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
a(n) = A022554(n^2). - Ridouane Oudra, Jun 13 2025