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

A129446 Primes p such that p^2 is a centered triangular number; or primes in A129445.

Original entry on oeis.org

2, 19, 79, 1861, 7741, 1647522841025041
Offset: 1

Views

Author

Alexander Adamchuk, Apr 15 2007, Apr 26 2007

Keywords

Comments

The next terms are too large to include, see the b-file.

Crossrefs

Cf. A005448 (centered triangular numbers).
Cf. A129444 (numbers k such that centered triangular number A005448(k) = 3*k*(k-1)/2 + 1 is a perfect square).
Cf. A129445 (numbers k > 0 such that k^2 is a centered triangular number).

Programs

  • Mathematica
    Do[ f = 3n(n-1)/2 + 1; If[ PrimeQ[ Sqrt[f] ], Print[ Sqrt[f] ] ], {n,1,150000} ]

A129444 Numbers k such that the centered triangular number A005448(k) = 3*k*(k-1)/2 + 1 is a perfect square.

Original entry on oeis.org

0, 1, 2, 7, 16, 65, 154, 639, 1520, 6321, 15042, 62567, 148896, 619345, 1473914, 6130879, 14590240, 60689441, 144428482, 600763527, 1429694576, 5946945825, 14152517274, 58868694719, 140095478160, 582740001361, 1386802264322
Offset: 1

Views

Author

Alexander Adamchuk, Apr 15 2007

Keywords

Comments

Corresponding numbers m > 0 such that m^2 is a centered triangular number are listed in A129445 = {1, 2, 8, 19, 79, 188, 782, 1861, 7741, 18422, 76628, 182359, ...}.

Examples

			G.f. = x^2 + 2*x^3 + 7*x^4 + 16*x^5 + 65*x^6 + 154*x^7 + 639*x^8 + 1520*x^9 + ...
		

Crossrefs

Cf. A005448 (centered triangular numbers).
Cf. A129445 (numbers k > 0 such that k^2 is a centered triangular number).

Programs

  • Magma
    I:=[0,1,2,7,16,65]; [n le 6 select I[n] else 11*Self(n-2) -11*Self(n-4) +Self(n-6): n in [1..40]]; // G. C. Greubel, Feb 07 2024
    
  • Mathematica
    Do[ f = 3n(n-1)/2 + 1; If[ IntegerQ[ Sqrt[f] ], Print[ n ] ], {n,1,150000} ]
    a[1]=0;a[2]=1;a[3]=2;a[4]=7;a[5]=16;a[6]=65;a[n_]:=a[n]=11(a[n-2]-a[n-4])+a[n-6];Table[a[n], {n, 100}] (* Zak Seidov, Apr 17 2007 *)
    LinearRecurrence[{1,10,-10,-1,1},{0,1,2,7,16},30] (* Harvey P. Dale, Dec 06 2012 *)
  • PARI
    {a(n) = my(m); m = if( n<1, 2-n, n-1); (n<1) + (-1)^(n<1) * polcoeff( (x + x^2 - 5*x^3 - x^4) / ((1 - x) * (1 - 10*x^2 + x^4)) + x * O(x^m), m)}; /* Michael Somos, Apr 05 2008 */
    
  • SageMath
    def A129444_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x^2*(1+x-5*x^2-x^3)/((1-x)*(1-10*x^2+x^4)) ).list()
    a=A129444_list(40); a[1:] # G. C. Greubel, Feb 07 2024

Formula

a(n) = 1/2 + sqrt(1/4 + (2/3)*(A129445(n)^2 - 1)).
a(n) = 11*(a(n-2) - a(n-4)) + a(n-6); a(1)=0; a(2)=1; a(3)=2; a(4)=7; a(5)=16; a(6)=65. - Zak Seidov, Apr 17 2007
a(n) = 1 - a(-n+3) for all n in Z. - Michael Somos, Apr 05 2008
G.f.: x^2*(1 + x - 5*x^2 - x^3) / ((1 - x) * (1 - 10*x^2 + x^4)). - Michael Somos, Apr 05 2008
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) - a(n-4) + a(n-5); a(1)=0, a(2)=1, a(3)=2, a(4)=7, a(5)=16. - Harvey P. Dale, Dec 06 2012
a(n) = (1/2)*(2*[n=0] + 1 + ((1+(-1)^n)/2)*(31*b(n/2) - 3*b(n/2 + 1)) + ((1-(-1)^n)/2)*(13*b((n-1)/2) - b((n+1)/2))), where b(n)=A004189(n). - G. C. Greubel, Feb 07 2024

Extensions

More terms from Zak Seidov, Apr 17 2007

A165517 Indices of the least triangular numbers (A000217) for which three consecutive triangular numbers sum to a perfect square (A000290).

Original entry on oeis.org

