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 21 results. Next

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

Original entry on oeis.org

4, 100, 3364, 114244, 3880900, 131836324, 4478554084, 152139002500, 5168247530884, 175568277047524, 5964153172084900, 202605639573839044, 6882627592338442564, 233806732499933208100, 7942546277405390632804, 269812766699283348307204, 9165691521498228451812100, 311363698964240484013304164
Offset: 1

Views

Author

Ant King, Sep 28 2009

Keywords

Comments

As T(n) + T(n+1) = (n+1)^2 and T(n+2) + T(n+3) = (n+3)^2, it follows that the equation T(n) + T(n+1) + T(n+2) + T(n+3) = s^2 becomes (n+1)^2 + (n+3)^2 = s^2. Hence the solutions to this equation correspond to those Pythagorean triples with shorter legs that differ by two, such as 6^2 + 8^2 = 10^2.
Terms are the squares of the hypotenuses of Pythagorean triangles where other two sides are m and m+2, excepting the initial 4. See A075870. - Richard R. Forberg, Aug 15 2013

Examples

			As the third perfect square that can be expressed as the sum of four consecutive triangular numbers is 3364 = T(39) + T(40) + T(41) + T(42), we have a(3)=3364.
The first term, 4, equals T(-1) + T(0) + T(1) + T(2).
		

Crossrefs

Cf. A000290, A000217, A165516 (squares that can be expressed as the sum of three consecutive triangular numbers), A029549, A075870.

