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.

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

A053614 Numbers that are not the sum of distinct triangular numbers.

Original entry on oeis.org

2, 5, 8, 12, 23, 33
Offset: 1

Views

Author

Jud McCranie, Mar 19 2000

Keywords

Comments

The Mathematica program first computes A024940, the number of partitions of n into distinct triangular numbers. Then it finds those n having zero such partitions. It appears that A024940 grows exponentially, which would preclude additional terms in this sequence. - T. D. Noe, Jul 24 2006, Jan 05 2009

Examples

			a(2) = 5: the 7 partitions of 5 are 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, 1+1+1+1+1. Among those the distinct ones are 5, 4+1, 3+2. None contains all distinct triangular numbers.
12 is a term as it is not a sum of 1, 3, 6 or 10 taken at most once.
		

References

  • Joe Roberts, Lure of the Integers, The Mathematical Association of America, 1992, page 184, entry 33.
  • David Wells in "The Penguin Dictionary of Curious and Interesting Numbers, Revised Edition, page 94, states that "33 is the largest number that is not the sum of distinct triangular numbers".

Crossrefs

Cf. A025524 (number of numbers not the sum of distinct n-th-order polygonal numbers)
Cf. A007419 (largest number not the sum of distinct n-th-order polygonal numbers)
Cf. A001422, A121405 (corresponding sequences for square and pentagonal numbers)

Programs

  • Mathematica
    nn=100; t=Rest[CoefficientList[Series[Product[(1+x^(k*(k+1)/2)), {k,nn}], {x,0,nn(nn+1)/2}], x]]; Flatten[Position[t,0]] (* T. D. Noe, Jul 24 2006 *)

Formula

Complement of A061208.

Extensions

Entry revised by N. J. A. Sloane, Jul 23 2006

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

A053603 Number of ways to write n as an ordered sum of two nonzero triangular numbers.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 1, 2, 0, 2, 0, 2, 1, 2, 0, 0, 4, 0, 2, 0, 1, 2, 2, 0, 2, 2, 0, 2, 0, 2, 1, 4, 0, 0, 2, 0, 2, 2, 2, 2, 0, 0, 3, 2, 0, 0, 4, 0, 2, 2, 0, 4, 0, 0, 0, 2, 3, 2, 2, 0, 2, 2, 0, 0, 2, 2, 2, 2, 0, 2, 2, 0, 3, 2, 0, 0, 4, 0, 0, 2, 0, 6, 0, 2, 2, 0, 0, 2, 2, 0, 1, 2, 2
Offset: 0

Views

Author

N. J. A. Sloane, Jan 20 2000

Keywords

Comments

a(A051611(n)) = 0; A051533(a(n)) > 0. - Reinhard Zumkeller, Jun 27 2013

Crossrefs

Programs

  • Haskell
    a053603 n = sum $ map (a010054 . (n -)) $
                      takeWhile (< n) $ tail a000217_list
    -- Reinhard Zumkeller, Jun 27 2013
    
  • Mathematica
    nmax = 100; m0 = 10; A053603 := Table[a[n], {n, 0, nmax}]; Clear[counts]; counts[m_] := counts[m] = (Clear[a]; a[A053603);%20counts%5Bm%20=%20m0%5D;%20counts%5Bm%20=%202*m%5D;%20While%5B%20counts%5Bm%5D%20!=%20counts%5Bm/2%5D,%20m%20=%202*m%5D;%20A053603%20(*%20_Jean-Fran%C3%A7ois%20Alcover">] = 0; Do[k = i*(i+1)/2 + j*(j+1)/2; a[k] = a[k]+1, {i, 1, m}, {j, 1, m}]; A053603); counts[m = m0]; counts[m = 2*m]; While[ counts[m] != counts[m/2], m = 2*m]; A053603 (* _Jean-François Alcover, Sep 05 2013 *)
  • PARI
    istriang(n)={n>0 && issquare(8*n+1);}
    a(n) = { my(t=1, ct=0, j=1); while (tJoerg Arndt, Sep 05 2013

Formula

G.f.: ( Sum_{k>=1} x^(k*(k+1)/2) )^2. - Ilya Gutkovskiy, Dec 24 2016
a(n) = Sum_{k=1..n-1} c(k) * c(n-k), where c(n) = A010054(n). - Wesley Ivan Hurt, Jan 06 2024

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

A152089 Numbers k such that k! is not the sum of two nonnegative triangular numbers.

Original entry on oeis.org

6, 11, 12, 14, 18, 19, 20, 22, 23, 25, 26, 30, 31, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 67, 69, 70, 71, 73, 74, 75, 76, 77, 78, 82, 83, 84, 87, 88, 89, 90, 91, 92, 93, 94, 97, 98, 100, 101, 103, 104, 105, 106, 107, 108
Offset: 1

Views

Author

N. J. A. Sloane, Sep 24 2010

Keywords

Comments

Up to 300 these are also terms: 110, 111, 112, 113, 115, 116, 117, 119, 120, 121, 122, 123, 124, 127, 128, 130, 132, 136, 137, 138, 142, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 163, 166, 167, 168, 169, 170, 172, 174, 175, 176, 177, 179, 180, 181, 182, 183, 185, 186, 187, 188, 191, 193, 194, 195, 196, 197, 198, 200, 201, 202, 203, 204, 205, 206, 207, 210, 211, 213, 214, 215, 216, 218, 223, 225, 226, 227, 228, 229, 230, 231, 232, 236, 237, 238, 239, 240, 241, 243, 245, 246, 247, 249, 250, 251, 253, 255, 256, 257, 258, 260, 261, 262, 263, 265, 266, 267, 269, 270, 271, 272, 273, 274, 276, 278, 279, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 292, 293, 294, 295, 297, 298. - G. Guninski, Oct 12 2010

Crossrefs

Complement of A180590.
Cf. A051611.

Extensions

69 added by N. J. A. Sloane, Sep 24 2010 using the data from the Factor Database web site.
Further terms from G. Guninski and D. S. McNeil, Sep 24 2010
Terms from 93 on from G. Guninski, Oct 12 2010
Showing 1-6 of 6 results.