|
|
A216391
|
|
Number of values of k for which phi(k) is a permutation of decimal digits of k, for k < 2^n.
|
|
1
|
|
|
1, 1, 1, 1, 2, 3, 3, 3, 5, 5, 5, 8, 19, 21, 34, 55, 81, 130, 221, 407, 515, 850, 1787, 2287, 3968, 8176, 12332
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(12) = 8 because the values of k satisfying the condition for k < 2^12 are {1, 21, 63, 291, 502, 2518, 2817, 2991}. - V. Raman, Feb 18 2014
|
|
MAPLE
|
local a, k, kdgs, pdgs ;
a := 0 ;
for k from 1 to 2^n do
kdgs := sort(convert(k, base, 10)) ;
numtheory[phi](k) ;
pdgs := sort(convert(%, base, 10)) ;
if pdgs = kdgs then
a := a+1 ;
end if;
end do:
a ;
end proc:
for n from 1 do
|
|
PROG
|
(PARI) a(n)=sum(k=1, 2^n, vecsort(digits(k)) == vecsort(digits(eulerphi(k)))) \\ V. Raman, Feb 18 2014, edited by M. F. Hasler, Mar 04 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|