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

A051533 Numbers that are the sum of two positive triangular numbers.

Original entry on oeis.org

2, 4, 6, 7, 9, 11, 12, 13, 16, 18, 20, 21, 22, 24, 25, 27, 29, 30, 31, 34, 36, 37, 38, 39, 42, 43, 46, 48, 49, 51, 55, 56, 57, 58, 60, 61, 64, 65, 66, 67, 69, 70, 72, 73, 76, 79, 81, 83, 84, 87, 88, 90, 91, 92, 93, 94, 97, 99, 100, 101, 102, 106, 108
Offset: 1

Views

Author

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

Keywords

Comments

Numbers n such that 8n+2 is in A085989. - Robert Israel, Mar 06 2017

Examples

			666 is in the sequence because we can write 666 = 435 + 231 = binomial(22,2) + binomial(30,2).
		

Crossrefs

Cf. A000217, A020756 (sums of two triangular numbers), A001481 (sums of two squares), A007294, A051611 (complement).
Cf. A061336: minimal number of triangular numbers that sum up to n.
Cf. A085989.

Programs

  • Haskell
    a051533 n = a051533_list !! (n-1)
    a051533_list = filter ((> 0) . a053603) [1..]
    -- Reinhard Zumkeller, Jun 28 2013
    
  • Maple
    isA051533 := proc(n)
        local a,ta;
        for a from 1 do
            ta := A000217(a) ;
            if 2*ta > n then
                return false;
            end if;
            if isA000217(n-ta) then
                return true;
            end if;
        end do:
    end proc:
    for n from 1 to 200 do
        if isA051533(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Dec 16 2015
  • Mathematica
    f[k_] := If[!
       Head[Reduce[m (m + 1) + n (n + 1) == 2 k && 0 < m && 0 < n, {m, n},
           Integers]] === Symbol, k, 0]; DeleteCases[Table[f[k], {k, 1, 108}], 0] (* Ant King, Nov 22 2010 *)
    nn=50; tri=Table[n(n+1)/2, {n,nn}]; Select[Union[Flatten[Table[tri[[i]]+tri[[j]], {i,nn}, {j,i,nn}]]], #<=tri[[-1]] &]
    With[{nn=70},Take[Union[Total/@Tuples[Accumulate[Range[nn]],2]],nn]] (* Harvey P. Dale, Jul 16 2015 *)
  • PARI
    is(n)=for(k=ceil((sqrt(4*n+1)-1)/2),(sqrt(8*n-7)-1)\2, if(ispolygonal(n-k*(k+1)/2, 3), return(1))); 0 \\ Charles R Greathouse IV, Jun 09 2015

Formula

A053603(a(n)) > 0. - Reinhard Zumkeller, Jun 28 2013
A061336(a(n)) = 2. - M. F. Hasler, Mar 06 2017

A053604 Number of ways to write n as an ordered sum of 3 nonzero triangular numbers.

Original entry on oeis.org

0, 0, 0, 1, 0, 3, 0, 3, 3, 1, 6, 0, 6, 3, 6, 3, 3, 9, 1, 12, 0, 6, 9, 6, 6, 6, 9, 6, 12, 0, 10, 9, 12, 6, 9, 9, 3, 18, 3, 12, 12, 9, 9, 9, 12, 10, 12, 9, 9, 18, 6, 6, 27, 6, 12, 6, 9, 18, 15, 15, 6, 21, 9, 13, 12, 9, 18, 21, 9, 6, 21, 15, 15, 15, 12, 15, 18, 15, 9
Offset: 0

Views

Author

N. J. A. Sloane, Jan 20 2000

Keywords

Comments

Fermat asserted that every number is the sum of three triangular numbers. This was proved by Gauss, who recorded in his Tagebuch entry for Jul 10 1796 that: EYPHEKA! num = DELTA + DELTA + DELTA.

References

  • Mel Nathanson, Additive Number Theory: The Classical Bases, Graduate Texts in Mathematics, Volume 165, Springer-Verlag, 1996. See Chapter 1.

Crossrefs

Programs

  • Mathematica
    nmax = 100; m0 = 10; A053604 :=
    Table[a[n], {n, 0, nmax}]; Clear[counts];
    counts[m_] :=
    counts[m] = (Clear[a]; a[_] = 0;
       Do[s = i*(i + 1)/2 + j*(j + 1)/2 + k*(k + 1)/2;
        a[s] = a[s] + 1, {i, 1, m}, {j, 1, m}, {k, 1, m}];
       A053603); counts[m = m0]; counts[m = 2*m]; While[
    counts[m] != counts[m/2], m = 2*m]; A053604  (* G. C. Greubel, Dec 24 2016 *)

Formula

G.f.: ( Sum_{k>=1} x^(k*(k+1)/2) )^3. - Ilya Gutkovskiy, Dec 24 2016

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

A230121 Number of ways to write n = x + y + z (0 < x <= y <= z) such that x*(x+1)/2 + y*(y+1)/2 + z*(z+1)/2 is a triangular number.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 1, 2, 1, 1, 0, 2, 1, 2, 1, 2, 3, 2, 2, 6, 1, 3, 5, 1, 2, 3, 5, 2, 1, 3, 3, 3, 4, 3, 8, 2, 5, 11, 2, 5, 8, 4, 6, 4, 9, 4, 6, 5, 4, 6, 3, 8, 8, 5, 8, 10, 7, 7, 11, 8, 6, 7, 8, 5, 9, 7, 6, 8, 7, 7, 8, 13, 9, 11, 10, 7, 22, 9, 10, 13, 3, 6, 10, 8, 17, 12, 7, 9, 10, 16, 6, 18, 18, 10, 15, 9, 12, 20, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 10 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 except for n = 1, 2, 4, 5, 7, 12. Moreover, for each n = 20, 21, ... there are three distinct positive integers x, y and z with x + y + z = n such that x*(x+1)/2 + y*(y+1)/2 + z*(z+1)/2 is a triangular number.
(ii) A positive integer n cannot be written as x + y + z (x, y, z > 0) with x^2 + y^2 + z^2 a square if and only if n has the form 2^r*3^s or the form 2^r*7, where r and s are nonnegative integers.
(iii) Any integer n > 14 can be written as a + b + c + d, where a, b, c, d are positive integers with a^2 + b^2 + c^2 + d^2 a square. If n > 20 is not among 22, 28, 30, 38, 44, 60, then we may require additionally that a, b, c, d are pairwise distinct.
(iv) For each integer n > 50 not equal to 71, there are positive integers a, b, c, d with a + b + c + d = n such that both a^2 + b^2 and c^2 + d^2 are squares.
Part (ii) and the first assertion in part (iii) were confirmed by Chao Huang and Zhi-Wei Sun in 2021. - Zhi-Wei Sun, May 09 2021

Examples

			a(16) = 1 since 16 = 3 + 6 + 7 and 3*4/2 + 6*7/2 + 7*8/2 = 55 = 10*11/2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    T[n_]:=n(n+1)/2
    a[n_]:=Sum[If[SQ[8(T[i]+T[j]+T[n-i-j])+1],1,0],{i,1,n/3},{j,i,(n-i)/2}]
    Table[a[n],{n,1,100}]
  • PARI
    a(n)=my(t=(n+1)*n/2,s);sum(x=1,n\3,s=t-n--*x;sum(y=x,n\2,is_A000217(s-(n-y)*y))) \\ - M. F. Hasler, Oct 11 2013

A340949 Number of ways to write n as an ordered sum of 4 nonzero triangular numbers.

Original entry on oeis.org

1, 0, 4, 0, 6, 4, 4, 12, 1, 16, 6, 16, 12, 12, 22, 8, 36, 4, 30, 24, 21, 36, 18, 36, 28, 48, 16, 44, 36, 44, 48, 36, 46, 40, 72, 20, 73, 48, 54, 72, 42, 68, 56, 84, 50, 72, 78, 56, 84, 84, 62, 112, 60, 60, 110, 84, 97, 72, 120, 76, 116, 84, 72, 144, 102, 104, 96, 108, 102, 156, 102, 92
Offset: 4

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, t, d; r, t, d:= $0..2;
          if n=0 then `if`(k=0, 1, 0) else
          while t<=n do r:= r+b(n-t, k-1); t, d:= t+d, d+1 od; r fi
        end:
    a:= n-> b(n, 4):
    seq(a(n), n=4..75);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 75; CoefficientList[Series[(EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)) - 1)^4, {x, 0, nmax}], x] // Drop[#, 4] &

