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-6 of 6 results.

A164576 Integer averages of the set of the first positive squares up to some n^2.

Original entry on oeis.org

1, 11, 20, 46, 63, 105, 130, 188, 221, 295, 336, 426, 475, 581, 638, 760, 825, 963, 1036, 1190, 1271, 1441, 1530, 1716, 1813, 2015, 2120, 2338, 2451, 2685, 2806, 3056, 3185, 3451, 3588, 3870, 4015, 4313, 4466, 4780, 4941, 5271, 5440, 5786, 5963, 6325, 6510
Offset: 1

Views

Author

Keywords

Comments

Integers of the form A000330(k)/k, k listed in A007310. - R. J. Mathar, Aug 20 2009

Examples

			a(1) = 1^2/1 is an integer. The average of the first two squares is (1^2+2^2)/2=5/2, not integer.
The average of the first three squares is (1^2+2^2+3^2)/3=14/3, not integer.
The average of the first five squares is (1^2+2^2+3^2+4^2+5^2)/ 5=11, integer, and constitutes a(2).
		

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[a=(s+=n^2)/n;If[Mod[a,1]==0,AppendTo[lst,a]],{n,6!}];lst
    Flatten[Table[{(1 + 3 k) (1 + 4 k), (1 + k) (11 + 12 k)}, {k, 0, 499}]] (* Zak Seidov, Aug 15 2012 *)
    Module[{nn=150,sq},sq=Range[nn]^2;Select[Table[Mean[Take[sq,n]],{n,nn}],IntegerQ]] (* or *) LinearRecurrence[{1,2,-2,-1,1},{1,11,20,46,63},50] (* Harvey P. Dale, Oct 31 2013 *)
  • PARI
    a(n) = 1/4*(12*n^2 - 6*n + (-1)^n*(4*n-1) + 1) \\ Colin Barker, Dec 26 2015

Formula

a(n) = A000330(A007310(n)) / A007310(n) = A175485(A007310(n)). - Jaroslav Krizek, May 28 2010
G.f. ( -x*(1+10*x+7*x^2+6*x^3) ) / ( (1+x)^2*(x-1)^3 ). - R. J. Mathar, Jan 25 2011
a(n) = 1/4*(12*n^2 - 6*n + (-1)^n*(4*n-1) + 1). - Colin Barker, Dec 26 2015

Extensions

Edited by R. J. Mathar, Aug 20 2009

A164577 Integer averages of the first perfect cubes up to some n^3.

Original entry on oeis.org

1, 12, 25, 45, 112, 162, 225, 396, 507, 637, 960, 1156, 1377, 1900, 2205, 2541, 3312, 3750, 4225, 5292, 5887, 6525, 7936, 8712, 9537, 11340, 12321, 13357, 15600, 16810, 18081, 20812, 22275, 23805, 27072, 28812, 30625, 34476, 36517, 38637, 43120
Offset: 1

Views

Author

Keywords

Comments

Integers of the form A000537(k)/k, created by the k>0 listed in A042965. - R. J. Mathar, Aug 20 2009
Integers of the form (1/4)*n*(n+1)^2 for some n. - Zak Seidov, Aug 17 2009

Examples

			The average of the first cube is 1^3/1=1=a(1).
The average of the first two cubes is (1^3+2^3)/2=9/2, not integer, and does not contribute to the sequence.
The average of the first three cubes is (1^3+2^3+3^3)/3=12, integer, and defines a(2).
		

Crossrefs

