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 A216394 #27 Jan 07 2025 15:16:22 %S A216394 1,0,0,0,1,1,0,0,2,0,0,3,11,2,13,21,26,49,91,186,108,335,937,500,1681, %T A216394 4208,4156 %N A216394 Number of values of k for which phi(k) is a permutation of decimal digits of k, for 2^(n-1) < k < 2^n. %F A216394 a(n) = # { k in A115921 | 2^(n-1) < k < 2^n }. - _M. F. Hasler_, Feb 24 2014 %e A216394 a(14) = 2 because the values of k satisfying the condition for 2^13 < k < 2^14 are {8541, 8982}. - _V. Raman_, Feb 18 2014 %o A216394 (PARI) a(n)=sum(k=2^(n-1), 2^n, vecsort(digits(k)) == vecsort(digits(eulerphi(k)))) \\ _V. Raman_, Feb 18 2014, based on edits by _M. F. Hasler_ %o A216394 (Python) %o A216394 from sympy import totient %o A216394 def A216394(n): %o A216394 if n == 1: %o A216394 return 1 %o A216394 c = 0 %o A216394 for i in range(2**(n-1)+1, 2**n): %o A216394 s1, s2 = sorted(str(i)), sorted(str(totient(i))) %o A216394 if len(s1) == len(s2) and s1 == s2: %o A216394 c += 1 %o A216394 return c # _Chai Wah Wu_, Jul 23 2015 %Y A216394 Cf. A115921, A000010. %K A216394 nonn,base,more %O A216394 1,9 %A A216394 _V. Raman_, Sep 06 2012