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-20 of 52 results. Next

A154138 Indices k such that 3 plus the k-th triangular number is a perfect square.

Original entry on oeis.org

1, 3, 12, 22, 73, 131, 428, 766, 2497, 4467, 14556, 26038, 84841, 151763, 494492, 884542, 2882113, 5155491, 16798188, 30048406, 97907017, 175134947, 570643916, 1020761278, 3325956481, 5949432723, 19385094972, 34675835062, 112984613353
Offset: 1

Views

Author

R. J. Mathar, Oct 18 2009

Keywords

Comments

Also numbers n such that (ceiling(sqrt(n*(n+1)/2)))^2 - n*(n+1)/2 = 3. - Ctibor O. Zizka, Nov 10 2009
Note that 3 is 2nd triangular number A000217(2) = 2(2+1)/2, hence 2nd and n-th triangular numbers sum up to a square. - Zak Seidov, Oct 16 2015

Examples

			1*(1+1)/2+3 = 2^2. 3*(3+1)/2+3 = 3^2. 12*(12+1)/2+3 = 9^2. 22*(22+1)/2+3 = 16^2.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..2*10^7] | IsSquare(3+n*(n+1)/2)]; // Vincenzo Librandi, Sep 03 2016
    
  • Magma
    [1] cat [n: n in [0..2*10^7] | (Ceiling(Sqrt(n*(n+1)/2)))^2-n*(n+1)/2 eq 3]; // Vincenzo Librandi, Sep 03 2016
  • Mathematica
    a[1]=1;a[2]=3;a[3]=12;a[4]=22;a[n_]:=a[n]=6*a[n-2]-a[n-4]+2;Table[a[n],{n,35}] (* Zak Seidov, Oct 21 2009 *)
    Select[Range[100], ( Ceiling[Sqrt[#*(# + 1)/2]] )^2 - #*(# + 1)/2 == 3 &] (* G. C. Greubel, Sep 02 2016 *)
    Select[Range[0, 2 10^7], IntegerQ[Sqrt[3 + # (# + 1) / 2]] &] (* Vincenzo Librandi, Sep 03 2016 *)
  • PARI
    for(n=0, 1e10, if(issquare(3+n*(n+1)/2), print1(n", "))) \\ Altug Alkan, Oct 16 2015
    

Formula

{k: 3+k*(k+1)/2 in A000290}.
Conjectures:
a(n) = +a(n-1) +6*a(n-2) -6*a(n-3) -a(n-4) +a(n-5);
G.f.: x*(1 + 2*x + 3*x^2 - 2*x^3 - 2*x^4)/((1-x)*(x^2-2*x-1)*(x^2+2*x-1)). [Comment from Zak Seidov, Oct 21 2009: I believe both of these conjectures are correct.]
a(1..4)=(1,3,12,22); a(n>4)=6*a(n-2)-a(n-4)+2. [Zak Seidov, Oct 21 2009]

Extensions

More terms from Zak Seidov, Oct 21 2009

A175035 Offsets i such that i + n*(n+1)/2 is a perfect square for some positive integer n.

Original entry on oeis.org

1, 3, 4, 6, 8, 9, 10, 13, 15, 16, 19, 21, 22, 24, 25, 26, 28, 30, 33, 34, 35, 36, 39, 43, 45, 46, 48, 49, 53, 54, 55, 58, 60, 61, 63, 64, 66, 71, 72, 75, 76, 78, 79, 80, 81, 85, 89, 90, 91, 93, 94, 97, 99, 100, 103, 105, 106, 108, 111, 114, 115, 116, 118, 120
Offset: 1

Views

Author

Ctibor O. Zizka, Nov 10 2009

Keywords

Comments

The ansatz n*(n+1)/2+i=s^2 can be transformed into (2*n+1)^2-2*(2*s)^2 =1-8*i.
A necessary condition for solutions to this Diophantine equation is that D=2 is a quadratic residue of the squarefree part of 8*i-1 (see A057126).
A sufficient condition is then available by a sequence of tests on the continued fractions of a quadratic surd that originates from a solution of this congruence.
See Mollin and Matthews for details. - R. J. Mathar, Nov 16 2009

Crossrefs

Programs

  • Mathematica
    Take[Rest[Ceiling[Sqrt[#]]^2-#&/@Accumulate[Range[1000]]//Union],70] (* Harvey P. Dale, Sep 07 2019 *)
  • PARI
    is(n)=#bnfisintnorm(bnfinit(z^2-8),-8*n+1) /* Ralf Stephan, Oct 14 2013 */

Extensions

Extended by R. J. Mathar, Nov 26 2009

A098586 a(n) = (1/2) * (5*P(n+1) + P(n) - 1), where P(k) are the Pell numbers A000129.

Original entry on oeis.org

2, 5, 13, 32, 78, 189, 457, 1104, 2666, 6437, 15541, 37520, 90582, 218685, 527953, 1274592, 3077138, 7428869, 17934877, 43298624, 104532126, 252362877, 609257881, 1470878640, 3551015162, 8572908965, 20696833093, 49966575152, 120629983398, 291226541949
Offset: 0

Views

Author

Creighton Dement, Oct 03 2004

Keywords

Crossrefs

Programs

  • Magma
    I:=[2,5,13]; [n le 3 select I[n] else 3*Self(n-1) - Self(n-2) - Self(n-3): n in [1..30]]; // G. C. Greubel, Feb 03 2018
  • Maple
    A:= LREtools[REtoproc](a(n) = 3*a(n-1) - a(n-2) - a(n-3), a(n), {a(0)=2, a(1)=5, a(2)=13}):
    seq(A(n),n=0..100); # Robert Israel, Aug 26 2014
  • Mathematica
    LinearRecurrence[{3, -1, -1}, {2, 5, 13}, 28] (* Hermann Stamm-Wilbrandt, Aug 26 2014 *)
    CoefficientList[Series[(2-x)/((1-x)*(1-2*x-x^2)), {x,0,50}], x] (* G. C. Greubel, Feb 03 2018 *)
  • PARI
    Vec((2-x)/((1-x)*(1-2*x-x^2)) + O(x^50)) \\ Colin Barker, Mar 16 2016
    

Formula

a(n) = 3*a(n-1) - a(n-2) - a(n-3) with a(0)=2, a(1)=5, a(2)=13. - Hermann Stamm-Wilbrandt, Aug 26 2014
G.f.: (2-x)/((1-x)*(1-2*x-x^2)). - Robert Israel, Aug 26 2014
a(n) = 7*a(n-2) - 7*a(n-4) + a(n-6), for n>5. - Hermann Stamm-Wilbrandt, Aug 27 2014
a(2*n-1) = A006451(2*n), for n>0. - Hermann Stamm-Wilbrandt, Aug 27 2014
a(2*n) = A124124(2*n+2). - Hermann Stamm-Wilbrandt, Aug 27 2014
a(n) = (-2+(5-3*sqrt(2))*(1-sqrt(2))^n + (1+sqrt(2))^n*(5+3*sqrt(2)))/4. - Colin Barker, Mar 16 2016

Extensions

Formula supplied by Thomas Baruchel, Oct 03 2004
More terms from Emeric Deutsch, Nov 17 2004

A154139 Indices k such that 4 plus the k-th triangular number is a perfect square.

Original entry on oeis.org

0, 6, 9, 39, 56, 230, 329, 1343, 1920, 7830, 11193, 45639, 65240, 266006, 380249, 1550399, 2216256, 9036390, 12917289, 52667943, 75287480, 306971270, 438807593, 1789159679, 2557558080, 10427986806, 14906540889, 60778761159, 86881687256
Offset: 1

Views

Author

R. J. Mathar, Oct 18 2009

Keywords

Comments

Also numbers n such that (ceiling(sqrt(n*(n+1)/2)))^2 - n*(n+1)/2 = 4. - Ctibor O. Zizka, Nov 10 2009

Examples

			0*(0+1)/2+4 = 2^2. 6*(6+1)/2+4 = 5^2. 9*(9+1)/2+4 = 7^2. 39*(39+1)/2+4 = 28^2.
		

Crossrefs

Programs

Formula

a(n) = a(n-1) + 6*a(n-2) - 6*a(n-3) - a(n-4) + a(n-5).
G.f.: x^2*(6 +3*x -6*x^2 -x^3)/((1-x)*(x^2-2*x-1)*(x^2+2*x-1)) = 1 + 1/2*(4+11*x)/(x^2-2*x-1) + 1/2/(x-1) + 1/2*(-3+2*x)/(x^2+2*x-1).
For n>4, a(n) = 6*a(n-2) - a(n-4) + 2. - Ctibor O. Zizka, Nov 10 2009

Extensions

a(17)-a(18) from Emeric Deutsch, Oct 31 2009
a(19)-a(25) from Donovan Johnson, Nov 01 2010
More terms from Max Alekseyev, Jan 24 2012

A229131 Numbers k such that the distance between the k-th triangular number and the nearest square is exactly 1.

Original entry on oeis.org

1, 2, 4, 5, 15, 25, 32, 90, 148, 189, 527, 865, 1104, 3074, 5044, 6437, 17919, 29401, 37520, 104442, 171364, 218685, 608735, 998785, 1274592, 3547970, 5821348, 7428869, 20679087, 33929305, 43298624
Offset: 1

Views

Author

Ralf Stephan, Sep 15 2013

Keywords

Comments

The k-th triangular number (A000217(k)) is a square plus or minus one.
Union of A006451 (k-th triangular number is a square minus one) and A072221 (k-th triangular number is a square plus one).

Examples

			A000217(4)=10 and 10 - 3^2 = 1 so 4 is in the sequence.
A000217(5)=15 and 4^2 - 15 = 1 so 5 is in the sequence.
		

Crossrefs

Programs

  • PARI
    for(n=1,10^8,for(i=-1,1,f=0;if(i&&issquare(n*(n+1)/2+i),f=1;break));if(f,print1(n,",")))

Formula

G.f.: (-x^7 + 2*x^6 - 2*x^5 + 4*x^4 - 5*x^3 + 2*x^2 + x + 1)/((1-6*x^3+x^6)*(1-x)) (conjectured).

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.

A128549 Difference between triangular number and next perfect square.

Original entry on oeis.org

3, 1, 3, 6, 1, 4, 8, 13, 4, 9, 15, 3, 9, 16, 1, 8, 16, 25, 6, 15, 25, 3, 13, 24, 36, 10, 22, 35, 6, 19, 33, 1, 15, 30, 46, 10, 26, 43, 4, 21, 39, 58, 15, 34, 54, 8, 28, 49, 71, 21, 43, 66, 13, 36, 60, 4, 28, 53, 79, 19, 45, 72, 9, 36, 64, 93, 26, 55, 85, 15, 45, 76, 3, 34, 66, 99, 22
Offset: 1

Views

Author

Zak Seidov, May 08 2007

Keywords

Comments

If a(n)=1 then such n gives the sequence A006451 (triangular numbers whose distance to the nearest bigger perfect square is 1). [From Ctibor O. Zizka, Oct 07 2009]

Examples

			a(1)=2^2-1(1+1)/2=3, a(2)=2^2-2(2+1)/2=1, a(3)=3^2-3(3+1)/2=3, a(3)=4^2-4(4+1)/2=6.
		

Crossrefs

Programs

  • Maple
    f:= n -> (floor(sqrt(n*(n+1)/2))+1)^2-n*(n+1)/2:
    map(f, [$1..100]); # Robert Israel, Jan 21 2020
  • Mathematica
    Table[(Floor[Sqrt[n(n+1)/2]]+1)^2-n(n+1)/2,{n,100}]
    (Floor[Sqrt[#]]+1)^2-#&/@Accumulate[Range[100]] (* Harvey P. Dale, Oct 15 2014 *)
  • Python
    from math import isqrt
    def A128549(n): return (isqrt(m:=n*(n+1)>>1)+1)**2-m # Chai Wah Wu, Jun 01 2024

Formula

a(n) = (floor(sqrt(n(n+1)/2))+1)^2-n(n+1)/2.

A154140 Indices k such that 6 plus the k-th triangular number is a perfect square.

Original entry on oeis.org

2, 4, 19, 29, 114, 172, 667, 1005, 3890, 5860, 22675, 34157, 132162, 199084, 770299, 1160349, 4489634, 6763012, 26167507, 39417725, 152515410, 229743340, 888924955, 1339042317, 5181034322, 7804510564, 30197280979, 45488021069, 176002651554, 265123615852
Offset: 1

Views

Author

R. J. Mathar, Oct 18 2009

Keywords

Comments

In general, indices k such that A001109(2j) plus the k-th triangular number is a perfect square may be found as follows:
b(2n-1) = A001652(n+j-1) - A001653(n-j);
b(2n) = A001652(n-j-1) + A001653(n+j);
Indices k such that A001109(2j-1) plus the k-th triangular number is a perfect square may be found as follows:
b(2n-1) = A001652(n+j-1) - A001653(n-j+1);
b(2n) = A001652(n-j) + A001653(n+j). - Charlie Marion, Mar 10 2011

Examples

			2*(2+1)/2+6 = 3^2. 4*(4+1)/2+6 = 4^2. 19*(19+1)/2+6 = 14^2. 29*(29+1)/2+6 = 21^2.
		

Crossrefs

Programs

  • Magma
    [2] cat [n: n in [0..2*10^7] | (Ceiling(Sqrt(n*(n + 1)/2)) )^2 - n*(n + 1)/2 eq  6]; // Vincenzo Librandi, Sep 03 2016
  • Mathematica
    LinearRecurrence[{1,6,-6,-1,1},{2,4,19,29,114},40] (* Following first conjecture *) (* Harvey P. Dale, Apr 11 2016 *)
    Join[{2}, Select[Range[1, 1010], ( Ceiling[Sqrt[#*(# + 1)/2]] )^2 - #*(# + 1)/2 == 6 &] ] (* G. C. Greubel, Sep 03 2016 *)

Formula

{k: 6+k*(k+1)/2 in A000290}.
a(2*n-1) = A001652(n) - A001653(n-1).
a(2*n) = A001652(n-2) + A001653(n+1).
Conjectures: (Start)
a(n) = +a(n-1) +6*a(n-2) -6*a(n-3) -a(n-4) +a(n-5).
G.f.: x*(2 +2*x +3*x^2 -2*x^3 -3*x^4)/((1-x)* (x^2-2*x-1)* (x^2+2*x-1))
G.f.: ( 6 + (-1 -4*x)/(x^2+2*x-1) + (6 +13*x)/(x^2-2*x-1) + 1/(x-1) )/2. (End)
a(1..4) = (2,4,19,29); a(n) = 6*a(n-2) - a(n-4) + 2, for n > 4. - Ctibor O. Zizka, Nov 10 2009

Extensions

a(17)-a(24) from Donovan Johnson, Nov 01 2010
a(25)-a(30) from Lars Blomberg, Jul 07 2015

A154141 Indices k such that 8 plus the k-th triangular number is a perfect square.

Original entry on oeis.org

1, 7, 16, 46, 97, 271, 568, 1582, 3313, 9223, 19312, 53758, 112561, 313327, 656056, 1826206, 3823777, 10643911, 22286608, 62037262, 129895873, 361579663, 757088632, 2107440718, 4412635921, 12283064647, 25718726896, 71590947166, 149899725457, 417262618351
Offset: 1

Views

Author

R. J. Mathar, Oct 18 2009

Keywords

Comments

Also numbers n such that (ceiling(sqrt(n*(n+1)/2)))^2 - n*(n+1)/2 = 8. - Ctibor O. Zizka, Nov 10 2009

Examples

			1*(1+1)/2+8 = 3^2. 7*(7+1)/2+8 = 6^2. 16*(16+1)/2+8 = 12^2. 46*(46+1)/2+8 = 33^2.
		

Crossrefs

Programs

  • Magma
    [1] cat [n: n in [0..2*10^7] | (Ceiling(Sqrt(n*(n+ 1)/2)))^2-n*(n+1)/2 eq  8]; // Vincenzo Librandi, Sep 03 2016
    
  • Magma
    [n: n in [0..2*10^7] | IsSquare(8+n*(n+1)/2)]; // Vincenzo Librandi, Sep 03 2016
  • Mathematica
    Join[{1}, Select[Range[0, 1000], ( Ceiling[Sqrt[#*(# + 1)/2]] )^2 - #*(# + 1)/2 == 8 &]] (* G. C. Greubel, Sep 03 2016 *)
    Select[Range[0, 2 10^7], IntegerQ[Sqrt[8 + # (# + 1) / 2]] &] (* Vincenzo Librandi, Sep 03 2016 *)
  • PARI
    isok(n) = issquare(8 + n*(n+1)/2); \\ Michel Marcus, Sep 03 2016
    

Formula

{k: 8+k*(k+1)/2 in A000290}
Conjectures: (Start)
a(n) = a(n-1) + 6*a(n-2) - 6*a(n-3) - a(n-4) + a(n-5).
G.f.: x*(1 +6*x +3*x^2 -6*x^3 -2*x^4)/((1-x) * (x^2-2*x-1) * (x^2+2*x-1)).
G.f.: ( 4 + 1/(x-1) - 3/(x^2+2*x-1) + (6+15*x)/(x^2-2*x-1) )/2. (End)
a(1..4) = (1,7,16,46); a(n) = 6*a(n-2) - a(n-4) + 2, for n>4. - Ctibor O. Zizka, Nov 10 2009

Extensions

a(17)-a(24) from Donovan Johnson, Nov 01 2010
a(25)-a(30) from Lars Blomberg, Jul 07 2015

A154143 Indices k such that 10 plus the k-th triangular number is a perfect square.

Original entry on oeis.org

3, 5, 26, 36, 155, 213, 906, 1244, 5283, 7253, 30794, 42276, 179483, 246405, 1046106, 1436156, 6097155, 8370533, 35536826, 48787044, 207123803, 284351733, 1207205994, 1657323356, 7036112163, 9659588405, 41009466986, 56300207076, 239020689755, 328141654053
Offset: 1

Views

Author

R. J. Mathar, Oct 18 2009

Keywords

Examples

			3*(3+1)/2+10 = 4^2. 5*(5+1)/2+10 = 5^2. 26*(26+1)/2+10 = 19^2. 36*(36+1)/2+10 = 26^2.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..2*10^7] | IsSquare(10+n*(n+1)/2)]; // Vincenzo Librandi, Sep 03 2016
    
  • Magma
    [3,5] cat [n: n in [0..2*10^7] | (Ceiling(Sqrt(n*(n+ 1)/2)))^2-n*(n+1)/2 eq 10]; // Vincenzo Librandi, Sep 03 2016
  • Mathematica
    Join[{3, 5}, Select[Range[0, 1000], ( Ceiling[Sqrt[#*(# + 1)/2]] )^2 - #*(# + 1)/2 == 10 &]] (* G. C. Greubel, Sep 03 2016 *)
    Select[Range[0, 2 10^7], IntegerQ[Sqrt[10 + # (# + 1) / 2]] &] (* Vincenzo Librandi, Sep 03 2016 *)
  • PARI
    isok(n) = issquare(10 + n*(n+1)/2); \\ Michel Marcus, Sep 03 2016
    

Formula

{k: 10+k*(k+1)/2 in A000290}.
Conjectures: (Start)
a(n) = a(n-1) + 6*a(n-2) - 6*a(n-3) - a(n-4) + a(n-5).
G.f.: x*(3 +2*x +3*x^2 -2*x^3 -4*x^4)/((1-x) * (x^2-2*x-1) * (x^2+2*x-1))
G.f.: ( 8 + (-1-6*x)/(x^2+2*x-1) + (8+17*x)/(x^2-2*x-1) + 1/(x-1) )/2. (End)
a(1..4) = (3,5,26,36); a(n) = 6*a(n-2) - a(n-4) + 2, for n > 4. - Ctibor O. Zizka, Nov 10 2009

Extensions

a(17)-a(24) from Donovan Johnson, Nov 01 2010
a(25)-a(30) from Lars Blomberg, Jul 07 2015
Previous Showing 11-20 of 52 results. Next