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.

Previous Showing 11-18 of 18 results.

A128862 Numbers simultaneously triangular and centered triangular.

Original entry on oeis.org

1, 10, 136, 1891, 26335, 366796, 5108806, 71156485, 991081981, 13803991246, 192264795460, 2677903145191, 37298379237211, 519499406175760, 7235693307223426, 100780206894952201, 1403687203222107385, 19550840638214551186, 272308081731781609216
Offset: 1

Views

Author

Steven Schlicker, Apr 24 2007

Keywords

Comments

A129803 is an essentially identical sequence. - R. J. Mathar, Jun 13 2008

Examples

			a(2)=10 because 10 is the third triangular number and the fourth centered triangular number.
		

Crossrefs

Intersection of A000217 and A005448.

Programs

  • Maple
    CP := n -> 1+1/2*3*(n^2-n): N:=10: u:=2: v:=1: x:=3: y:=1: k_pcp:=[1]: for i from 1 to N do tempx:=x; tempy:=y; x:=tempx*u+3*tempy*v: y:=tempx*v+tempy*u: s:=(y+1)/2: k_pcp:=[op(k_pcp),CP(s)]: end do: k_pcp;
  • Mathematica
    Rest@ CoefficientList[Series[x (1 - 5 x + x^2)/((1 - x) (1 - 14 x + x^2)), {x, 0, 19}], x] (* Michael De Vlieger, Jul 19 2023 *)

Formula

Define x(n) and y(n) by (3+sqrt(3))*(2+sqrt(3))^n = x(n) + y(n)*sqrt(3); let s(n) = (y(n)+1)/2; then a(n) = (1/2)*(2+3*(s(n)^2-s(n))).
a(n) = (3*A001570(n) + 1)/4. - Ralf Stephan, May 20 2007
From Richard Choulet, Oct 01 2007: (Start)
a(n+2) = 14*a(n+1) - a(n) - 3.
a(n+1) = 7*a(n) - 3/2 + (1/2)*sqrt(192*a(n)^2 - 96*a(n) - 15).
G.f.: x*(1-5*x+x^2)/((1-x)*(1-14*x+x^2)). (End)

Extensions

Offset set to 1 by R. J. Mathar, Apr 28 2020
More terms from Michel Marcus, Jan 20 2021

A130423 Main diagonal of array A[k,n] = n-th sum of 3 consecutive k-gonal numbers, k>2.

Original entry on oeis.org

4, 14, 39, 88, 170, 294, 469, 704, 1008, 1390, 1859, 2424, 3094, 3878, 4785, 5824, 7004, 8334, 9823, 11480, 13314, 15334, 17549, 19968, 22600, 25454, 28539, 31864, 35438, 39270, 43369, 47744, 52404, 57358, 62615, 68184, 74074, 80294, 86853
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2007

Keywords

Comments

The first row of the array is the sum of 3 consecutive triangular numbers = A000217(n) + A000217(n+1) + A000217(n+2) = Centered triangular numbers: 3*n*(n-1)/2 + 1, for n>1. The second row of the array is the sum of 3 consecutive squares = Number of points on surface of square pyramid: 3*n^2 + 2 (n>1). The first column of the array is k+1 = 4, 5, 6, 7, 8, 9, ... The second column of the array is A016825 = 4*n + 2 (for n>2). The third column of the array is A017377 = 10*n + 9 (for n>0).

Examples

			The array begins:
k / A[k,n]
3.|.4.10.19.31..46..64..85.109.136.166....=A005448(n+1).
4.|.5.14.29..50..77.110.149.194.245.302...=A005918(n).
5.|.6.18.39..69.108.156.213.279.354.438...=A129863(n).
6.|.7.22.49..88.139.202.277.364.463.574...
7.|.8.26.59.107.170.248.341.449.572.710...
8.|.9.30.69.126.201.294.405.534.681.846...
		

Crossrefs