Formula

G.f.: (theta_2(sqrt(x)) / (2 * x^(1/8)) - 1)^4, where theta_2() is the Jacobi theta function.

A340950 Number of ways to write n as an ordered sum of 5 nonzero triangular numbers.

Original entry on oeis.org

1, 0, 5, 0, 10, 5, 10, 20, 5, 35, 11, 40, 30, 35, 55, 30, 90, 25, 100, 60, 80, 120, 60, 140, 90, 161, 100, 165, 135, 165, 210, 140, 220, 180, 265, 170, 295, 200, 285, 330, 205, 365, 260, 395, 295, 391, 350, 355, 480, 340, 455, 490, 415, 480, 515, 445, 600, 510, 565, 550, 680, 545, 555
Offset: 5

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, t, d; r, t, d:= $0..2;
          if n=0 then `if`(k=0, 1, 0) else
          while t<=n do r:= r+b(n-t, k-1); t, d:= t+d, d+1 od; r fi
        end:
    a:= n-> b(n, 5):
    seq(a(n), n=5..67);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 67; CoefficientList[Series[(EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)) - 1)^5, {x, 0, nmax}], x] // Drop[#, 5] &

Formula

G.f.: (theta_2(sqrt(x)) / (2 * x^(1/8)) - 1)^5, where theta_2() is the Jacobi theta function.

