OFFSET
0,1
COMMENTS
Inspired by a comment from Robert G. Wilson v in sequence A112329.
LINKS
Ray Chandler, Table of n, a(n) for n = 0..3322 [terms <= 1000 digits]
FORMULA
a(p) = 2^(p+1) for prime p >= 5.
MATHEMATICA
g[lst_, p_]:=Module[{t, i, j}, Union[Flatten[Table[t=lst[[i]]; t[[j]]=p*t[[j]]; Sort[t], {i, Length[lst]}, {j, Length[lst[[i]]]}], 1], Table[Sort[Append[lst[[i]], p]], {i, Length[lst]}]]]; f[n_]:=Module[{i, j, p, e, lst={{}}}, {p, e}=Transpose[FactorInteger[n]]; Do[lst=g[lst, p[[i]]], {i, Length[p]}, {j, e[[i]]}]; lst];
nmax=100;
a1={2, 1, 3};
Do[
least=Infinity;
fn=f[n];
Do[
exps=Reverse[fnitem]-1;
odd=even=1;
cnt=0;
Do[
cnt++;
odd*=(Prime[cnt+1]^exp);
even*=(Prime[cnt]^exp);
, {exp, exps}];
least=Min[least, odd, 4even];
, {fnitem, fn}];
AppendTo[a1, least];
, {n, 3, nmax}];
a1
PROG
(PARI) d(n) = if (denominator(n)==1, numdiv(n), 0);
f(n) = numdiv(n) - 2*d(n/2) + 2*d(n/4);
a(n) = {my(k = 1); while (f(k) != n, k++); k; } \\ Michel Marcus, Jul 30 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Ray Chandler, Aug 24 2014
STATUS
approved