Programs

  • Magma
    I:=[4, 14, 39, 88]; [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, Jun 28 2012
  • Maple
    P := proc(k,n) n*((k-2)*n-k+4)/2 ; end: A := proc(k,n) add( P(k,i),i=n..n+2) ; end: A130423 := proc(n) A(n+3,n) ; end: seq(A130423(n),n=0..40) ; # R. J. Mathar, Jun 14 2007
  • Mathematica
    CoefficientList[Series[(4-2*x+7*x^2)/(1-x)^4,{x,0,40}],x] (* Vincenzo Librandi, Jun 28 2012 *)
    Table[n (3n^2-3n+8)/2,{n,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{4,14,39,88},40] (* Harvey P. Dale, Aug 15 2012 *)

Formula

a(n) = A[n+2,n] = P(k+2,n) + P(k+2,n+1) + P(k+2,n+2) where P(k,n) = k*((n-2)*k - (n-4))/2.
a(n) = n*(3*n^2-3*n+8)/2. G.f.: x*(4-2*x+7*x^2)/(1-x)^4. [Colin Barker, Apr 30 2012]
a(1)=4, a(2)=14, a(3)=39, a(4)=88, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, Aug 15 2012

Extensions

More terms from R. J. Mathar, Jun 14 2007

A133161 Indices of the triangular numbers which are also centered triangular number.

Original entry on oeis.org

1, 4, 16, 61, 229, 856, 3196, 11929, 44521, 166156, 620104, 2314261, 8636941, 32233504, 120297076, 448954801, 1675522129, 6253133716, 23337012736, 87094917229, 325042656181, 1213075707496, 4527260173804, 16895964987721
Offset: 1

Views

Author

Richard Choulet, Oct 09 2007

Keywords

Comments

Also, indices of the triangular numbers which are sums of three consecutive triangular numbers (see A129803).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,-5,1},{1,4,16},30] (* Harvey P. Dale, Aug 29 2017 *)

Formula

a(n+2)=4*a(n+1)-a(n)+1.
a(n+1)=2*a(n)+0.5+0.5*(12*a(n)^2+12*a(n)-15)^0.5.
G.f.: x*(1-x+x^2)/(1-x)/(1-4*x+x^2). - R. J. Mathar, Oct 24 2007
a(n)-a(n-1)= A005320(n-1). - R. J. Mathar, Mar 14 2016

A129109 Sums of three consecutive hexagonal numbers.

Original entry on oeis.org

7, 22, 49, 88, 139, 202, 277, 364, 463, 574, 697, 832, 979, 1138, 1309, 1492, 1687, 1894, 2113, 2344, 2587, 2842, 3109, 3388, 3679, 3982, 4297, 4624, 4963, 5314, 5677, 6052, 6439, 6838, 7249, 7672, 8107, 8554, 9013, 9484, 9967, 10462, 10969, 11488, 12019, 12562
Offset: 0

Views

Author

Jonathan Vos Post, May 24 2007

Keywords

Comments

Arises in hexagonal number analog to A129803 Triangular numbers which are the sum of three consecutive triangular numbers. What are the hexagonal numbers which are the sum of three consecutive hexagonal numbers? Prime for a(0) = 7, a(4) = 139, a(6) = 277, a(8) = 463, a(18) = 2113, a(22) = 3109, a(26) = 4297, a(38) = 9013, a(40) = 9967.

Examples

			a(0) = H(0) + H(1) + H(2) = 0 + 1 + 6 = 7 = 6*0^2 + 9*0 + 7.
a(1) = H(1) + H(2) + H(3) = 1 + 6 + 15 = 22 = 6*1^2 + 9*1 + 7.
a(2) = H(2) + H(3) + H(4) = 6 + 15 + 28 = 49 = 6*2^2 + 9*2 + 7.
		

Crossrefs

Programs

  • Magma
    I:=[7,22,49]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 20 2012
    
  • Mathematica
    LinearRecurrence[{3,-3,1},{7,22,49},50] (* Vincenzo Librandi, Feb 20 2012 *)
    Total/@Partition[PolygonalNumber[6,Range[0,50]],3,1] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 14 2020 *)
  • PARI
    a(n)=6*n^2+9*n+7 \\ Charles R Greathouse IV, Feb 20 2012

Formula

a(n) = H(n) + H(n+1) + H(n+2) where H(n) = A000384(n) = n*(2*n-1).
a(n) = 6*n^2 + 9*n + 7.
From Colin Barker, Feb 20 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (7 + x + 4*x^2)/(1-x)^3. (End)
E.g.f.: (7 + 15*x + 6*x^2)*exp(x). - Elmo R. Oliveira, Nov 16 2024

