OFFSET
0,2
COMMENTS
phi(x) is a power of 2 if and only if x is a power of 2 multiplied by a product of distinct Fermat primes. So if, as is conjectured, there are only 5 Fermat primes, then there are only 32 possibilities for the odd part of x, namely the divisors of 2^32-1, given in A004729.
The same numbers, in increasing order, are given in A003401.
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
EXAMPLE
Triangle begins:
{ 1, 2},
{ 3, 4, 6},
{ 5, 8, 10, 12},
{15, 16, 20, 24, 30},
{17, 32, 34, 40, 48, 60},
{51, 64, 68, 80, 96, 102, 120},
{85, 128, 136, 160, 170, 192, 204, 240},
...
MATHEMATICA
phiinv[ n_, pl_ ] := Module[ {i, p, e, pe, val}, If[ pl=={}, Return[ If[ n==1, {1}, {} ] ] ]; val={}; p=Last[ pl ]; For[ e=0; pe=1, e==0||Mod[ n, (p-1)pe/p ]==0, e++; pe*=p, val=Join[ val, pe*phiinv[ If[ e==0, n, n*p/pe/(p-1) ], Drop[ pl, -1 ] ] ] ]; Sort[ val ] ]; phiinv[ n_ ] := phiinv[ n, Select[ 1+Divisors[ n ], PrimeQ ] ]; Join@@(phiinv[ 2^# ]&/@Range[ 0, 10 ]) (* phiinv[ n, pl ] = list of x with phi(x)=n and all prime divisors of x in list pl. phiinv[ n ] = list of x with phi(x)=n *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Labos Elemer, Nov 30 2000
EXTENSIONS
Edited by Dean Hickerson, Jan 25 2002
STATUS
approved