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.

A061791 Number of distinct sums i^3 + j^3 for 1<=i<=j<=n.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 77, 90, 104, 119, 134, 151, 169, 188, 208, 229, 251, 274, 297, 322, 348, 374, 402, 431, 461, 492, 523, 556, 588, 623, 658, 695, 733, 771, 810, 851, 893, 936, 980, 1025, 1071, 1118, 1164, 1213, 1263, 1313, 1365, 1417
Offset: 1

Views

Author

Labos Elemer, Jun 22 2001

Keywords

Examples

			If the {s+t} sums are generated by addition 2 terms of an S set consisting of n different entries, then at least 1, at most n(n+1)/2=A000217(n) distinct values can be obtained. The set of first n cubes gives results falling between these two extremes. E.g. S={1,8,27,...,2744,3375} provides 119 different sums of two, not necessarily different cubes:{2,9,....,6750}. Only a single sum occurs more than once: 1729(Ramanujan): 1729=1+1728=729+1000.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := x^3 t=Table[Length[Union[Flatten[Table[f[u]+f[w], {w, 1, m}, {u, 1, m}]]]], {m, 1, 75}]
  • Ruby
    def A(n)
      h = {}
      (1..n).each{|i|
        (i..n).each{|j|
          k = i * i * i + j * j * j
          if h.has_key?(k)
            h[k] += 1
          else
            h[k] = 1
          end
        }
      }
      h.size
    end
    def A061791(n)
      (1..n).map{|i| A(i)}
    end
    p A061791(60) # Seiichi Manyama, May 14 2024