A129111 Sums of three consecutive heptagonal numbers.

Original entry on oeis.org

8, 26, 59, 107, 170, 248, 341, 449, 572, 710, 863, 1031, 1214, 1412, 1625, 1853, 2096, 2354, 2627, 2915, 3218, 3536, 3869, 4217, 4580, 4958, 5351, 5759, 6182, 6620, 7073, 7541, 8024, 8522, 9035, 9563, 10106, 10664, 11237, 11825, 12428, 13046, 13679, 14327, 14990
Offset: 0

Views

Author

Jonathan Vos Post, May 24 2007

Keywords

Comments

Arises in heptagonal number analog to A129803 (Triangular numbers which are the sum of three consecutive triangular numbers).
What are the heptagonal numbers which are the sum of three consecutive heptagonal numbers?
Prime for a(2) = 59, a(3) = 107, a(7) = 449, a(10) = 863, a(11) = 1031, a(23) = 4217, a(26) = 5351, a(31) = 7541, a(42) = 13679, a(43) = 14327, a(46) = 16361, a(51) = 20051.

Examples

			a(0) = Hep(0) + Hep(1) + Hep(2) = 0 + 1 + 7 = 8 = (15/2)*0^2 + (21/2)*0 + 8.
a(1) = Hep(1) + Hep(2) + Hep(3) = 1 + 7 + 18 = 26 = (15/2)*1^2 + (21/2)*1 + 8.
a(2) = Hep(2) + Hep(3) + Hep(4) = 7 + 18 + 34 = 59 = (15/2)*2^2 + (21/2)*2 + 8.
		

Crossrefs

Programs

  • Magma
    I:=[8,26,59]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 20 2012
    
  • Mathematica
    LinearRecurrence[{3,-3,1},{8,26,59},50] (* Vincenzo Librandi, Feb 12 2012 *)
  • PARI
    a(n)=3*n*(5*n+7)/2+8 \\ Charles R Greathouse IV, Jun 17 2017
    
  • Python
    def a(n): return 3*n*(5*n+7)//2 + 8
    print([a(n) for n in range(44)]) # Michael S. Branicky, Aug 26 2021

Formula

a(n) = Hep(n) + Hep(n+1) + Hep(n+2) where Hep(n) = A000566(n) = n*(5*n-3)/2.
a(n) = (15/2)*n^2 + (21/2)*n + 8.
From Colin Barker, Feb 20 2012: (Start)
G.f.: (8 + 2*x + 5*x^2)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
E.g.f.: exp(x)*(16 + 36*x + 15*x^2)/2. - Elmo R. Oliveira, Nov 16 2024

A130424 Main diagonal of array A[k,n] = n-th sum of k consecutive k-gonal numbers, k>2.

Original entry on oeis.org

4, 30, 125, 365, 854, 1724, 3135, 5275, 8360, 12634, 18369, 25865, 35450, 47480, 62339, 80439, 102220, 128150, 158725, 194469, 235934, 283700, 338375, 400595, 471024, 550354, 639305, 738625, 849090, 971504, 1106699, 1255535, 1418900
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2007

Keywords

Comments

The first row of the array is the sum of 3 consecutive triangular numbers = A000217(n) + A000217(n+1) + A000217(n+2) = Centered triangular numbers: 3*n*(n-1)/2 + 1, for n>1. The second row of the array is the sum of 4 consecutive squares = n^2 + (n+1)^2 + (n+2)^2 + (n+3)^2 = A027575(n). The third row of the array is the sum of 5 consecutive pentagonal numbers.

Examples

			The array begins:
k / A[k,n]
3.|...4..10..19...31...46...64...85..109.136.166...=A005448(n+1).
4.|..14..30..54...86..126..174..230..294.366.446...=A027575(n).
5.|..40..75.125..190..270..365..475..600.740...
6.|..95.161.251..365..503..665..851.1061.1295...
7.|.196.308.455..637..854.1106.1393.1715.2072...
8.|.364.540.764.1036.1356.1724.2140.2604.3116...
		

Crossrefs

