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

A265138 Numbers that are the sum of two distinct nonzero triangular numbers in exactly four ways.

Original entry on oeis.org

471, 531, 601, 616, 786, 871, 906, 991, 1056, 1126, 1156, 1186, 1281, 1296, 1341, 1446, 1486, 1551, 1576, 1602, 1641, 1656, 1771, 1806, 1836, 1896, 1906, 1921, 2044, 2061, 2146, 2226, 2265, 2281, 2316, 2401, 2421, 2451, 2486, 2551, 2646, 2716, 2746, 2781
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 02 2015

Keywords

Crossrefs

Cf. A000217, A051533, A260647, A265140 (exactly one way), A262749 (more than one way), A265134 (exactly two ways), A265135 (more than two ways), A265136 (exactly three ways), A265137 (more than three ways).

Programs

  • Mathematica
    r = 2781; lst = Table[0, {r}]; lim = Floor[Sqrt[8*r - 7]]; Do[num = (i^2 + i)/2 + (j^2 + j)/2; If[num <= r, lst[[num]]++], {i, lim}, {j, i - 1}]; Flatten@Position[lst, 4]
    Module[{nn=80,trnos},trnos=Accumulate[Range[nn]];Select[PositionIndex[ Sort[ Counts[Total/@Subsets[trnos,{2}]]]][4],#<=Last[trnos]&]] (* The program uses the PositionIndex and Counts functions from Mathematica version 10 *) (* Harvey P. Dale, Dec 25 2015 *)

A265140 Numbers that are the sum of two distinct nonzero triangular numbers in exactly one way.

Original entry on oeis.org

4, 7, 9, 11, 13, 18, 21, 22, 24, 25, 27, 29, 34, 36, 37, 38, 39, 42, 43, 48, 49, 55, 56, 57, 58, 60, 61, 64, 65, 66, 67, 69, 70, 72, 73, 79, 83, 84, 87, 88, 91, 92, 93, 97, 99, 100, 101, 102, 108, 112, 114, 115, 119, 120, 127, 130, 135, 136, 137, 139, 142, 144
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 02 2015

Keywords

Crossrefs

Cf. A000217, A051533, A260647, A262749 (more than one way), A265134 (exactly two ways), A265135 (more than two ways), A265136 (exactly three ways), A265137 (more than three ways), A265138 (exactly four ways).

Programs

  • Mathematica
    r = 144; lst = Table[0, {r}]; lim = Floor[Sqrt[8*r - 7]]; Do[num = (i^2 + i)/2 + (j^2 + j)/2; If[num <= r, lst[[num]]++], {i, lim}, {j, i - 1}]; Flatten@Position[lst, 1]

A342326 a(n) is the smallest nonnegative integer that can be written as a sum of two distinct nonzero triangular numbers in exactly n ways or -1 if no such integer exists.

Original entry on oeis.org

0, 4, 16, 81, 471, 2031, 1381, 11781, 6906, 17956, 34531, 123256, 40056, 305256, 863281, 448906, 200281, 1957231, 520731, 10563906, 1001406, 11222656, 7631406, 3454506, 1482081, 75865156, 7172606106, 8852431, 25035156, 334020781, 13018281, 38531031, 7410406, 7014160156
Offset: 0

Views

Author

Robert G. Root, Mar 08 2021

Keywords

Comments

Conjecture: This sequence has a positive a(n) for every positive integer n, and each sequence in the infinite indexed family, of which this sequence offers the initial terms, is infinite, as well.
From David A. Corneth, Mar 08 2021: (Start)
a(40) = 37052031, a(45) = 221310781, a(48) = 60765331, a(39) <= 2782318906, a(42) <= 325457031, a(47) <= 927577056, a(50) <= 2200089531, a(54) <= 327539956, a(56) <= 926300781, a(60) <= 481676406, a(63) <= 4598740656, a(64) <= 303826656, a(71) <= 4579579956, a(72) <= 789949306, a(80) <= 1519133281, a(96) <= 3220562556. Terms for n <= 96 not listed here and terms for which only upper bounds are known are >= 3*10^8.
Is a(n) == 6 (mod 25) for n >= 5? It holds for all terms known to date.
The triangular numbers mod 25 are periodic with period 25. Constructing all 25*25 = 625 sums of two distinct triangular numbers mod 25 gives 65 cases for 6 (mod 25). The second largest occurs 40 times. (End)
a(47) = 550240551, a(59) = 7629645156, a(67) = 6418012656, a(81) = 9498658731, a(90) = 8188498906. All upper bounds listed in the above comments for n other than 47 are the exact values of a(n). For all n for which no value is listed here or above, a(n) > 10^10 (or a(n) = -1). - Jon E. Schoenfield, Mar 09 2021
From Martin Ehrenstein, Mar 09 2021: (Start)
a(44) = 15646972656. For n<=51, all terms not mentioned here or above, a(n) >= 6.5*10^10 (or a(n) = -1).
a(47) == 1 (mod 25) and a(95) = 47652012541 == 16 (mod 25). Thus the answer to Corneth's question is 'No'. (End)

Examples

			a(1) =  4 = 1 +  3;
a(2) = 16 = 1 + 15 =  6 + 10;
a(3) = 81 = 3 + 78 = 15 + 66 = 36 + 45.
		

Crossrefs

Programs

  • Mathematica
    r = 125000; (* generates the first 12 terms of the sequence *)
    lst = Table[0, {r}];
    lim = Floor[Sqrt[2r]];
    Do[ num = (i^2 + i)/2 + (j^2 + j)/2;
    If[num <= r, lst[[num]]++], {i, lim}, {j,  i - 1}];
    First /@ (Flatten@Position[lst, #] & /@ Range[Max[lst]])
  • PARI
    upto(n) = {my(v = vector(n)); res = vector(10); for(i = 1, (sqrtint(8*n + 1)-1)\2, bi = binomial(i + 1, 2); for(j = i+1, (sqrtint(8*(n - bi))-1)\2, v[bi + binomial(j+1, 2)]++ ) ); for(i = 1, #v, if(v[i] > 0, if(v[i] > #res, res = concat(res, vector(v[i] - #res)); ); if(res[v[i]] == 0, res[v[i]] = i ) ) ); concat(0, res) } \\ David A. Corneth, Mar 08 2021

Formula

a(n) = min { m >= 0 : A307597(m) = n }. - Alois P. Heinz, Mar 08 2021

Extensions

a(13)-a(18) from Alois P. Heinz, Mar 08 2021
a(19)-a(25) from David A. Corneth, Mar 08 2021
a(26)-a(33) from Jon E. Schoenfield, Mar 09 2021 (some terms first found by David A. Corneth)

A051611 Numbers that are not the sum of 2 nonzero triangular numbers.

Original entry on oeis.org

1, 3, 5, 8, 10, 14, 15, 17, 19, 23, 26, 28, 32, 33, 35, 40, 41, 44, 45, 47, 50, 52, 53, 54, 59, 62, 63, 68, 71, 74, 75, 77, 78, 80, 82, 85, 86, 89, 95, 96, 98, 103, 104, 105, 107, 109, 113, 116, 117, 118, 122, 124, 125, 128, 129, 131, 134, 138, 140, 143, 145, 147
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)

Keywords

Comments

A053603(a(n)) = 0. - Reinhard Zumkeller, Jun 28 2013

Crossrefs

Integers not in the sequence A051533. Cf. A002097, A000217, A007294, A051611, A053603.

Programs

  • Haskell
    a051611 n = a051611_list !! (n-1)
    a051611_list = filter ((== 0) . a053603) [1..]
    -- Reinhard Zumkeller, Jun 28 2013
  • Mathematica
    notSumQ[n_] := Reduce[ 0 < x <= y && n == x*(x + 1)/2 + y*(y + 1)/2, {x, y}, Integers] === False; Select[ Range[150], notSumQ] (* Jean-François Alcover, Jun 27 2012 *)
    With[{trnos=Accumulate[Range[100]]},Complement[Range[150],Total/@ Tuples[ trnos,2]]] (* Harvey P. Dale, Jun 01 2016 *)

A089982 Triangular numbers that can be expressed as the sum of 2 positive triangular numbers.

Original entry on oeis.org

6, 21, 36, 55, 66, 91, 120, 136, 171, 210, 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
Offset: 1

Views

Author

Jon Perry, Jan 13 2004

Keywords

Comments

Intersection of triangular numbers with sumset of triangular numbers. Triangular number analog of what for squares is {A057100(n)^2} = {A009000(n)^2}. {A000217} INTERSECT {A000217 + A000217}. - Jonathan Vos Post, Mar 09 2007
A subsequence of A051533. - Wolfdieter Lang, Jan 11 2017

Examples

			Generally, A000217(A000217(n)) = A000217(A000217(n)-1) + A000217(n) and so is automatically included. These are 6=T(3), 21=T(6), 55=T(10), etc. Other solutions occur when a partial sum from x to y is triangular, e.g., 15 + 16 + 17 + 18 = 66 = T(11), so T(14) + T(11) = T(18). This particular example arises since 10+4k is triangular (at k=14, 10 + 4k = 66), and we therefore have a solution.
All other solutions occur when 3+2k, 6+3k, 10+4k, etc. -- in general, T(j) + j*k -- is triangular.
		

Crossrefs

Programs

  • Mathematica
    trn[i_]:=Module[{trnos=Accumulate[Range[i]],t2s},t2s=Union[Total/@ Tuples[ trnos,2]];Intersection[trnos,t2s]] (* Harvey P. Dale, Nov 08 2011 *)
    Select[Range[75], ! PrimeQ[#^2 + (# + 1)^2] &] /. Integer_ -> (Integer^2 + Integer)/2 (* Arkadiusz Wesolowski, Dec 03 2015 *)
  • PARI
    t(i) = i*(i+1)/2;
    { v=vector(100,i,t(i)); y=vector(100); c=0; for (i=1,30, for (j=i,30, x=t(i)+t(j); f=0; for (k=1,100,if (x==v[k],f=1;break)); if (f==1,y[c++ ]=x))); select(x->(x>0), vecsort(y,,8)) } \\ slightly edited by Michel Marcus, Apr 15 2021
    
  • PARI
    lista(nn) = {for (n=1, nn, my(t = n*(n+1)/2); for (k=1, n-1, if (ispolygonal(t - k*(k+1)/2, 3), print1(t, ", "); break;)););} \\ Michel Marcus, Apr 15 2021
    
  • Python
    from itertools import count, takewhile
    def aupto(lim):
        t = list(takewhile(lambda x: x<=lim, (i*(i+1)//2 for i in count(1))))
        s = set(a+b for i, a in enumerate(t) for b in t[i:])
        return sorted(s & set(t))
    print(aupto(3000)) # Michael S. Branicky, Jun 21 2021

Formula

Triangular number m is in this sequence iff A000161(4*m+1)>1 or, alternatively, A083025(4*m+1)>1. - Max Alekseyev, Oct 24 2008
a(n) = A000217(A012132(n)). - Ivan N. Ianakiev, Jan 17 2013

Extensions

More terms from Lambert Klasen (Lambert.Klasen(AT)gmx.net) and David Wasserman, Sep 23 2005

A117048 Prime numbers that are expressible as the sum of two positive triangular numbers.

Original entry on oeis.org

2, 7, 11, 13, 29, 31, 37, 43, 61, 67, 73, 79, 83, 97, 101, 127, 137, 139, 151, 157, 163, 181, 191, 193, 199, 211, 227, 241, 263, 277, 281, 307, 331, 353, 367, 373, 379, 389, 409, 421, 433, 443, 461, 463, 487, 499, 541, 571, 577, 587, 601, 619, 631, 659, 661
Offset: 1

Views

Author

Andrew S. Plewe, Apr 15 2006

Keywords

Comments

If the triangular number 0 is allowed, only one additional prime occurs: 3. In that case, the sequence becomes A117112.
A subsequence of A051533. - Wolfdieter Lang, Jan 11 2017

Examples

			2 = 1 + 1
7 = 1 + 6
11 = 1 + 10
13 = 10 + 3, etc.
		

Crossrefs

Programs

  • Mathematica
    tri = Table[n (n + 1)/2, {n, 40}]; Select[Union[Flatten[Outer[Plus, tri, tri]]], # <= tri[[-1]]+1 && PrimeQ[#] &] (* T. D. Noe, Apr 07 2011 *)
  • PARI
    is(n)=for(k=sqrtint(4*n+1)\2+1,(sqrtint(8*n+1)-1)\2, if(ispolygonal(n-k*(k+1)/2,3), return(n>3 && isprime(n)))); n==2 \\ Charles R Greathouse IV, Nov 07 2014

A265135 Numbers that are the sum of two distinct nonzero triangular numbers in more than two ways.

Original entry on oeis.org

81, 106, 181, 211, 256, 276, 331, 361, 381, 406, 456, 471, 531, 556, 601, 606, 616, 631, 666, 681, 706, 718, 731, 781, 786, 856, 861, 871, 906, 931, 939, 956, 981, 991, 1051, 1056, 1126, 1131, 1156, 1186, 1206, 1231, 1281, 1296, 1341, 1381, 1446, 1456
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 02 2015

Keywords

Crossrefs

Cf. A000217, A051533, A260647, A265140 (exactly one way), A262749 (more than one way), A265134 (exactly two ways), A265136 (exactly three ways), A265137 (more than three ways), A265138 (exactly four ways).

Programs

  • Mathematica
    r = 1456; lst = Table[0, {r}]; lim = Floor[Sqrt[8*r - 7]]; Do[num = (i^2 + i)/2 + (j^2 + j)/2; If[num <= r, lst[[num]]++], {i, lim}, {j, i - 1}]; Flatten@Position[lst, n_ /; n > 2]
    Module[{nn=60,trnos},trnos=Accumulate[Range[nn]];Select[Sort[Flatten[ Table[ PositionIndex[Counts[Total/@Subsets[trnos,{2}]]][i],{i,3,nn}]]], #<= Last[trnos]&]] (* The program uses the PositionIndex and Counts functions from Mathematica version 10 *) (* Harvey P. Dale, Dec 26 2015 *)

A265137 Numbers that are the sum of two distinct nonzero triangular numbers in more than three ways.

Original entry on oeis.org

471, 531, 601, 616, 786, 871, 906, 991, 1056, 1126, 1156, 1186, 1281, 1296, 1341, 1381, 1446, 1486, 1551, 1576, 1602, 1641, 1656, 1771, 1806, 1836, 1896, 1906, 1921, 2031, 2044, 2061, 2146, 2226, 2265, 2281, 2316, 2356, 2401, 2421, 2451, 2486, 2551, 2646
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 02 2015

Keywords

Comments

If there exists any 3 X 3 magic square composed of triangular numbers, then its magic sum is a(n) + A000217(m) for some m and n.

Crossrefs

Cf. A000217, A051533, A260647, A265140 (exactly one way), A262749 (more than one way), A265134 (exactly two ways), A265135 (more than two ways), A265136 (exactly three ways), A265138 (exactly four ways).

Programs

  • Mathematica
    r = 2646; lst = Table[0, {r}]; lim = Floor[Sqrt[8*r - 7]]; Do[num = (i^2 + i)/2 + (j^2 + j)/2; If[num <= r, lst[[num]]++], {i, lim}, {j, i - 1}]; Flatten@Position[lst, n_ /; n > 3]
    Module[{nn=80,trnos},trnos=Accumulate[Range[nn]];Select[Sort[ Flatten[ Table[ PositionIndex[Counts[Total/@Subsets[trnos,{2}]]][i],{i,4,nn}]]], #<= Last[trnos]&]] (* The program uses the PositionIndex and Counts functions from Mathematica version 10 *) (* Harvey P. Dale, Dec 26 2015 *)

A332987 Sums of two nonzero pentagonal numbers.

Original entry on oeis.org

2, 6, 10, 13, 17, 23, 24, 27, 34, 36, 40, 44, 47, 52, 56, 57, 63, 70, 71, 73, 75, 82, 86, 92, 93, 97, 102, 104, 105, 114, 118, 121, 122, 127, 129, 139, 140, 143, 146, 150, 152, 157, 162, 167, 168, 177, 180, 181, 184, 187, 188, 196, 198, 209, 211, 215, 222, 227
Offset: 1

Views

Author

Olivier Gérard, Mar 05 2020

Keywords

Crossrefs

Cf. A000326 (pentagonal numbers).
Analogs are A000404 (square numbers), A051533 (triangular numbers), A286636 (centered square numbers), A287960 (centered triangular numbers), A288631 (square pyramidal numbers).

Programs

  • Mathematica
    Module[{nn=15,pn},pn=PolygonalNumber[5,Range[nn]];Select[Union[ Total/@ Tuples[ pn,2]],#<=Last[pn]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 15 2021 *)

A061208 Numbers which can be expressed as sum of distinct triangular numbers (A000217).

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Amarnath Murthy, Apr 21 2001

Keywords

Comments

These numbers were called "almost-triangular" numbers during the Peru's Selection Test for the XII IberoAmerican Olympiad (1998). All numbers >= 34 are almost-triangular: see link. [Bernard Schott, Feb 04 2013]

Examples

			25 = 1 + 3 + 6 + 15
		

Crossrefs

Cf. A000217, A007294, A051611, A051533. Complement of A053614.

Programs

  • Maple
    gf := product(1+x^(j*(j+1)/2), j=1..100): s := series(gf, x, 200): for i from 1 to 200 do if coeff(s, x, i) > 0 then printf(`%d,`,i) fi:od:

Extensions

Corrected and extended by James Sellers, Apr 24 2001
Previous Showing 11-20 of 31 results. Next