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.

A173961 Averages of two consecutive even cubes: (n^3 + (n+2)^3)/2.

Original entry on oeis.org

4, 36, 140, 364, 756, 1364, 2236, 3420, 4964, 6916, 9324, 12236, 15700, 19764, 24476, 29884, 36036, 42980, 50764, 59436, 69044, 79636, 91260, 103964, 117796, 132804, 149036, 166540, 185364, 205556, 227164, 250236, 274820, 300964, 328716, 358124, 389236, 422100
Offset: 1

Views

Author

Keywords

Examples

			(0^3+2^3)/2=4, (2^3+4^3)/2=36, ...
		

Crossrefs

Programs

  • Magma
    I:=[4, 36, 140, 364]; [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..40]]; // Vincenzo Librandi, Jul 02 2012
  • Mathematica
    f[n_]:=(n^3+(n+2)^3)/2;Table[f[n],{n,0,5!,2}]
    CoefficientList[Series[(4+20*x+20*x^2+4*x^3)/(1-4*x+6*x^2-4*x^3+x^4),{x,0,40}],x] (* Vincenzo Librandi, Jul 02 2012 *)
  • PARI
    a(n)=4*n*(2*n^2-3*n+3)-4 \\ Charles R Greathouse IV, Jan 02 2012
    

Formula

G.f.: x*(4+20*x+20*x^2+4*x^3)/(1-4*x+6*x^2-4*x^3+x^4). - Colin Barker, Jan 04 2012
a(n) = 8*n^3 - 12*n^2 + 12*n - 4. - Charles R Greathouse IV, Jan 02 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jul 02 2012
a(n) = 4*A005898(n-1).
E.g.f.: 4 + 4*exp(x)*(-1 + 2*x + 3*x^2 + 2*x^3). - Elmo R. Oliveira, Aug 23 2025

A173962 Averages of two consecutive odd cubes; a(n) = (n^3 + (n+2)^3)/2.

Original entry on oeis.org

14, 76, 234, 536, 1030, 1764, 2786, 4144, 5886, 8060, 10714, 13896, 17654, 22036, 27090, 32864, 39406, 46764, 54986, 64120, 74214, 85316, 97474, 110736, 125150, 140764, 157626, 175784, 195286, 216180, 238514, 262336, 287694, 314636, 343210, 373464, 405446
Offset: 1

Views

Author

Keywords

Examples

			(1^3 + 3^3)/2 = 14, ...
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=(n^3+(n+2)^3)/2;Table[f[n],{n,1,6!,2}]
    Mean/@Partition[Range[1,81,2]^3,2,1] (* Harvey P. Dale, Apr 20 2015 *)
  • PARI
    Vec(2*x*(7*x^2+10*x+7)/(x-1)^4 + O(x^100)) \\ Colin Barker, Jan 17 2015

Formula

From Colin Barker, Jan 17 2015: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: 2*x*(7*x^2+10*x+7)/(x-1)^4. (End)
From Elmo R. Oliveira, Aug 23 2025: (Start)
a(n) = 2*n*(4*n^2 + 3) = A271636(n)/2.
E.g.f.: 2*exp(x)*x*(7 + 12*x + 4*x^2). (End)

A173965 Averages of four consecutive cubes.

Original entry on oeis.org

2, 9, 25, 56, 108, 187, 299, 450, 646, 893, 1197, 1564, 2000, 2511, 3103, 3782, 4554, 5425, 6401, 7488, 8692, 10019, 11475, 13066, 14798, 16677, 18709, 20900, 23256, 25783, 28487, 31374, 34450, 37721, 41193, 44872, 48764, 52875, 57211, 61778, 66582, 71629, 76925
Offset: 1

Views

Author

Keywords

Examples

			(0^3+1^3+2^3+3^3)/4 = 9, ...
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=(n^3+(n+1)^3+(n+2)^3+(n+3)^3)/4;Table[f[n],{n,-1,5!}]

Formula

From R. J. Mathar, Mar 31 2010: (Start)
a(n) = (2*n-1)*(n^2-n+4)/2 = (2*n-1)*A089071(n+1).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: x*(1+x)*(2*x^2-x+2)/(x-1)^4. (End)
E.g.f.: 2 + exp(x)*(-4 + 8*x + 3*x^2 + 2*x^3)/2. - Elmo R. Oliveira, Aug 23 2025

Extensions

More terms from Elmo R. Oliveira, Aug 23 2025

A272527 Numbers k such that prime(k) - 2 is the average of four consecutive odd squares.

Original entry on oeis.org

9, 14, 20, 28, 36, 56, 67, 94, 124, 155, 173, 192, 213, 230, 253, 344, 395, 475, 504, 534, 596, 725, 759, 795, 1230, 1359, 1449, 1549, 1596, 1647, 1688, 1745, 1798, 2005, 2119, 2164, 2335, 2395, 2457, 2759, 2885, 2952, 3340, 3627, 3696, 3835, 3909, 3987, 4438
Offset: 1

Views

Author

Michel Lagneau, May 02 2016

Keywords

Comments

The numbers prime(k)- 2 are a subsequence of A173960 (averages of four consecutive odd squares, or numbers of form 4*m^2+8*m+9), and also subsequence of A040976 (numbers prime(n) - 2). So, a(n) are the indices k such prime(k) are of the form 4*m^2+8*m+11 with the corresponding m = {1, 2, 3, 4, 5, 7, 8, 10, 12, 14, 15, 16, 17, 18, 19, 23, 25, 28,...}.
The sequence A173960 and the subsequence prime(a(n)) - 2 appear in a diagonal straight line in the Ulam spiral (see the illustration).

Examples

			a(1) = 9 because prime(9) - 2 = 23 - 2 = 21, and (1^2 + 3^2 + 5^2 + 7^2)/4 = 21;
a(2) = 14 because prime(14) - 2 = 43 - 2 = 41, and (3^2 + 5^2 + 7^2 + 9^2)/4 = 41.
		

Crossrefs

Programs

  • Maple
    for n from 9 to 1000 do:
    p:=ithprime(n)-2:
    for m from 1 by 2 to p do:
      s:=(m^2+(m+2)^2+(m+4)^2+(m+6)^2)/4:
      if s=p then printf(`%d, `,n):else fi:
    od:
    od:
  • Mathematica
    PrimePi@ Select[(#^2 + (# + 2)^2 + (# + 4)^2 + (# + 6)^2)/4 &@ Range@ 210 + 2, PrimeQ] (* Michael De Vlieger, May 02 2016 *)
Showing 1-4 of 4 results.