OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..5000
FORMULA
From Vaclav Kotesovec, May 24 2018: (Start)
a(n) ~ c * 3^(n/3), where
c = 5.0144820680945600131204662934686439430547... if mod(n,3)=0
c = 4.6144523178014379613985400559486878971522... if mod(n,3)=1
c = 4.5237761454818383598444208605033385016299... if mod(n,3)=2
(End)
EXAMPLE
a(6) = 59: (1^6) + (2+1^4) + (2^2+1^2) + (2^3) + (3+1^3) + (3+2+1) + (3^2) + (4+1^2) + (4+2) + (5+1) + (6) = 1+3+5+8+4+6+9+5+6+6+6 = 59.
MAPLE
b:= proc(n, p) option remember; `if`(n=0, [1, 0], `if`(p<1, [0, 0],
add((l->`if`(m=0, l, l+[0, l[1]*p^m]))(b(n-p*m, p-1)), m=0..n/p)))
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=0..40);
MATHEMATICA
b[n_, p_] := b[n, p] = If[n==0, {1, 0}, If[p<1, {0, 0}, Sum[Function[l, If[m==0, l, l+{0, l[[1]]*p^m}]][b[n-p*m, p-1]], {m, 0, n/p}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 15 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 27 2013
STATUS
approved