OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems (invphi.gp).
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
KEYWORD
nonn,changed
AUTHOR
Michel Lagneau, Mar 27 2011
EXTENSIONS
a(23)-a(32) from Donovan Johnson, Jul 28 2011
STATUS
approved