OFFSET
0,3
COMMENTS
a(n) > tau(n) + A(n) + R(n), where tau(n) = number of divisors of n, A(n) = product of powers of nontrivial divisors whose sum with multiplicity is < n and R(n) = numbers of the form r^(k) > n where r is a divisor of n and k <= n/r.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = 2 <=> n in { A000040 }. - Alois P. Heinz, Oct 28 2021
EXAMPLE
a(10) = 10, the numbers arising are 1,2,4,5,8,10,16,20,25 and 32; e.g. 25 = 5*5, 8 = 2*2*2*1*1*1*1, 32 = 2*2*2*2*2, etc.
MAPLE
with(numtheory):
a:= proc(n) local b, l, s;
l:= sort([divisors(n)[]]);
b:= proc(n, i, p)
if n<0 then
elif n=0 then s:= s union {p}
elif i=0 then
else b(n-l[i], i, p*l[i]); b(n, i-1, p)
fi
end;
s:= {};
b(n, nops(l), 1);
nops(s)
end:
seq(a(n), n=0..60); # Alois P. Heinz, Feb 21, 2011
MATHEMATICA
a[n_] := Module[{ b, l, s}, l = Divisors[n]; b[m_, i_, p_] := Which[m<0, , m == 0, s = Union[s, {p}], i == 0, , True, b[m - l[[i]], i, p*l[[i]]]; b[m, i-1, p]]; s = {}; b[n, Length[l], 1]; Length[s]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Mar 27 2004
EXTENSIONS
More terms from Vladeta Jovovic, Aug 06 2005
More terms from Alois P. Heinz, Feb 21 2011
a(0)=1 prepended by Alois P. Heinz, Oct 28 2021
STATUS
approved