Programs

  • Magma
    I:=[4,100,3364]; [n le 3 select I[n] else 35*Self(n-1) - 35*Self(n-2) +Self(n-3): n in [1..50]]; // G. C. Greubel, Oct 21 2018
  • Maple
    A165518:=n->(1/2)*(2+(3+2*sqrt(2))^(2*n+1)+(3-2*sqrt(2))^(2*n+1)); seq(A165518(k), k=1..20); # Wesley Ivan Hurt, Oct 24 2013
  • Mathematica
    TriangularNumber[n_]:=1/2 n (n+1); data=Select[Range[10^7],IntegerQ[Sqrt[ TriangularNumber[ # ]+TriangularNumber[ #+1]+TriangularNumber[ #+2]+TriangularNumber[ #+3]]] &];2(#^2+4#+5)&/@data
    t={4, 100}; Do[AppendTo[t, 34 t[[-1]] - t[[-2]] - 32], {20}]; t
    LinearRecurrence[{35,-35,1},{4,100,3364},20] (* Harvey P. Dale, May 22 2012 *)
  • PARI
    x='x+O('x^50); Vec(4*x*(1-10*x+x^2)/((1-x)*(1-34*x+x^2))) \\ G. C. Greubel, Oct 21 2018
    

Formula

a(n) = 35*a(n-1) - 35*a(n-2) + a(n-3).
a(n) = 34*a(n-1) - a(n-2) - 32.
a(n) = (2 + (3+2*sqrt(2))^(2*n+1) + (3-2*sqrt(2))^(2*n+1))/2.
a(n) = ceiling((1/2)*(2 + (3+2*sqrt(2))^(2n+1))).
G.f.: 4*x*(x^2-10*x+1)/((1-x)*(x^2-34*x+1)).
a(n) = 4*A008844(n-1). - R. J. Mathar, Dec 14 2010
a(n) = A075870(n)^2. - Richard R. Forberg, Aug 15 2013

Extensions

Extended by T. D. Noe, Dec 09 2010

A156161 a(n) = 34*a(n-1)-a(n-2)-2312 for n > 2; a(1)=289, a(2)=7225.

Original entry on oeis.org

289, 7225, 243049, 8254129, 280395025, 9525174409, 323575532569, 10992042930625, 373405884106369, 12684808016683609, 430910066683134025, 14638257459209870929, 497269843546452475249, 16892536423120174285225
Offset: 1

Views

Author

Klaus Brockhaus, Feb 09 2009

Keywords

Comments

lim_{n -> infinity} a(n)/a(n-1) = (17+12*sqrt(2)).

Examples

			a(3) = 34*a(2)-a(1)-2312 = 34*7225-289-2312 = 243049.
		

Crossrefs

Second trisection of A156159.
Equals 289*A008844. - Klaus Brockhaus, Sep 23 2009
Cf. A156164 (decimal expansion of (17+12*sqrt(2))).

Programs

  • Mathematica
    RecurrenceTable[{a[1]==289,a[2]==7225,a[n]==34a[n-1]-a[n-2]-2312},a,{n,20}] (* or *) LinearRecurrence[{35,-35,1},{289,7225,243049},20] (* Harvey P. Dale, Dec 11 2013 *)
  • PARI
    {m=14; v=concat([289, 7225], vector(m-2)); for(n=3, m, v[n]=34*v[n-1]-v[n-2]-2312); v}

Formula

a(n) = (578+(867-578*sqrt(2))*(17+12*sqrt(2))^n+(867+578*sqrt(2))*(17-12*sqrt(2))^n)/8.
G.f.: x*(289-2890*x+289*x^2)/((1-x)*(1-34*x+x^2)). [corrected by Klaus Brockhaus, Sep 23 2009]
a(1)=289, a(2)=7225, a(3)=243049, a(n) = 35*a(n-1)-35*a(n-2)+a(n-3). - Harvey P. Dale, Dec 11 2013

A363319 Squares (A000290) and centered squares (A001844) sorted, including duplicates.

Original entry on oeis.org

1, 1, 4, 5, 9, 13, 16, 25, 25, 36, 41, 49, 61, 64, 81, 85, 100, 113, 121, 144, 145, 169, 181, 196, 221, 225, 256, 265, 289, 313, 324, 361, 365, 400, 421, 441, 481, 484, 529, 545, 576, 613, 625, 676, 685, 729, 761, 784, 841, 841, 900, 925, 961, 1013, 1024
Offset: 1

Views

Author

Clark Kimberling, May 27 2023

Keywords

Comments

This sequence consists of the numbers in A363267 arranged in nondecreasing order, including duplicates, which are given by A008844 = (1, 25, 841, 28561, ...).

Crossrefs

Programs

  • Mathematica
    c[1] = 1; c[2] = 1;
    c[n_] := If[OddQ[n], c[n - 2] + n, 2 c[n - 1] - n + 1]
    u = Table[c[n], {n, 1, 120}]  (* A363267 *)
    s = Sort[u] (* this sequence *)

Extensions

Incorrect recurrence removed by Georg Fischer, Aug 14 2023

A383734 Numbers k such that 2+k and 2*k are squares.

Original entry on oeis.org

2, 98, 3362, 114242, 3880898, 131836322, 4478554082, 152139002498, 5168247530882, 175568277047522, 5964153172084898, 202605639573839042, 6882627592338442562, 233806732499933208098, 7942546277405390632802, 269812766699283348307202, 9165691521498228451812098
Offset: 1

Views

Author

Emilio Martín, May 07 2025

Keywords

Comments

The limit of a(n+1)/a(n) is 33.97056... = 17+12*sqrt(2) = (3+2*sqrt(2))^2 (see A156164).

Examples

			98 is a term becouse 98+2=100 is a square and 98*2=196 is a square.
		

Crossrefs

Cf. A382209 (10+k and 10*k are squares).
Cf. A245226 (m such that k+m and k*m are squares).

Programs

  • Mathematica
    LinearRecurrence[{35, -35, 1}, {2, 98, 3362}, 20] (* Amiram Eldar, May 07 2025 *)
  • Python
    from itertools import islice
    def A383734_gen(): # generator of terms
        x, y = 1, 7
        while True:
            yield 2*x**2
            x, y = y, 6*y - x
    A383734_list = list(islice(A383734_gen(), 100))

Formula

a(n) = (1/2) * ((3+2*sqrt(2))^(2*n-1) + (3-2*sqrt(2))^(1-2*n)) - 1.
a(n) = -2*sqrt(2)*sinh(n*log(17+12*sqrt(2))) + 3*cosh(n*log(17+12*sqrt(2))) - 1.
a(n) = 2*A002315(n-1)^2.
a(n) = A075870(n)^2 - 2.
a(n) = 34*a(n-1) - a(n-2) + 32.
G.f.: 2 * (1 + 14*x + x^2) / ((1 - x)*(1 - 34*x + x^2)). - Stefano Spezia, May 08 2025

A008845 Numbers k such that k+1 and k/2+1 are squares.

Original entry on oeis.org

0, 48, 1680, 57120, 1940448, 65918160, 2239277040, 76069501248, 2584123765440, 87784138523760, 2982076586042448, 101302819786919520, 3441313796169221280, 116903366249966604048, 3971273138702695316400, 134906383349641674153600, 4582845760749114225906048
Offset: 0

Views

Author

Keywords

Examples

			48+1 = 49 = 7^2 and 48/2+1 = 24+1 = 25 = 5^2.
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 256.

Programs

  • GAP
    a:=[0,48,1680];; for n in [4..20] do a[n]:=35*a[n-1]-35*a[n-2] +a[n-3]; od; a; # G. C. Greubel, Sep 13 2019
  • Magma
    I:=[0,48]; [n le 2 select I[n] else  34*Self(n-1) - Self(n-2)+48: n in [1..20]]; // Vincenzo Librandi, Mar 03 2016
    
  • Maple
    seq(coeff(series(48*x/((1-x)*(1-34*x+x^2)), x, n+1), x, n), n = 0..20); # G. C. Greubel, Sep 13 2019
  • Mathematica
    LinearRecurrence[{35,-35,1},{0,48,1680},20] (* Harvey P. Dale, May 24 2014 *)
  • PARI
    concat(0, Vec(48*x/((1-x)*(1-34*x+x^2)) + O(x^20))) \\ Colin Barker, Mar 02 2016
    
  • Sage
    def A008845_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(48*x/((1-x)*(1-34*x+x^2))).list()
    A008845_list(20) # G. C. Greubel, Sep 13 2019
    

Formula

a(n) = 2*(A008844(n)-1) = 16*A075528(n) = 48*A029546(n). - corrected by Sean A. Irvine, Apr 07 2018
a(0)=0, a(1)=48, a(2)=1680, a(n) = 35*a(n-1) - 35*a(n-2) + a(n-3). - Harvey P. Dale, May 24 2014
From Colin Barker, Mar 02 2016: (Start)
a(n) = (-6+(3-2*sqrt(2))*(17+12*sqrt(2))^(-n)+(3+2*sqrt(2))*(17+12*sqrt(2))^n)/4.
G.f.: 48*x / ((1-x)*(1-34*x+x^2)).
(End)
a(n) = 34*a(n-1) - a(n-2) + 48. - Vincenzo Librandi, Mar 03 2016

A009759 Expansion of (3 - 21*x + 4*x^2)/((x-1)*(x^2 - 6*x + 1)).

Original entry on oeis.org

-3, 0, 17, 116, 693, 4056, 23657, 137900, 803757, 4684656, 27304193, 159140516, 927538917, 5406093000, 31509019097, 183648021596, 1070379110493, 6238626641376, 36361380737777, 211929657785300, 1235216565974037
Offset: 0

Views

Author

N. J. A. Sloane, Nick Baxter (nick(AT)visigenic.com)

Keywords

Comments

Numbers k such that 2*k^2 + 14*k + 25 is a square. - James R. Buddenhagen, Jul 19 2008
If k satisfies the previous condition, i.e., P(k) = 2*k^2 + 14*k + 25 is a square, then there exists an integer m such that (k+3)^2 + (k+4)^2 = m^2; finding such numbers k is equivalent to finding Pythagorean triples (X,X+1,Z) with X in A001652 (1st formula). For k >= 0, P(k) = A001844(k+3), and the successive values of P(k) that are squares are in A008844. - Bernard Schott, Mar 24 2019

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, New-York, 1964, pp. 122-124.

Crossrefs

Cf. A001652 (X values), A001653 (Z values), A001844, A008844.

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (3-21*x+4*x^2)/((x-1)*(x^2-6*x+1))) ) // G. C. Greubel, Feb 12 2018
    
  • Mathematica
    CoefficientList[Series[(3-21x+4x^2)/((x-1)(x^2-6x+1)),{x,0,30}],x] (* or *) LinearRecurrence[{7,-7,1},{-3,0,17},30] (* Harvey P. Dale, Dec 12 2016 *)
  • PARI
    my(x='x+O('x^30)); Vec((3-21*x+4*x^2)/((x-1)*(x^2-6*x+1))) \\ G. C. Greubel, Feb 12 2018
    
  • Sage
    ((3-21*x+4*x^2)/((x-1)*(x^2-6*x+1))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Apr 04 2019

Formula

a(n) = A001652(n) - 3.
a(n) = ( (1+sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*n+1) - 14 )/4.
a(n) - a(n-1) = A001541(n), n > 0. - R. J. Mathar, Apr 23 2009
a(n) = (Q(2*n+1) -14)/4 = (4*P(n)*P(n+1) + (-1)^n - 7)/2, where P(n) = A000129(n) (Pell) and Q(n) = A002203(n) (Pell-Lucas). - G. C. Greubel, Apr 04 2019

Extensions

G.f. and Binet formula corrected by R. J. Mathar, Aug 24 2016

A251924 Numbers n such that the sum of the triangular numbers T(n) and T(n+1) is equal to a hexagonal number H(m) for some m.

Original entry on oeis.org

0, 34, 1188, 40390, 1372104, 46611178, 1583407980, 53789260174, 1827251437968, 62072759630770, 2108646576008244, 71631910824649558, 2433376321462076760, 82663163018885960314, 2808114166320660573948, 95393218491883573553950, 3240561314557720840260384
Offset: 1

Views

Author

Colin Barker, Dec 11 2014

Keywords

Comments

Also nonnegative integers x in the solutions to 2*x^2-4*y^2+4*x+2*y+2 = 0, the corresponding values of y being A008844.
First bisection of A076708. [Bruno Berselli, Dec 11 2014]

Examples

			34 is in the sequence because T(34)+T(35) = 595+630 = 1225 = H(25).
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{35,-35,1},{0,34,1188},20] (* Harvey P. Dale, Feb 04 2019 *)
  • PARI
    concat(0, Vec(2*x^2*(x-17)/((x-1)*(x^2-34*x+1)) + O(x^100)))

