OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = min { k : A122651(k) = n }.
EXAMPLE
MAPLE
with(numtheory):
a:= proc() local t, a, b, bb;
t:= -1;
a:= proc() -1 end;
bb:= proc(n) option remember;
`if`(n=0, 1, add(bb((n-d)/d), d=divisors(n) minus{1}))
end:
b:= n-> `if`(n=0, 1, bb(n)+bb(n-1));
proc(n) local h;
while a(n) = -1 do
t:= t+1;
h:= b(t);
if a(h) = -1 then a(h):= t fi
od; a(n)
end
end():
seq(a(n), n=1..100);
MATHEMATICA
b[0]=1; b[n_] := b[n] = Sum[b[(n-d)/d], {d, Divisors[n] // Rest}]; a[0] = 1; a[n_] := For[k=0, True, k++, If[b[k]+b[k-1] == n, Return[k]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Dec 03 2014, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Alois P. Heinz, Mar 28 2011
STATUS
approved