OFFSET
0,3
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 0..1000
FORMULA
a(2^k - 1) = 2^(2^k - 1) for k >= 2.
EXAMPLE
MAPLE
children:= proc(r) local L, x, p, q, t, R;
x:= r[1];
L:= r[2];
t:= L[-1];
p:= t[1]; q:= nextprime(p);
if t[2]=1 then t:= [q, 1];
else t:= [p, t[2]-1], [q, 1]
fi;
R:= [x*q/p, [op(L[1..-2]), t]];
if nops(L) >= 2 then
p:= L[-2][1];
q:= L[-1][1];
if L[-2][2]=1 then t:= [q, L[-1][2]+1]
else t:= [p, L[-2][2]-1], [q, L[-1][2]+1]
fi;
R:= R, [x*q/p, [op(L[1..-3]), t]]
fi;
[R]
end proc:
f:= proc(n)
uses priqueue;
local pq, t, x, V, F;
initialize(pq);
insert([-2^n, [[2, n]]], pq);
do
V:= extract(pq);
x:= -V[1]; F:= V[2];
if (x * add(t[2]/t[1], t=F)) mod mul(t[2]+1, t=F) = 0
then return(x) fi;
for t in children(V) do insert(t, pq) od;
od;
end proc:
1, 0, seq(f(n), n=2..40);
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, May 06 2024
STATUS
approved