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-4 of 4 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

A048397 Sum of consecutive non-fourth-powers.

Original entry on oeis.org

0, 119, 3104, 29319, 162104, 643535, 2040744, 5502959, 13129424, 28468359, 57167120, 107793719, 192849864, 329995679, 543506264, 865980255, 1340320544, 2022007319, 2981683584, 4308073319, 6111252440, 8526292719, 11717298824
Offset: 0

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Comments

Relationship with tetrahedral numbers: a(4) = (first term + last term)*(6*Tetra_n + n^3) = (82+255)*(6*10+27) = (337)*(87) = 29319.

Examples

			Between 3^4 and 4^4 we have 82+83+...+254+255 which is 29319 or a(4).
		

Crossrefs

Programs

  • Maple
    A048397:=n->4*n^7 + 14*n^6 + 28*n^5 + 34*n^4 + 26*n^3 + 11*n^2 + 2*n; seq(A048397(n), n=0..40); # Wesley Ivan Hurt, Feb 10 2014
  • Mathematica
    Table[Total[Range[n^4+1,(n+1)^4-1]],{n,0,40}] (* or *) Table[4n^7+ 14n^6+28n^5+34n^4+26n^3+11n^2+2n,{n,0,40}] (* Harvey P. Dale, Apr 23 2011 *)
    LinearRecurrence[{8,-28,56,-70,56,-28,8,-1},{0,119,3104,29319,162104,643535,2040744,5502959},40] (* Harvey P. Dale, Jul 31 2021 *)
  • PARI
    a(n)=n*(2*n^2 + 3*n + 2)*(2*n^4 + 4*n^3 + 6*n^2 + 4*n + 1) \\ Charles R Greathouse IV, Jan 24 2022
    
  • Python
    def A048397(n): return n*(n*((n<<1)+3)+2)*(n*(n*(n*((n+2)<<1)+6)+4)+1) # Chai Wah Wu, Oct 19 2024

Formula

a(n) = 4*n^7 + 14*n^6 + 28*n^5 + 34*n^4 + 26*n^3 + 11*n^2 + 2*n.
G.f.: (119*x +2152*x^2 +7819*x^3 +7800*x^4 +2141*x^5 +128*x^6 +x^7)/(x-1)^8. - Harvey P. Dale, Apr 23 2011

A158527 Sum of squares of consecutive positive noncubes.

Original entry on oeis.org

139, 5997, 78414, 553810, 2677065, 10009839, 31098172, 84004164, 203427495, 451263505, 931565514, 1811000022, 3346004389, 5917977555, 10077955320, 16602342664, 26561396547, 41402273589, 63048577990, 94018466010
Offset: 1

Views

Author

Zak Seidov, Mar 20 2009

Keywords

Examples

			a(1) = 139 = 2^2+...+7^2, a(2) = 9^2+...+26^2.
		

Crossrefs

Cf. A048396 (sum of consecutive noncubes).

Programs

  • Mathematica
    LinearRecurrence[{9,-36,84,-126,126,-84,36,-9,1},{139,5997,78414,553810,2677065,10009839,31098172,84004164,203427495},20] (* Harvey P. Dale, Nov 11 2024 *)
  • Python
    def A158527(n): return n*(n*(n*(n*(n*(n*(n*(6*(n + 4)) + 54) + 78) + 69) + 36) + 10) + 1)>>1 # Chai Wah Wu, Sep 03 2024

Formula

a(n) = (1/2)*n*(1 + n)*(1 + 9*n + 27*n^2 + 42*n^3 + 36*n^4 + 18*n^5 + 6*n^6).
G.f.: -x*(139*x^6+4746*x^5+29445*x^4+52300*x^3+29445*x^2+4746*x+139)/(x-1)^9.

A158528 Sum of primes between consecutive positive cubes.

Original entry on oeis.org

17, 83, 401, 1092, 2845, 5753, 12357, 19920, 33659, 57259, 80152, 113660, 180627, 233148, 329118, 413586, 584951, 742021, 927917, 1209050, 1500573, 1815997, 2286198, 2771420, 3302411, 3852425, 4848999, 5721599, 6536322, 7584155
Offset: 1

Views

Author

Zak Seidov, Mar 20 2009

Keywords

Examples

			a(1) = 2 + 3 + 5 + 7 = 17, a(2) = 11 + 13 + 17 + 19 + 23 = 83.
		

Crossrefs

Programs

  • Mathematica
    Join[{17},Table[Total[Prime[Range[PrimePi[n^3]+1,PrimePi[(n+1)^3]]]],{n,2,35}]] (* Harvey P. Dale, Aug 16 2011 *)
Showing 1-4 of 4 results.