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.

Showing 1-2 of 2 results.

A048395 Sum of consecutive nonsquares.

Original entry on oeis.org

0, 5, 26, 75, 164, 305, 510, 791, 1160, 1629, 2210, 2915, 3756, 4745, 5894, 7215, 8720, 10421, 12330, 14459, 16820, 19425, 22286, 25415, 28824, 32525, 36530, 40851, 45500, 50489, 55830, 61535, 67616, 74085, 80954, 88235, 95940, 104081
Offset: 0

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Comments

Relationship with natural numbers: a(4) = (first term + last term)*n = (10+15)*3 = (25)*3 = 75; a(5) = (17+24)*4 = (41)*4 = 164; ...
Also (X*Y*Z)/(X+Y+Z) of primitive Pythagorean triples (X,Y,Z=Y+1) as described in A046092 and A001844. - Lambert Herrgesell (zero815(AT)googlemail.com), Dec 13 2005
First differences are in A201279. - J. M. Bergot, Jun 22 2013 [Corrected by Omar E. Pol, Dec 26 2021]

Examples

			Between 3^2 and 4^2 we have 10+11+12+13+14+15 which is 75 or a(4).
		

Crossrefs

Programs

  • Haskell
    a048395 0 = 0
    a048395 n = a199771 (2 * n)  -- Reinhard Zumkeller, Oct 26 2015
  • Mathematica
    Table[n(1+2*n(1+n)),{n,0,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,5,26,75},40] (* Harvey P. Dale, Nov 01 2013 *)
  • PARI
    v0=[1,0,1]; M=[1, 2, 2; -2, -1, -2; 2, 2, 3];
    g(v)=v[1]*v[2]*v[3]/(v[1]+v[2]+v[3]);
    a(n)=g(v0*M^n);
    for(i=0,50,print1(a(i),", ")) \\ Lambert Herrgesell (zero815(AT)googlemail.com), Dec 13 2005
    

Formula

a(n) = 2*n^3 + 2*n^2 + n.
a(n) = Sum_{j=0..n} ((n+j+2)^2 - j^2 + 1). - Zerinvary Lajos, Sep 13 2006
O.g.f.: x(x+5)(1+x)/(1-x)^4. - R. J. Mathar, Jun 12 2008
a(n) = A199771(2*n) for n > 0. - Reinhard Zumkeller, Nov 23 2011
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4); a(0)=0, a(1)=5, a(2)=26, a(3)=75. - Harvey P. Dale, Nov 01 2013
E.g.f.: exp(x)*x*(5 + 8*x + 2*x^2). - Stefano Spezia, Jun 25 2022

A048396 Sums of consecutive noncubes.

Original entry on oeis.org

0, 27, 315, 1638, 5670, 15345, 35217, 71820, 134028, 233415, 384615, 605682, 918450, 1348893, 1927485, 2689560, 3675672, 4931955, 6510483, 8469630, 10874430, 13796937, 17316585, 21520548, 26504100, 32370975, 39233727, 47214090, 56443338, 67062645, 79223445
Offset: 0

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Comments

Relation with triangular numbers: a(n) = 3*((n^3+1) + ((n+1)^3-1)) * A000217(n). Example: a(3) = 3*(first term + last term)*A000217(3) = 3*(28+63)*6 = 1638.

Examples

			Between 3^3 and 4^3 we have: 28 + 29 + ... + 62 + 63 = 1638 = a(3).
		

Crossrefs

Programs

  • Magma
    [(6*n^5+15*n^4+18*n^3+12*n^2+3*n)/2 : n in [0..50]]; // Wesley Ivan Hurt, Apr 10 2015
    
  • Maple
    A048396:=n->(6*n^5+15*n^4+18*n^3+12*n^2+3*n)/2: seq(A048396(n), n=0..50); # Wesley Ivan Hurt, Apr 10 2015
  • Mathematica
    Table[Total[Range[n^3+1,(n+1)^3-1]], {n,0,30}] (* Harvey P. Dale, Jan 08 2011 *)
    LinearRecurrence[{6,-15,20,-15,6,-1},{0,27,315,1638,5670,15345},40] (* Harvey P. Dale, Nov 02 2024 *)
  • PARI
    a(n)=(6*n^5+15*n^4+18*n^3+12*n^2+3*n)/2 \\ Charles R Greathouse IV, Oct 07 2015
    
  • Python
    def A048396(n): return n*(n*(n*(n*(6*n + 15) + 18) + 12) + 3)>>1 # Chai Wah Wu, Sep 04 2024

Formula

a(n) = ( 6n^5 + 15n^4 + 18n^3 + 12n^2 + 3n ) / 2.
G.f.: 9*x*(1+x)*(3+14*x+3*x^2)/(1-x)^6. - Colin Barker, Mar 15 2012
a(n) = 6*a(n-1)-15*a(n-2)+20*a(n-3)-15*a(n-4)+6*a(n-5)-a(n-6). - Wesley Ivan Hurt, Apr 10 2015
Showing 1-2 of 2 results.