Formula

a(n) = 35*a(n-1)-35*a(n-2)+a(n-3).
G.f.: 2*x^2*(x-17) / ((x-1)*(x^2-34*x+1)).
a(n) = (-8-(4+3*sqrt(2))*(17+12*sqrt(2))^(-n)+(-4+3*sqrt(2))*(17+12*sqrt(2))^n)/8. - Colin Barker, Mar 02 2016

A251925 Prime powers p^k (k>=2) of the form (n^2+1)/2.

Original entry on oeis.org

25, 841, 28561, 32959081, 1119638521, 1985636569351347658201, 3051519929713402294221039791281, 4689566069222821420312720463003656425961, 183840368926047361112315395593676258316051401, 17020879736268069268391497343746883355223007561030622302744641179601
Offset: 1

Views

Author

Joerg Arndt, Dec 11 2014

Keywords

Comments

The corresponding n are a subsequence of A001333; see example.

Examples

			The first few terms correspond to
7^2 + 1 = 2 * 5^2 = 2 * 25,
41^2 + 1 = 2 * 29^2 = 2 * 841,
239^2 + 1 = 2 * 13^4 = 2 * 28561,
8119^2 + 1 = 2 * 5741^2 = 2 * 32959081,
47321^2 + 1 = 2 * 33461^2 = 2 * 1119638521,
63018038201^2+1 = 2 * 44560482149^2 = 2 * 1985636569351347658201.
		

