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

A002635 Number of partitions of n into 4 squares.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 3, 2, 2, 2, 2, 1, 1, 3, 3, 3, 3, 2, 2, 2, 1, 3, 4, 2, 4, 3, 3, 2, 2, 3, 4, 3, 2, 4, 2, 2, 2, 4, 5, 3, 5, 3, 5, 3, 1, 4, 5, 3, 3, 4, 3, 4, 2, 4, 6, 4, 4, 4, 5, 2, 3, 5, 5, 5, 5, 4, 4, 3, 2, 6, 7, 4, 5, 5, 5, 4, 2, 5, 9, 5, 3, 5, 4, 3, 1, 6, 7, 6, 7, 5, 7, 5, 3, 6, 7, 4
Offset: 0

Views

Author

Keywords

Comments

a(A124978(n)) = n; a(A006431(n)) = 1; a(A180149(n)) = 2; a(A245022(n)) = 3. - Reinhard Zumkeller, Jul 13 2014

Examples

			1: 1000; 2: 1100; 3:1110; 4: 2000 and 1111; 5: 2100; 6: 2110; 7: 2111; 8: 2200; 9: 3000 and 2210; 10: 3100 and 2211; etc.
		

References

  • G. Loria, Sulla scomposizione di un intero nella somma di numeri poligonali. (Italian) Atti Accad. Naz. Lincei. Rend. Cl. Sci. Fis. Mat. Nat. (8) 1, (1946). 7-15.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equivalent sequences for other numbers of squares: A010052 (1), A000161 (2), A000164 (3), A000174 (5), A000177 (6), A025422 (7), A025423 (8), A025424 (9), A025425 (10).

Programs

  • Haskell
    a002635 = p (tail a000290_list) 4 where
    p ks'@(k:ks) c m = if m == 0 then 1 else
    if c == 0 || m < k then 0 else p ks' (c - 1) (m - k) + p ks c m
    -- Reinhard Zumkeller, Jul 13 2014
  • Mathematica
    Length[PowersRepresentations[ #, 4, 2]] & /@ Range[0, 107] (* Ant King, Oct 19 2010 *)
  • PARI
    for(n=1,100,print1(sum(a=0,n,sum(b=0,a,sum(c=0,b,sum(d=0,c,if(a^2+b^2+c^2+d^2-n,0,1))))),","))
    
  • PARI
    a(n)=local(c=0); if(n>=0, forvec(x=vector(4,k,[0,sqrtint(n)]),c+=norml2(x)==n,1)); c
    

A061262 Smallest number representable as the sum of 3 triangular numbers in exactly n ways.

Original entry on oeis.org

0, 3, 12, 21, 52, 57, 91, 121, 136, 211, 192, 226, 409, 331, 367, 406, 511, 507, 886, 637, 772, 721, 871, 952, 1102, 1066, 1227, 1192, 1641, 1621, 1396, 1381, 1501, 1732, 1792, 1927, 1942, 2401, 2611, 2551, 2422, 2557, 2887, 2821, 3136, 3271, 3607, 3376
Offset: 1

Views

Author

Ed Pegg Jr, Apr 24 2001

Keywords

Comments

Fermat claimed, Euler tried, Gauss proved (July 10, 1796) that every number can be represented as a sum of three triangular numbers. I'm considering 0 as a triangular number here. If at first you do not succeed, tri + tri + tri again.
Conjecture: for n large enough, 1 < a(n)/n^2 < 2. - Benoit Cloitre, May 10 2003
Conjecture: No term a(n) with n > 2 is congruent to 0 or 3 modulo 5. - Zhi-Wei Sun, Feb 25 2015

Examples

			57 is the smallest number that can be represented by exactly 6 different triangular triple sums: {6, 6, 5}, {7, 7, 1}, {8, 5, 3}, {8, 6, 0}, {9, 3, 3}, {10, 1, 1}.
		

Crossrefs

Programs

  • Mathematica
    a = Table[ n(n + 1)/2, {n, 0, 85} ]; b = {0}; c = Table[0, {3655} ]; Do[ b = Append[b, a[[i] ] + a[[j]] + a[[k]]], {k, 1, 85}, {j, 1, k}, {i, 1, j} ]; b = Delete[b, 1]; b = Sort[b]; l = Length[b]; Do[ If[b[[n]] < 3655, c[[b[[n]] + 1]]++ ], {n, 1, l} ]; Do[ k = 1; While[ c[[k]] != n, k++ ]; Print[k - 1], {n, 1, 48} ]

A176661 Partial sums of A061262.

Original entry on oeis.org

0, 3, 15, 36, 88, 145, 236, 357, 493, 704, 896, 1122, 1531, 1862, 2229, 2635, 3146, 3653, 4539, 5176, 5948, 6669, 7540, 8492, 9594, 10660, 11887, 13079, 14720, 16341, 17737, 19118, 20619, 22351, 24143, 26070, 28012, 30413, 33024, 35575, 37997
Offset: 0

Views

Author

Jonathan Vos Post, Apr 23 2010

Keywords

Comments

Partial sums of smallest number representable as the sum of 3 triangular numbers in exactly n ways. The subsequence of triangular numbers in the partial sum begins: 3, 15, 36. The subsequence of primes in the partial sum begins: 3, 1531, 11887, 17737, 37997, 43441.

Examples

			a(13) = 0 + 3 + 12 + 21 + 52 + 57 + 91 + 121 + 136 + 211 + 192 + 226 + 409 = 1531 is prime.
		

Crossrefs

Formula

a(n) = SUM[i=0..n] A061262(i).
Showing 1-3 of 3 results.