This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A216391 #43 Nov 09 2024 04:38:07 %S A216391 1,1,1,1,2,3,3,3,5,5,5,8,19,21,34,55,81,130,221,407,515,850,1787,2287, %T A216391 3968,8176,12332,18560,36832,71375,94015,173754 %N A216391 Number of values of k for which phi(k) is a permutation of decimal digits of k, for k < 2^n. %C A216391 Partial sums of A216394. %F A216391 a(n) = # { k in A115921 | k < 2^n }. - _M. F. Hasler_, Feb 24 2014 %e A216391 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 %p A216391 A216391 := proc(n) %p A216391 local a,k,kdgs,pdgs ; %p A216391 a := 0 ; %p A216391 for k from 1 to 2^n do %p A216391 kdgs := sort(convert(k,base,10)) ; %p A216391 numtheory[phi](k) ; %p A216391 pdgs := sort(convert(%,base,10)) ; %p A216391 if pdgs = kdgs then %p A216391 a := a+1 ; %p A216391 end if; %p A216391 end do: %p A216391 a ; %p A216391 end proc: %p A216391 for n from 1 do %p A216391 print(A216391(n)) ; %p A216391 end do: # _R. J. Mathar_, Mar 04 2014 %o A216391 (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 %Y A216391 Cf. A000010, A115921, A216394. %K A216391 nonn,base,more %O A216391 1,5 %A A216391 _V. Raman_, Sep 06 2012 %E A216391 a(28)-a(32) from _Amiram Eldar_, Nov 09 2024