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.

A177332 Partial sums of round(n^2/29).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 5, 7, 10, 13, 17, 22, 28, 35, 43, 52, 62, 73, 85, 99, 114, 131, 149, 169, 191, 214, 239, 266, 295, 326, 359, 394, 432, 472, 514, 559, 606, 656, 708, 763, 821, 882, 946, 1013, 1083, 1156, 1232, 1311, 1394, 1480
Offset: 0

Views

Author

Mircea Merca, Dec 10 2010

Keywords

Comments

The round function is defined here by round(x) = floor(x + 1/2).
There are several sequences of integers of the form round(n^2/k) for whose partial sums we can establish identities as following (only for k = 2, ..., 9, 11, 12, 13, 16, 17, 19, 20, 28, 29, 36, 44).

Examples

			a(17) = 0 + 0 + 0 + 0 + 1 + 1 + 1 + 2 + 2 + 3 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 62.
		

Crossrefs

Programs

  • Magma
    [Floor((n+4)*(2*n^2-5*n+21)/174): n in [0..50]]; // Vincenzo Librandi, Apr 29 2011
    
  • Maple
    seq(round(n*(n+1)*(2*n+1)/174),n=0..50)
  • Mathematica
    Accumulate[Table[Round[n^2/29],{n,0,60}]] (* Harvey P. Dale, Dec 18 2010 *)
  • PARI
    a(n)=(2*n^3+3*n^2+n+84)\174 \\ Charles R Greathouse IV, Apr 06 2012
    
  • Python
    def A177332(n): return (n*(n*(2*n + 3) + 1) + 84)//174 # Chai Wah Wu, Jan 31 2023

Formula

a(n) = round(n*(n+1)*(2*n+1)/174).
a(n) = floor((n+4)*(2*n^2 - 5*n + 21)/174).
a(n) = ceiling((n-3)*(2*n^2 + 9*n + 28)/174).
a(n) = a(n-29) + (n+1)*(n-29) + 266, n > 28.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + a(n-29) - 3*a(n-30) + 3*a(n-31) - a(n-32). - R. J. Mathar, Dec 13 2010
G.f.: x^4*(x+1)*(x^2 - x + 1)*(x^4 - x^2 + 1)*(x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)*(x^10 - x^6 + x^5 - x^4 + 1)/((x-1)^4*(x^28 + x^27 + x^26 + x^25 + x^24 + x^23 + x^22 + x^21 + x^20 + x^19 + x^18 + x^17 + x^16 + x^15 + x^14 + x^13 + x^12 + x^11 + x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)). - Colin Barker, Apr 06 2012