0, 5, 14, 63, 152, 637, 1518, 6319, 15040, 62565, 148894, 619343, 1473912, 6130877, 14590238, 60689439, 144428480, 600763525, 1429694574, 5946945823, 14152517272, 58868694717, 140095478158, 582740001359, 1386802264320
Offset: 1

Views

Author

Ant King, Sep 25 2009, Oct 01 2009

Keywords

Comments

Those perfect squares that can be expressed as the sum of three consecutive triangular numbers correspond to integer solutions of the equation T(k)+T(k+1)+T(k+2)=s^2, or equivalently to 3k^2 + 9k + 8 = 2s^2. Hence solutions occur whenever (3k^2 + 9k + 8)/2 is a perfect square, or equivalently when s>=2 and sqrt(24s^2 - 15) is congruent to 3 mod 6. This sequence returns the index of the smallest of the 3 triangular numbers, the values of s^2 are given in A165516 and, with the exception of the first term, the values of s are in A129445.

Examples

			The fourth perfect square that can be expressed as the sum of three consecutive triangular numbers is 6241 = T(63) + T(64) + T(65). Hence a(4)=63.
		

Crossrefs

Programs

  • Magma
    I:=[0, 5, 14, 63, 152]; [n le 5 select I[n] else Self(n-1) + 10*Self(n-2) - 10*Self(n-3) - Self(n-4) + Self(n-5): n in [1..50]]; // G. C. Greubel, Oct 21 2018
  • Mathematica
    TriangularNumber[ n_ ]:=1/2 n (n+1);Select[ Range[ 0,10^7 ], IntegerQ[ Sqrt[ TriangularNumber[ # ]+TriangularNumber[ #+1 ]+TriangularNumber[ #+2 ] ] ] & ]
    CoefficientList[Series[x*(x^3 + x^2 - 9*x - 5)/((x - 1)*(x^4 - 10*x^2 + 1)), {x,0,50}], x] (* or *) LinearRecurrence[{1,10,-10,-1,1}, {0, 5, 14, 63, 152}, 50] (* G. C. Greubel, Feb 17 2017 *)
  • PARI
    x='x+O('x^50); concat([0], Vec(x*(x^3 + x^2 - 9*x - 5)/((x - 1)*(x^4 - 10*x^2 + 1)))) \\ G. C. Greubel, Feb 17 2017
    

Formula

a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) - a(n-4) + a(n-5).
G.f.: x(x^3 + x^2 - 9x - 5)/((x-1)(x^4 - 10x^2 + 1)).
a(n) = 10*a(n-2) - a(n-4) + 12. - Zak Seidov, Sep 25 2009

Extensions

a(1) = 0 added by N. J. A. Sloane, Sep 28 2009, at the suggestion of Alexander R. Povolotsky
More terms from Zak Seidov, Sep 25 2009

A085376 Ratio-dependent insertion sequence I(0.36704) (see the link below).

Original entry on oeis.org

1, 3, 11, 30, 109, 297, 1079, 2940, 10681, 29103, 105731, 288090, 1046629, 2851797, 10360559, 28229880, 102558961, 279447003, 1015229051, 2766240150, 10049731549, 27382954497, 99482086439, 271063304820, 984771132841
Offset: 1

Views

Author

John W. Layman, Jun 26 2003

Keywords

Comments

This sequence is the ratio-determined insertion sequence (RDIS) "twin" of I(0.37802)=A080874 and "child" of I(0.33344)=A001835 and I(0.38208)=A001906 in the RDIS recurrence tree (see the link for an explanation of terms). See A082630, A082981, A085348 and A085349 for recent examples of RDIS sequences.
Conjecture: partial sums of A129445. - Sean A. Irvine, Jul 14 2022

Crossrefs

Formula

It is conjectured that a(n) = 10*a(n-2) - a(n-4).
Apparently a(n)*a(n+3) = -3 + a(n+1)*a(n+2). - Ralf Stephan, May 29 2004

A237610 Positive integers k such that x^2 - 10xy + y^2 + k = 0 has integer solutions.

Original entry on oeis.org

8, 15, 20, 23, 24, 32, 47, 60, 71, 72, 80, 87, 92, 95, 96, 116, 128, 135, 152, 159, 167, 180, 188, 191, 200, 207, 212, 215, 216, 239, 240, 263, 276, 284, 288, 303, 311, 320, 335, 344, 348, 359, 368, 375, 380, 383, 384, 392, 404, 423, 431, 447, 456, 464, 479
Offset: 1

Views

Author

Colin Barker, Feb 10 2014

Keywords

Examples

			15 is in the sequence because x^2 - 10xy + y^2 + 15 = 0 has integer solutions, for example (x, y) = (2, 19).
		

Crossrefs

Cf. A072256 (k = 8), A129445 (k = 15), A080806 (k = 20), A074061 (k = 23), A001079 (k = 24).

Programs

  • PARI
    is(n)=m=bnfisintnorm(bnfinit(x^2-10*x+1),-n);#m>0&&denominator(polcoeff(m[1],1))==1 \\ Ralf Stephan, Feb 11 2014

A233450 Numbers n such that 3*T(n)+1 is a square, where T = A000217.

Original entry on oeis.org

0, 1, 6, 15, 64, 153, 638, 1519, 6320, 15041, 62566, 148895, 619344, 1473913, 6130878, 14590239, 60689440, 144428481, 600763526, 1429694575, 5946945824, 14152517273, 58868694718, 140095478159, 582740001360, 1386802264321, 5768531318886, 13727927165055
Offset: 1

Views

Author

Bruno Berselli, Dec 10 2013

Keywords

Comments

For n>1, partial sums of A080872 starting from A080872(1).

Examples

			153 is in the sequence because 3*153*154/2+1 = 188^2.
		

Crossrefs

Sequence A129444 gives n+1.
Cf. A000217, A080872, A129445 (square roots of 3*A000217(a(n))+1), A132596 (numbers m such that 3*A000217(m) is a square).
Cf. numbers m such that k*A000217(m)+1 is a square: A006451 for k=1; m=0 for k=2; this sequence for k=3; A001652 for k=4; A129556 for k=5; A001921 for k=6.

Programs

  • Mathematica
    LinearRecurrence[{1, 10, -10, -1, 1}, {0, 1, 6, 15, 64}, 30]

Formula

G.f.: x^2*(1 + 5*x - x^2 - x^3) / ((1 - x)*(1 - 10*x^2 + x^4)).
a(n) = a(n-1) +10*a(n-2) -10*a(n-3) -a(n-4) +a(n-5) for n>5, a(1)=0, a(2)=1, a(3)=6, a(4)=15, a(5)=64.
a(n) = -1/2 + ( (-3*(-1)^n + 2*sqrt(6))*(5 + 2*sqrt(6))^floor(n/2) - (3*(-1)^n + 2*sqrt(6))*(5 - 2*sqrt(6))^floor(n/2) )/12.

A165516 Perfect squares (A000290) that can be expressed as the sum of three consecutive triangular numbers (A000217).

Original entry on oeis.org

4, 64, 361, 6241, 35344, 611524, 3463321, 59923081, 339370084, 5871850384, 33254804881, 575381414521, 3258631508224, 56381506772644, 319312633001041, 5524812282304561, 31289379402593764, 541375222159074304, 3066039868821187801, 53049246959306977201, 300440617765073810704, 5198284826789924691364
Offset: 1

Views

Author

Ant King, Sep 25 2009, Oct 01 2009

Keywords

Comments

Those perfect squares that can be expressed as the sum of three consecutive triangular numbers correspond to integer solutions of the equation T(k)+T(k+1)+T(k+2)=s^2, or equivalently to 3k^2+9k+8=2s^2. Hence solutions occur whenever 1/2 (3k^2+9k+8) is a perfect square, or equivalently when s>=2 and sqrt(24s^2-15) is congruent to 3 mod 6. Furthermore, with the exception of the first term, the members of this sequence are precisely those perfect squares that are also centered triangular numbers (A005448). For s>=2, the values of s are in A129445, and the corresponding indices of the smallest of the 3 triangular numbers are given in A165517.

Examples

			The fourth perfect square that can be expressed as the sum of three consecutive triangular numbers is 6241 (=T63+T64+T65), and hence a(4)=6241.
		

Crossrefs

Programs

  • Magma
    I:=[4, 64, 361, 6241, 35344]; [n le 5 select I[n] else Self(n-1) + 98*Self(n-2) - 98*Self(n-3) - Self(n-4) + Self(n-5): n in [1..50]]; // G. C. Greubel, Oct 21 2018
  • Mathematica
    Select[Range[2,1.8 10^7],Mod[Sqrt[24#^2-15],6]==3 &]^2
    CoefficientList[Series[(4 + 60 x - 95 x^2 + x^4)/((1 - x) (1 - 10 x + x^2) (1 + 10 x + x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 14 2014 *)
    LinearRecurrence[ {1,98,-98,-1,1}, {4, 64, 361, 6241, 35344}, 50] (* G. C. Greubel, Oct 21 2018 *)
  • PARI
    Vec(O(x^66)+x*(4+60*x-95*x^2+x^4)/((1-x)*(1-10*x+x^2)*(1+10*x+x^2))) \\ Joerg Arndt, Mar 13 2014
    

Formula

a(n) = a(n-1) + 98*a(n-2) - 98*a(n-3) - a(n-4) + a(n-5).
a(n) = 98*a(n-2) - a(n-4) - 30. - Ant King, Dec 09 2010
a(n) = (1/32)*(10 -3*(sqrt(6)-3) * (5-2*sqrt(6))^n + (2+ sqrt(6)) * (-5-2*sqrt(6))^n -(sqrt(6)-2) *(2*sqrt(6)-5)^n + 3*(3+sqrt(6)) *(5+2*sqrt(6))^n).
G.f.: x*(4+60*x-95*x^2+x^4)/((1-x)*(1-10*x+x^2)*(1+10*x+x^2)).
16*a(n) = 5 +9*A072256(n+1) +2*(-1)^n*A054320(n). - R. J. Mathar, Apr 28 2020

Extensions

a(1) = 4 added by N. J. A. Sloane, Sep 28 2009, at the suggestion of Alexander R. Povolotsky
a(16)-a(21) added by Alex Ratushnyak, Mar 12 2014

A249483 Squares (A000290) which are also centered triangular numbers (A005448).

Original entry on oeis.org

1, 4, 64, 361, 6241, 35344, 611524, 3463321, 59923081, 339370084, 5871850384, 33254804881, 575381414521, 3258631508224, 56381506772644, 319312633001041, 5524812282304561, 31289379402593764, 541375222159074304, 3066039868821187801, 53049246959306977201
Offset: 1

Views

Author

Colin Barker, Jan 13 2015

Keywords

Comments

Apart from the first term the same as A165516. - R. J. Mathar, Jan 20 2015

Examples

			64 is in the sequence because the 8th square is 64, which is also the 7th centered triangular number.
		

Crossrefs

Programs

  • Magma
    I:=[1,4,64,361,6241]; [n le 5 select I[n] else Self(n-1)+98*Self(n-2)-98*Self(n-3)-Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Jan 20 2015
  • Mathematica
    CoefficientList[Series[(x^2 - 5 x + 1) (x^2 + 8 x + 1) / ((1 - x) (x^2 - 10 x + 1) (x^2 + 10 x + 1)), {x, 0, 70}], x] (* Vincenzo Librandi, Jan 20 2015 *)
  • PARI
    Vec(-x*(x^2-5*x+1)*(x^2+8*x+1)/((x-1)*(x^2-10*x+1)*(x^2+10*x+1)) + O(x^100))
    

Formula

a(n) = a(n-1)+98*a(n-2)-98*a(n-3)-a(n-4)+a(n-5).
G.f.: -x*(x^2-5*x+1)*(x^2+8*x+1) / ((x-1)*(x^2-10*x+1)*(x^2+10*x+1)).

A257274 Numbers whose square can be written as sum of at least 3 consecutive triangular numbers (A000217).

Original entry on oeis.org

8, 10, 19, 26, 44, 58, 79, 84, 91, 105, 111, 121, 135, 140, 154, 172, 184, 188, 195, 203, 208, 212, 217, 222, 230, 240, 246, 265, 276, 286, 292, 316, 322, 329, 338, 364, 390, 426, 429, 462, 490, 498, 506, 548, 550, 605, 704, 714, 715, 763, 770, 780, 782, 807
Offset: 1

Views

Author

M. F. Hasler, May 02 2015

Keywords

Comments

Any square can trivially be written as sum of two consecutive triangular numbers T = A000217, since T(n-1) + T(n) = n(n-1)/2 + n(n+1)/2 = n*2n/2 = n^2. But it seems nontrivial to determine the squares that can be written as sum of more than 2 consecutive triangular numbers.
Some of these have two different decompositions of this form, e.g., 286^2 = T(13)+...+T(78) = T(75)+...+T(96), 826^2 = T(13)+...+T(159) = T(43)+...+T(160). What is the sequence of these numbers?
The terms > 2 of A129445, numbers k > 0 such that k^2 is a centered triangular number, form a subsequence: they correspond to k^2 = T(n-2) + T(n-1) + T(n), with n in sequence A129444: numbers n such that centered triangular number A005448(n) = 3n(n-1)/2 + 1 is a perfect square.
Terms > 2 of sequence A075870 also form a subsequence, namely the numbers whose square is the sum of four triangular numbers T(n-3)+...+T(n), with n given by twice the terms > 1 of A046090 or A182435.

Examples

			8^2 = T(5)+T(6)+T(7), 10^2 = T(5)+T(6)+T(7)+T(8), 19^2 = T(14)+T(15)+T(16), 26^2 = T(3)+...+T(15), 44^2 = T(13)+...+T(23), ...
		

Programs

  • PARI
    {a=[];(S(n)=binomial(n+2,3)); for(n=1,999,for(k=1,n-3,issquare(S(n)-S(k))&&a=concat(a,sqrtint(S(n)-S(k))))); Set(a)[1..50]}

Extensions

a(14), a(43)-a(54) from Chai Wah Wu, Jan 20 2016
Showing 1-9 of 9 results.