Crossrefs

Cf. A027861 (primes of the form (n^2+1)/2), A001333, A008844 (primes and composites with k=2).

Programs

  • Mathematica
    With[{r=Range[100]},Select[((ChebyshevT[r,I]/I^r)^2+1)/2,!PrimeQ[#]&&PrimePowerQ[#]&]] (* Paolo Xausa, Nov 13 2023, after Joerg Arndt *)
  • PARI
    forstep(n=1,10^9,2, t=(n^2+1)/2; if( !isprime(t) && isprimepower(t), print1(t,", ")));
    
  • PARI
    /* much more efficient: */
    {b(n) = polchebyshev(n, 1, I) / I^n}
    for(n=1,10^3,t=(b(n)^2+1)/2;if(!isprime(t)&&isprimepower(t),print1(t,", ")));

A276916 Subsequence of centered square numbers obtained by adding four triangles from A276914 and a central element, a(n) = 4*A276914(n) + 1.

Original entry on oeis.org

1, 5, 41, 61, 145, 181, 313, 365, 545, 613, 841, 925, 1201, 1301, 1625, 1741, 2113, 2245, 2665, 2813, 3281, 3445, 3961, 4141, 4705, 4901, 5513, 5725, 6385, 6613, 7321, 7565, 8321, 8581, 9385, 9661, 10513, 10805, 11705, 12013, 12961, 13285, 14281, 14621, 15665
Offset: 0

Views

Author

Daniel Poveda Parrilla, Sep 27 2016

Keywords

Comments

All terms of this sequence are centered square numbers. Graphically, each term of the sequence is made of four squares, eight triangles and a central element.
a(A220185(n+1)) = A008844(2n) = A079291(4n+1), which is a square of a Pell number.

Crossrefs

Programs

  • Magma
    [4*n*(2*n+(-1)^n)+1 : n in [0..60]]; // Wesley Ivan Hurt, Sep 27 2016
    
  • Maple
    A276916:=n->4*n*(2*n+(-1)^n)+1: seq(A276916(n), n=0..60); # Wesley Ivan Hurt, Sep 27 2016
  • Mathematica
    Table[4 n (2 n + (-1)^n) + 1, {n, 0, 44}] (* or *)
    CoefficientList[Series[(1 +4x +34x^2 +12x^3 +13x^4)/((1-x)^3*(1+x)^2), {x, 0, 44}], x] (* Michael De Vlieger, Sep 28 2016 *)
  • PARI
    Vec((1+4*x+34*x^2+12*x^3+13*x^4)/((1-x)^3*(1+x)^2) + O(x^50)) \\ Colin Barker, Sep 27 2016
    
  • SageMath
    [4*n*(2*n+(-1)^n) +1 for n in (0..60)] # G. C. Greubel, Aug 19 2022

Formula

a(n) = 4*n*(2*n + (-1)^n) + 1.
a(n) = 4*n*(2*n + 1) + 1 for n even.
a(n) = 4*n*(2*n - 1) + 1 for n odd.
a(n) is sum of two squares; a(n) = k^2 + (k+1)^2 where k = 2n-(n mod 2). - David A. Corneth, Sep 27 2016
From Colin Barker, Sep 27 2016: (Start)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4.
G.f.: (1+4*x+34*x^2+12*x^3+13*x^4) / ((1-x)^3*(1+x)^2). (End)
E.g.f.: (1+8*x+8*x^2)*exp(x) - 4*x*exp(-x). - G. C. Greubel, Aug 19 2022

A307492 Numbers that are both centered square and square pyramidal.

Original entry on oeis.org

1, 5, 42925, 1026745
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 10 2019

Keywords

Comments

If it exists, a(5) > 10^29. - Bert Dobbelaere, Apr 12 2019

Crossrefs

Intersection of A000330 and A001844.

Programs

  • Mathematica
    csQ[n_] := IntegerQ[Sqrt[2*n-1]]; Select[Table[n(n+1)(2n+1)/6, {n, 0, 1000}], csQ] (* Amiram Eldar, Apr 11 2019 *)
Previous Showing 11-20 of 21 results. Next