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

A348524 Number of compositions (ordered partitions) of n into two or more cubes.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23, 29, 36, 44, 53, 64, 78, 96, 119, 150, 187, 232, 286, 351, 430, 527, 649, 802, 993, 1230, 1522, 1880, 2318, 2854, 3514, 4330, 5341, 6594, 8145, 10061, 12423, 15330, 18908, 23316, 28753, 35467, 43762
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 21 2021

Keywords

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember;
         local i,m,t;
         m:= surd(n,3);
         if m::integer then t:= 1; m:= m-1 else t:= 0; m:= floor(m) fi;
         t + add(procname(n-i^3),i=1..m)
    end proc:
    f:= proc(n) local m;
        m:= surd(n,3);
        if m::integer then g(n)-1 else g(n) fi
    end proc:
    f(0):= 0:
    map(f, [$0..100]);
  • Mathematica
    g[n_] := g[n] = Module[{m, t}, m = n^(1/3); If[IntegerQ[m], t = 1; m = m - 1, t = 0; m = Floor[m]]; t + Sum[g[n - i^3], {i, 1, m}]];
    f[n_] := Module[{m}, m = n^(1/3); If[IntegerQ[m], g[n]-1, g[n]]];
    f[0] = 0;
    Map[f, Range[0, 100]] (* Jean-François Alcover, Sep 19 2022, after Robert Israel *)
Showing 1-1 of 1 results.