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

A307597 Number of partitions of n into 2 distinct positive triangular numbers.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 2, 0, 1, 1, 0, 2, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 2, 0, 0, 1, 0, 3, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 2, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 3, 0, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 17 2019

Keywords

Comments

The greedy inverse (positions of first occurrence of n) starts 0, 4, 16, 81, 471, 2031, 1381, 11781, 6906, 17956, ... - R. J. Mathar, Apr 28 2020

Examples

			a(16) = 2 because we have [15, 1] and [10, 6].
		

Crossrefs

Formula

a(n) = [x^n y^2] Product_{k>=1} (1 + y*x^(k*(k+1)/2)).
a(n) = Sum_{k=1..floor((n-1)/2)} c(k) * c(n-k), where c = A010054. - Wesley Ivan Hurt, Jan 06 2024

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

Original entry on oeis.org

16, 31, 46, 51, 76, 94, 111, 121, 123, 126, 133, 141, 146, 156, 157, 172, 174, 186, 191, 196, 198, 216, 225, 226, 231, 237, 241, 246, 259, 268, 281, 286, 289, 291, 297, 301, 310, 315, 321, 326, 328, 336, 346, 354, 366, 367, 379, 384, 391, 396, 412, 416
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 02 2015

Keywords

Crossrefs

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

Programs

  • Mathematica
    r = 416; 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, 2]
    Module[{nn=40,trnos},trnos=Accumulate[Range[nn]];Select[PositionIndex[ Sort[ Counts[Total/@Subsets[trnos,{2}]]]][2],#<=Last[trnos]&]] (* The program uses the PositionIndex and Counts functions from Mathematica version 10 *) (* Harvey P. Dale, Dec 25 2015 *)

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

Original entry on oeis.org

16, 31, 46, 51, 76, 81, 94, 106, 111, 121, 123, 126, 133, 141, 146, 156, 157, 172, 174, 181, 186, 191, 196, 198, 211, 216, 225, 226, 231, 237, 241, 246, 256, 259, 268, 276, 281, 286, 289, 291, 297, 301, 310, 315, 321, 326, 328, 331, 336, 346, 354, 361, 366
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 02 2015

Keywords

Comments

The magic sum of any 3 X 3 semimagic square composed of triangular numbers is a(n) + A000217(m) for some m and n.

Examples

			16 = 1 + 15 = 6 + 10.
		

Crossrefs

Cf. A000217, A051533, A260647, A265140 (exactly 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 = 366; 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 > 1]
    Module[{nn=30,trnos},trnos=Accumulate[Range[nn]];Select[Sort[Flatten[ Table[ PositionIndex[Counts[Total/@Subsets[trnos,{2}]]][i],{i,2,nn}]]], #<= Last[trnos]&]] (* The program uses the PositionIndex and Counts functions from Mathematica version 10 *)  (* Harvey P. Dale, Dec 26 2015 *)

A265136 Numbers that are the sum of two distinct nonzero triangular numbers in exactly three ways.

Original entry on oeis.org

81, 106, 181, 211, 256, 276, 331, 361, 381, 406, 456, 556, 606, 631, 666, 681, 706, 718, 731, 781, 856, 861, 931, 939, 956, 981, 1051, 1131, 1206, 1231, 1456, 1506, 1563, 1606, 1631, 1681, 1731, 1732, 1756, 1831, 1891, 1901, 1956, 1981, 2081, 2095, 2101
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), A265137 (more than three ways), A265138 (exactly four ways).

Programs

  • Mathematica
    r = 2101; 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, 3]
    Module[{nn=70,trnos},trnos=Accumulate[Range[nn]];Select[ PositionIndex[ Sort[ Counts[Total/@Subsets[trnos,{2}]]]][3],#<=Last[trnos]&]] (* The program uses the PositionIndex and Counts functions from Mathematica version 10 *) (* Harvey P. Dale, Dec 25 2015 *)

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)

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 *)

A295768 Triangular numbers that can be represented as a sum of two distinct triangular numbers, and as a product of two triangular numbers greater than 1.

Original entry on oeis.org

990, 1540, 2850, 4851, 8778, 11781, 15400, 26796, 43956, 61425, 61776, 70125, 105570, 145530, 176715, 189420, 270480, 303810, 349866, 437580, 526851, 715806, 719400, 749700, 799480, 810901, 828828, 1037520, 1050525, 1185030, 1493856, 1788886, 1921780, 2001000
Offset: 1

Views

Author

Alex Ratushnyak, Nov 27 2017

Keywords

Comments

Intersection of A188630 and A260647.

Examples

			990 is representable as a product of two triangular numbers, 990 = 660 * 15, and as a sum, 990 = 780 + 210, therefore 990 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    maxTerm = 3*10^6; imax = Ceiling[(Sqrt[8*maxTerm + 1] - 1)/2];
    TriangularQ[n_] := IntegerQ[Sqrt[8n + 1]];
    t[op_] := Table[If[1 < i < j, op[i*(i + 1)/2 , j*(j + 1)/2], Nothing], {i, 2, imax}, {j, i + 1, imax}] // Flatten // Select[#, # <= maxTerm && TriangularQ[#]&]& // Union;
    Intersection[t[Plus], t[Times]] (* Jean-François Alcover, Dec 05 2017 *)
Showing 1-10 of 10 results.