A340951 Number of ways to write n as an ordered sum of 6 nonzero triangular numbers.

Original entry on oeis.org

1, 0, 6, 0, 15, 6, 20, 30, 15, 66, 21, 90, 61, 90, 126, 86, 210, 90, 270, 156, 261, 320, 210, 450, 261, 516, 375, 542, 495, 570, 727, 540, 870, 650, 966, 816, 1050, 906, 1155, 1266, 1020, 1560, 1090, 1710, 1416, 1698, 1635, 1746, 2120, 1650, 2376, 1980, 2316, 2490, 2368, 2520, 2835
Offset: 6

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, t, d; r, t, d:= $0..2;
          if n=0 then `if`(k=0, 1, 0) else
          while t<=n do r:= r+b(n-t, k-1); t, d:= t+d, d+1 od; r fi
        end:
    a:= n-> b(n, 6):
    seq(a(n), n=6..62);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 62; CoefficientList[Series[(EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)) - 1)^6, {x, 0, nmax}], x] // Drop[#, 6] &

Formula

G.f.: (theta_2(sqrt(x)) / (2 * x^(1/8)) - 1)^6, where theta_2() is the Jacobi theta function.

A340952 Number of ways to write n as an ordered sum of 7 nonzero triangular numbers.

Original entry on oeis.org

1, 0, 7, 0, 21, 7, 35, 42, 35, 112, 42, 182, 112, 210, 260, 217, 462, 252, 651, 399, 728, 777, 672, 1232, 749, 1533, 1127, 1659, 1617, 1792, 2289, 1890, 2926, 2212, 3339, 2990, 3584, 3654, 4046, 4613, 4263, 5754, 4487, 6636, 5733, 6825, 7014, 7203, 8617, 7560, 10087, 8302
Offset: 7

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, t, d; r, t, d:= $0..2;
          if n=0 then `if`(k=0, 1, 0) else
          while t<=n do r:= r+b(n-t, k-1); t, d:= t+d, d+1 od; r fi
        end:
    a:= n-> b(n, 7):
    seq(a(n), n=7..58);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 58; CoefficientList[Series[(EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)) - 1)^7, {x, 0, nmax}], x] // Drop[#, 7] &

Formula

G.f.: (theta_2(sqrt(x)) / (2 * x^(1/8)) - 1)^7, where theta_2() is the Jacobi theta function.

A340953 Number of ways to write n as an ordered sum of 8 nonzero triangular numbers.

Original entry on oeis.org

1, 0, 8, 0, 28, 8, 56, 56, 70, 176, 84, 336, 196, 448, 492, 504, 953, 616, 1456, 960, 1814, 1792, 1904, 3032, 2100, 4144, 3052, 4768, 4670, 5264, 6720, 5936, 8876, 7112, 10620, 9648, 11718, 12720, 13216, 15960, 15261, 19608, 17164, 23296, 21226, 25424, 26796, 27272, 32844
Offset: 8

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, t, d; r, t, d:= $0..2;
          if n=0 then `if`(k=0, 1, 0) else
          while t<=n do r:= r+b(n-t, k-1); t, d:= t+d, d+1 od; r fi
        end:
    a:= n-> b(n, 8):
    seq(a(n), n=8..56);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 56; CoefficientList[Series[(EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)) - 1)^8, {x, 0, nmax}], x] // Drop[#, 8] &

Formula

G.f.: (theta_2(sqrt(x)) / (2 * x^(1/8)) - 1)^8, where theta_2() is the Jacobi theta function.

A340954 Number of ways to write n as an ordered sum of 9 nonzero triangular numbers.

Original entry on oeis.org

1, 0, 9, 0, 36, 9, 84, 72, 126, 261, 162, 576, 336, 882, 873, 1092, 1845, 1386, 3061, 2160, 4167, 3957, 4860, 6948, 5580, 10287, 7812, 12777, 12276, 14634, 18363, 17136, 25056, 21282, 31266, 28899, 36075, 39654, 41202, 51348, 49383, 63270, 59391, 76059, 73611, 87319, 93582, 96966
Offset: 9

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, t, d; r, t, d:= $0..2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while t<=n do r:= r+b(n-t, k-1); t, d:= t+d, d+1 od; r fi
        end:
    a:= n-> b(n, 9):
    seq(a(n), n=9..56);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 56; CoefficientList[Series[(EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)) - 1)^9, {x, 0, nmax}], x] // Drop[#, 9] &

Formula

G.f.: (theta_2(sqrt(x)) / (2 * x^(1/8)) - 1)^9, where theta_2() is the Jacobi theta function.
Showing 1-10 of 13 results. Next