login
A184968
Smallest k such that phi(phi(k)) = 2^n, where phi is the Euler totient function.
1
5, 11, 17, 41, 85, 137, 257, 641, 1285, 2329, 4369, 10537, 17477, 35209, 65537, 163841, 297109, 557057, 1114129, 2687017, 4491589, 8978569, 16843009, 42009217, 71304257, 143163649, 286331153, 690563369, 1145390149, 2281701377, 4295098369, 10737647617
OFFSET
1,1
EXAMPLE
a(5) = 85 because phi(85) = 64, phi(64) = 2^5.
MAPLE
with(numtheory):for n from 1 to 22 do: id:=0:for k from 1 to 10000000 while(id=0)
do: if phi(phi(k)) =2^n then id:=1:print(k):else fi:od:od:
# Alternative:
f:= proc(n) local S, s, r;
uses numtheory;
S:= sort(convert(invphi(2^n), list));
r:= infinity;
for s in S while s < r do
r:= min(r, min(invphi(s)))
od;
r
end proc:
map(f, [$1..50]); # Robert Israel, Mar 22 2017
PROG
(PARI) a(n) = {my(v = invphi(2^n), m); for(i = 1, #v, m = invphiMin(v[i]); v[i] = max(m, 0)); vecmin(select(x -> x > 0, v)); } \\ Amiram Eldar, Nov 15 2024, using Max Alekseyev's invphi.gp
CROSSREFS
Sequence in context: A088903 A094205 A136091 * A341357 A022004 A339503
KEYWORD
nonn,changed
AUTHOR
Michel Lagneau, Mar 27 2011
EXTENSIONS
a(23)-a(32) from Donovan Johnson, Jul 28 2011
STATUS
approved