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

A214838 Triangular numbers of the form k^2 + 2.

Original entry on oeis.org

3, 6, 66, 171, 2211, 5778, 75078, 196251, 2550411, 6666726, 86638866, 226472403, 2943171003, 7693394946, 99981175206, 261348955731, 3396416785971, 8878171099878, 115378189547778, 301596468440091, 3919462027838451, 10245401755863186, 133146330756959526, 348042063230908203
Offset: 1

Views

Author

Alex Ratushnyak, Mar 07 2013

Keywords

Comments

Corresponding k values are in A077241.
Except 3, all terms are in A089982: in fact, a(2) = 3+3 and a(n) = (k-2)*(k-1)/2+(k+1)*(k+2)/2, where k = sqrt(a(n)-2) > 2 for n > 2. [Bruno Berselli, Mar 08 2013]

Examples

			2211 is in the sequence because 2211 = 47^2 + 2.
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(-3*(x^4+x^3-14*x^2+x+1)/((x-1)*(x^2-6*x+1)*(x^2+6*x+1)))); // Bruno Berselli, Mar 08 2013
    
  • Mathematica
    LinearRecurrence[{1, 34, -34, -1, 1}, {3, 6, 66, 171, 2211}, 25] (* Bruno Berselli, Mar 08 2013 *)
  • Maxima
    t[n]:=((5-2*sqrt(2))*(1+(-1)^n*sqrt(2))^(2*floor(n/2))+(5+2*sqrt(2))*(1-(-1)^n*sqrt(2))^(2*floor(n/2))-2)/4$
    makelist(expand(t[n]*(t[n]+1)/2), n, 1, 25); /* Bruno Berselli, Mar 08 2013 */
  • PARI
    for(n=1, 10^9, t=n*(n+1)/2; if(issquare(t-2), print1(t,", "))); \\ Joerg Arndt, Mar 08 2013
    
  • Python
    import math
    for i in range(2, 1<<32):
          t = i*(i+1)//2 - 2
          sr = int(math.sqrt(t))
          if sr*sr == t:
              print(f'{sr:10} {i:10} {t+2}')
    

Formula

G.f.: -3*x*(x^4+x^3-14*x^2+x+1)/((x-1)*(x^2-6*x+1)*(x^2+6*x+1)). - Joerg Arndt, Mar 08 2013
a(n) = A000217(t), where t = ((5-2*sqrt(2))*(1+(-1)^n*sqrt(2))^(2*floor(n/2))+(5+2*sqrt(2))*(1-(-1)^n*sqrt(2))^(2*floor(n/2))-2)/4. - Bruno Berselli, Mar 08 2013

A112352 Triangular numbers that are the sum of two distinct positive triangular numbers.

Original entry on oeis.org

21, 36, 55, 66, 91, 120, 136, 171, 231, 276, 351, 378, 406, 496, 561, 666, 703, 741, 820, 861, 946, 990, 1035, 1081, 1176, 1225, 1326, 1378, 1431, 1485, 1540, 1596, 1653, 1711, 1770, 1891, 1953, 2016, 2080, 2211, 2278, 2346, 2556, 2701, 2775, 2850, 2926
Offset: 1

Views

Author

Rick L. Shepherd, Sep 05 2005

Keywords

Comments

Subsequence of A089982: it doesn't require the two positive triangular numbers to be distinct.
Subsequence of squares: 36, 1225, 41616, 1413721,... is also in A001110. - Zak Seidov, May 07 2015
First term with 2 representations is 231: 21+210=78+153, first term with 3 representations is 276: 45+211=66+120=105+171; apparently the number of representations is unbounded. - Zak Seidov, May 11 2015

Examples

			36 is a term because 36 = 15 + 21 and these three numbers are distinct triangular numbers (A000217(8) = A000217(5) + A000217(6)).
		

Crossrefs

Cf. A000217 (triangular numbers), A112353 (triangular numbers that are the sum of three distinct positive triangular numbers), A089982.
Cf. A001110. - Zak Seidov, May 07 2015

