OFFSET
0,16
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
EXAMPLE
a(30) = #{30, 15+14+1, 14+10+6} = 3;
a(31) = #{30+1, 21+10, 15+10+6, 14+10+6+1} = 4;
a(32) = #{26+6, 22+10, 21+10+1, 15+10+6+1} = 4;
a(33) = #{33, 26+6+1, 22+10+1} = 3;
a(34) = #{34, 33+1} = 2;
a(35) = #{35, 34+1, 21+14, 15+14+6} = 4;
a(36) = #{35+1, 30+6, 26+10, 22+14, 21+15, 21+14+1, 15+14+6+1} = 7.
MAPLE
b:= proc(n, i) option remember; `if`(i*(i+1)/2<n, 0,
`if`(n=0, 1, b(n, i-1) +`if`(i<=n and not
isprime(i) and issqrfree(i), b(n-i, i-1), 0)))
end:
a:= n-> b(n$2):
seq(a(n), n=0..100); # Alois P. Heinz, Jun 02 2015
MATHEMATICA
b[n_, i_] := b[n, i] = If[i*(i+1)/2<n, 0, If[n==0, 1, b[n, i-1] + If[i <= n && !PrimeQ[i] && SquareFreeQ[i], b[n-i, i-1], 0]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jan 15 2016, after Alois P. Heinz *)
PROG
(Haskell)
a239509 = p a000469_list where
p _ 0 = 1
p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Mar 21 2014
STATUS
approved