Programs

  • Mathematica
    Timing[s=0;lst={};Do[a=(s+=n^3)/n;If[Mod[a,1]==0,AppendTo[lst,a]],{n, 5!}];lst]
    With[{nn=80},Select[#[[1]]/#[[2]]&/@Thread[{Accumulate[Range[ nn]^3],Range[ nn]}],IntegerQ]] (* or *) LinearRecurrence[{1,0,3,-3,0,-3,3,0,1,-1},{1,12,25,45,112,162,225,396,507,637},50] (* Harvey P. Dale, Mar 14 2020 *)

Formula

G.f.: ( x*(1+11*x+13*x^2+17*x^3+34*x^4+11*x^5+6*x^6+3*x^7) ) / ( (1+x+x^2)^3*(x-1)^4 ). - R. J. Mathar, Jan 25 2011

Extensions

Changed comments to examples - R. J. Mathar, Aug 20 2009

A164578 Integers of the form (k+1)*(2k+1)/12.

Original entry on oeis.org

10, 23, 65, 94, 168, 213, 319, 380, 518, 595, 765, 858, 1060, 1169, 1403, 1528, 1794, 1935, 2233, 2390, 2720, 2893, 3255, 3444, 3838, 4043, 4469, 4690, 5148, 5385, 5875, 6128, 6650, 6919, 7473, 7758, 8344, 8645, 9263, 9580, 10230, 10563, 11245, 11594
Offset: 1

Views

Author

Keywords

Comments

This can also be defined as integer averages of the first k halved squares, 1^2/2, 2^2/2, 3^2/2,... , 3^k/2, because sum_{j=1..k} j^2/2 = k*(k+1)*(2k+1)/12. The generating k are in A168489.

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[a=(s+=(n^2)/2)/n;If[Mod[a,1]==0,AppendTo[lst,a]],{n,2*6!}];lst
    Select[Table[((n+1)(2n+1))/12,{n,300}],IntegerQ] (* or *) LinearRecurrence[ {1,2,-2,-1,1},{10,23,65,94,168},60] (* Harvey P. Dale, Jun 14 2017 *)
  • PARI
    Vec(x*(10+13*x+22*x^2+3*x^3)/((1-x)^3*(1+x)^2) + O(x^100)) \\ Colin Barker, Jan 26 2016

Formula

a(n) = +a(n-1) +2*a(n-2) -2*a(n-3) -a(n-4) +a(n-5). G.f. x*(-10-13*x-22*x^2-3*x^3) / ((1+x)^2*(x-1)^3). - R. J. Mathar, Jan 25 2011
From Colin Barker, Jan 26 2016: (Start)
a(n) = (24*n^2+6*n-(-1)^n*(8*n+1)+1)/4.
a(n) = (12*n^2-n)/2 for n even.
a(n) = (12*n^2+7*n+1)/2 for n odd.
(End)

A171662 a(n) = floor((2*n^2 + n)/6).

Original entry on oeis.org

0, 0, 1, 3, 6, 9, 13, 17, 22, 28, 35, 42, 50, 58, 67, 77, 88, 99, 111, 123, 136, 150, 165, 180, 196, 212, 229, 247, 266, 285, 305, 325, 346, 368, 391, 414, 438, 462, 487, 513, 540, 567, 595, 623, 652, 682, 713, 744, 776, 808, 841, 875, 910, 945
Offset: 0

Views

Author

Michael Somos, Dec 14 2009

Keywords

Crossrefs

Cf. A078617.

Programs

  • Magma
    [Floor((2*n^2+n)/6): n in [0..60]]; // G. C. Greubel, Sep 25 2018
  • Mathematica
    Table[Floor[(2n^2+n)/6],{n,0,60}] (* or *) LinearRecurrence[{2,-1,0,0,0,1,-2,1},{0,0,1,3,6,9,13,17},60] (* Harvey P. Dale, Oct 15 2014 *)
  • PARI
    {a(n) = (2 * n^2 + n) \ 6};
    

Formula

a(n) = floor(n*(2*n + 1)/6).
a(n) = A078617(-1 - n) for all n in Z.
a(n) = floor((n+1)/(exp(3/(n+1)) - 1)). - Richard R. Forberg, Jun 22 2013
G.f.: -x^2*(x^4 + x^2 + x + 1)/( (x+1) * (x^2+x+1) * (x^2-x+1) * (x-1)^3). - Alois P. Heinz, Jun 24 2013
a(n) = 2*a(n-1) - a(n-2) + a(n-6) - 2*a(n-7) + a(n-8); a(0)=0, a(1)=0, a(2)=1, a(3)=3, a(4)=6, a(5)=9, a(6)=13, a(7)=17. - Harvey P. Dale, Oct 15 2014
36*a(n) = 6*n +12*n^2 -11 +3*(-1)^n +2*A061347(n) +6*A057079(n+2). - R. J. Mathar, Apr 26 2022

A164579 Integer averages of halves of first cubes of natural numbers (n^3)/2 for some n.

Original entry on oeis.org

6, 56, 81, 198, 480, 578, 950, 1656, 1875, 2646, 3968, 4356, 5670, 7800, 8405, 10406, 13536, 14406, 17238, 21560, 22743, 26550, 32256, 33800, 38726, 46008, 47961, 54150, 63200, 65610, 73206, 84216, 87131, 96278, 109440, 112908, 123750, 139256
Offset: 1

Views

Author

Keywords

Comments

Also, integers of the form (1/8)*n*(n+1)^2 for some n. - Zak Seidov, Aug 17 2009

Examples

			1/2, 9/4, 6, 25/2, 45/2, 147/4, 56, 81, ...
		

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[a=(s+=(n^3)/2)/n;If[Mod[a,1]==0,AppendTo[lst,a]],{n,3*5!}];lst
    LinearRecurrence[{1,0,3,-3,0,-3,3,0,1,-1},{6,56,81,198,480,578,950,1656,1875,2646},40] (* Harvey P. Dale, Jul 26 2017 *)
    Module[{nn=200,ac},ac=Accumulate[Range[nn]^3/2];Select[#[[1]]/#[[2]]&/@ Thread[{ac,Range[nn]}],IntegerQ]] (* Harvey P. Dale, Jan 28 2020 *)
  • PARI
    forstep(n=3, 150, [4,1,3], print1(n*(n+1)^2>>3, ", ")); \\ Charles R Greathouse IV, Nov 02 2009

Formula

G.f.: ( x*(6+50*x+25*x^2+99*x^3+132*x^4+23*x^5+39*x^6+10*x^7) ) / ( (1+x+x^2)^3*(x-1)^4 ). - R. J. Mathar, Jan 25 2011

A164619 Integers of the form A164577(k)/3.

Original entry on oeis.org

4, 15, 54, 75, 132, 169, 320, 459, 735, 847, 1104, 1250, 1764, 2175, 2904, 3179, 3780, 4107, 5200, 6027, 7425, 7935, 9024, 9604, 11492, 12879, 15162, 15979, 17700, 18605, 21504, 23595, 26979, 28175, 30672, 31974, 36100, 39039, 43740, 45387, 48804
Offset: 1

Views

Author

Keywords

Comments

The sequence members are the third of the average of a set of smallest cubes, if integer.

Examples

			A third of the average of the first cube, A164577(1)/3=1/3, is not an integer and does not contribute to the sequence.
A third of the average of the first two cubes, A164577(2)/3=4, is an integer and defines a(1)=4 of the sequence.
		

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[a=(s+=(n^3)/3)/n;If[Mod[a,1]==0,AppendTo[lst,a]],{n,2*5!}]; lst
    LinearRecurrence[{2,-1,-1,2,-1,2,-4,2,2,-4,2,-1,2,-1,-1,2,-1},{4,15,54,75,132,169,320,459,735,847,1104,1250,1764,2175,2904,3179,3780},50] (* Harvey P. Dale, Apr 06 2016 *)
  • PARI
    Vec(x*(x^14 +x^13 +16*x^12 +10*x^11 +47*x^10 -22*x^9 +61*x^8 +10*x^7 +88*x^6 +8*x^5 +43*x^4 -14*x^3 +28*x^2 +7*x +4) / ((x -1)^4*(x +1)^3*(x^2 -x +1)^3*(x^2 +x +1)^2) + O(x^100)) \\ Colin Barker, Oct 27 2014

Formula

a(n) = +2*a(n-1) -a(n-2) -a(n-3) +2*a(n-4) -a(n-5) +2*a(n-6) -4*a(n-7) +2*a(n-8) +2*a(n-9) -4*a(n-10) +2*a(n-11) -a(n-12) +2*a(n-13) -a(n-14) -a(n-15) +2*a(n-16) -a(n-17). - R. J. Mathar, Jan 25 2011
G.f.: x*(x^14 +x^13 +16*x^12 +10*x^11 +47*x^10 -22*x^9 +61*x^8 +10*x^7 +88*x^6 +8*x^5 +43*x^4 -14*x^3 +28*x^2 +7*x +4) / ((x -1)^4*(x +1)^3*(x^2 -x +1)^3*(x^2 +x +1)^2). - Colin Barker, Oct 27 2014

Extensions

Edited by R. J. Mathar, Aug 20 2009
Showing 1-6 of 6 results.