Programs

  • Maple
    N:= 10^5: # to get all terms <= N
    S:= {}:
    for a from 1 to floor(sqrt(1+8*N)/2) do
      for b from 1 to a-1 do
        y:= a*(a+1)/2 + b*(b+1)/2;
          if y > N then break fi;
          if issqr(8*y+1) then S:= S union {y} fi
      od
    od:
    sort(convert(S,list)); # Robert Israel, May 13 2015
  • Mathematica
    Select[Union[Total/@Subsets[Accumulate[Range[100]],{2}]],OddQ[ Sqrt[ 1+8#]]&] (* Harvey P. Dale, Feb 28 2016 *)

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 06 2012

A112355 Triangular numbers that are the sum of three positive triangular numbers.

Original entry on oeis.org

3, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326
Offset: 1

Views

Author

Rick L. Shepherd, Sep 06 2005

Keywords

Comments

A112353 is a subsequence: it requires the three positive triangular numbers to be distinct. The positive terms of A076140 are a subsequence.

Examples

			21 is a term because 21 = 3 + 3 + 15 and these four numbers are positive triangular numbers (A000217(6) = A000217(2) + A000217(2) + A000217(5)). {Also 21 = 1 + 10 + 10 = A000217(1) + A000217(4) + A000217(4).}.
		

Crossrefs

Cf. A000217 (triangular numbers), A089982 (triangular numbers that are the sum of two positive triangular numbers), A112353, A076140 (the three triangular numbers summed are identical).

A136346 Octagonal numbers which are the sums of exactly two positive octagonal numbers.

Original entry on oeis.org

560, 736, 1541, 3201, 5461, 6816, 7400, 9976, 11041, 11408, 13333, 14981, 15408, 15841, 19521, 21000, 21505, 25761, 28616, 30401, 41536, 45141, 50440, 51221, 52008, 54405, 56856, 61920, 63656, 65416, 69008, 75525, 76480, 81345, 82336, 85345, 87381, 89441
Offset: 1

Views

Author

Jonathan Vos Post, Dec 25 2007

Keywords

Comments

For sums of two positive octagonal numbers, see A136345. This is to octagonal numbers A000567 as A089982 is to triangular numbers A000217, as A009000 is to squares A000290, as A136117 is to pentagonal numbers A000326, as A133215 is to hexagonal numbers A000384, and as A117104 is to heptagonal numbers A000566. If Oc(a) + Oc(b) = Oc(c) then a(3a-2) + b(3b+2) = c(3c+2), so solving the quadratic equations for c we have (when an integer): c = (2 + sqrt(4 + 36a^2 + 36b^2 - 24a - 24b))/6.

Examples

			Where Oc(n) = A000567(n) = n-th octagonal number:
a(1) = 560 = Oc(14) = 280 + 280 = Oc(10) + Oc(10).
a(2) = 736 = Oc(16) = 560 + 176 = Oc(14) + Oc(8).
a(3) = 1541 = Oc(23) = 1408 + 133 = Oc(22) + Oc(7).
a(4) = 3201 = Oc(33) = 2465 + 736 = Oc(29) + Oc(16).
a(5) = 5461 = Oc(43) = 2821 + 2640 = Oc(31) + Oc(30).
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=300,ono},ono=PolygonalNumber[8,Range[nn]];Union[Select[ Total/@ Tuples[ono,2],MemberQ[ono,#]&]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 26 2019 *)

Formula

A000567 INTERSECTION {A000567(i) + A000567(j), i, j > 0}. {i*(3*i-2)} INTERSECTION {i*(3*i-2) + j(3*j-2), i > 0}.

Extensions

Corrected and edited by B. D. Swan (bdswan(AT)gmail.com), Dec 20 2008

A343426 Triangular numbers T(i) that can be expressed as the sum of 2 positive triangular numbers, T(j)+T(k), and for which i+j+k is a triangular number, where T is A000217.

Original entry on oeis.org

276, 741, 17766, 30876, 42778, 43071, 44850, 54946, 73920, 99681, 163306, 184528, 254541, 310866, 446040, 524800, 963966, 1006071, 1046181, 1160526, 1258491, 1873080, 1929630, 2793066, 3034416, 3108771, 3121251, 3454506, 3635556, 4305645, 4317391, 4435731, 4831386, 4859403
Offset: 1

Views

Author

Michel Marcus, Apr 15 2021

Keywords

Examples

			276 = T(23) = 105 + 171 = T(14) + T(18) and 23+14+18 = 55 = T(10), so 276 is a term.
		

Crossrefs

Cf. A000217. Subsequence of A089982.

Programs

  • PARI
    lista(nn) = {for (n=1, nn, my(t = n*(n+1)/2, kk); for (k=1, n-1, if (ispolygonal(t - k*(k+1)/2, 3, &kk), if (ispolygonal(n+k+kk, 3), print1(t, ", "); break;););););}

A350367 Triangular numbers that are the sum of two distinct nonzero triangular numbers in more than one way.

Original entry on oeis.org

231, 276, 406, 666, 861, 1081, 1225, 1431, 1711, 1891, 2211, 2556, 3081, 3741, 3916, 4186, 4371, 4560, 4656, 5151, 5356, 5671, 5886, 6786, 7021, 7381, 7875, 8001, 8128, 8256, 8778, 9316, 10731, 11781, 12246, 12561, 12720, 13366, 13861, 14196, 14706, 15576
Offset: 1

Views

Author

Shyam Sunder Gupta, Dec 27 2021

Keywords

Examples

			231 = 21 + 210 = 78 + 153.
276 = 45 + 231 = 66 + 210 = 105 + 171.
		

Crossrefs

Intersection of A000217 and A262749.

Programs

  • Mathematica
    (P=PolygonalNumber)[3,Select[Range@176,Length@Select[Subsets[P[3,Range[s=#]],{2}],Total@#==P[3,s]&]>1&]] (* Giorgos Kalogeropoulos, Dec 31 2021 *)
  • Python
    from collections import Counter
    from itertools import count, takewhile, combinations as combs
    def aupto(limit):
        tris = takewhile(lambda x: x <= limit, (k*(k+1)//2 for k in count(1)))
        trilst = list(tris); triset = set(trilst)
        tri2ct = Counter(sum(c) for c in combs(trilst, 2) if sum(c) in triset)
        return sorted(t for t in tri2ct if t <= limit and tri2ct[t] > 1)
    print(aupto(16000)) # Michael S. Branicky, Dec 27 2021
Showing 1-6 of 6 results.