Programs

  • Maple
    P := proc(k,n) n*((k-2)*n-k+4)/2 ; end: A := proc(k,n) add( P(k,i),i=n..n+k-1) ; end: A130424 := proc(n) A(n+3,n) ; end: seq(A130424(n),n=0..40) ; # R. J. Mathar, Oct 28 2007
  • Mathematica
    LinearRecurrence[{5,-10,10,-5,1},{4,30,125,365,854},50] (* Harvey P. Dale, Jun 23 2020 *)

Formula

a(n) = A[n+2,n] = P(k+2,n) + P(k+2,n+1) + P(k+2,n+2) + ... P(k+2,n+k-1) where P(k,n) = k*((n-2)*k - (n-4))/2.
a(n) = (n+2)*(7*n^3-8*n^2+12*n-3)/6. [R. J. Mathar, Oct 30 2008]
G.f.: x*(4+10*x+15*x^2-x^4)/(1-x)^5. [Colin Barker, Sep 08 2012]

Extensions

More terms from R. J. Mathar, Oct 28 2007

A238017 Least triangular number representable as a sum of n consecutive triangular numbers, or -1 if no such triangular number exists.

Original entry on oeis.org

0, 1, 10, 10, 55, -1, 210, 120, 120, 1485, 2145, -1, 2080, -1, -1, 56616, 1326, 12561, -1, 1540, 1540, 21736, -1, -1, 52650, 16653, 4950, 26796, 10440, 12880, 7750, -1, -1, 7140, 7140, 154290, -1, 11476, -1, 214840, -1, -1, 207690, 23252790, -1, -1, 6895041, -1, 750925
Offset: 1

Views

Author

Alex Ratushnyak, Feb 17 2014

Keywords

Examples

			a(5) = 55 because 55 is the least triangular number representable as a sum of five consecutive triangular numbers: 55 = 3 + 6 + 10 + 15 + 21.
a(7) = 210 because 210 is the least triangular number representable as a sum of seven consecutive triangular numbers: 210 = 10 + 15 + 21 + 28 + 36 + 45 + 55.
10 appears twice because 10 = 1 + 3 + 6 and 10 = 0 + 1 + 3 + 6.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 0; a[n_] := Block[{t, x, y, s = Reduce[n*(-1+3*t^2+3*t*n+n^2)/6 == x*(x+1)/2 && x>0 && t >= 0, {t, x}, Integers]}, If[s === False, -1, y = Min[x /. List @ ToRules @ Expand[s /. C[1] -> 1]]; y*(y+1)/2]]; Array[a, 49] (* Giovanni Resta, Mar 02 2014 *)

Extensions

a(6) and a(12)-a(49) from Jon E. Schoenfield and Giovanni Resta, Mar 04 2014

A238018 Least k such that the sum triangular(k) + triangular(k+1) +...+ triangular(k+n-1) is a triangular number, or -1 if no such k exists.

Original entry on oeis.org

0, 0, 1, 0, 2, -1, 4, 1, 0, 12, 14, -1, 11, -1, -1, 76, 3, 28, -1, 1, 0, 33, -1, -1, 52, 22, 4, 29, 11, 13, 5, -1, -1, 1, 0, 74, -1, 3, -1, 83, -1, -1, 76, 1006, -1, -1, 518, -1, 150, -1, -1, 103, 133, 51, 14, 45, 19, -1, 5, -1
Offset: 1

Views

Author

Alex Ratushnyak, Feb 17 2014

Keywords

Examples

			a(5) = 2 because 2 is the least integer such that the sum of 5 consecutive triangular numbers starting with triangular(2) is a triangular number: 55 = 3+6+10+15+21.
a(7) = 4 because 4 is the least integer such that the sum of 7 consecutive triangular numbers starting with triangular(4) is a triangular number: 210 = 10+15+21+28+36+45+55.
		

Crossrefs

Programs

  • Mathematica
    s[n_, k_] := n*(3*k^2 + 3*k*n + n^2 - 1)/6; a[1] = 0; a[n_] := Module[{r}, r = Reduce[ k >= 0 && m >= 0 && 8*s[n, k] + 1 == m^2 , {k, m}, Integers] /. C[1] -> 1 // FullSimplify; If[r === False, -1, k /. {ToRules[r]} // Min]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Feb 26 2014 *)

Extensions

More terms from Jean-François Alcover, Feb 26 2014
Previous Showing 11-18 of 18 results.