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 A216395 #28 Jan 07 2025 15:16:27 %S A216395 1,0,0,0,0,0,1,0,3,2,0,6,3,5,14,22,26,60,64,71,179,333,274,751,1653, %T A216395 1726,3032 %N A216395 Number of values of k for which sigma(k) is a permutation of decimal digits of k, for 2^(n-1) < k < 2^n. %F A216395 a(n) = # { k in A115920 | 2^(n-1) < k < 2^n }. - _M. F. Hasler_, Feb 24 2014 %e A216395 a(12) = 6 because the values of k satisfying the condition for 2^11 < k < 2^12 are {2391, 2556, 2931, 3409, 3678, 3679}. - _V. Raman_, Feb 19 2014 %o A216395 (PARI) a(n)=sum(k=2^(n-1), 2^n, vecsort(digits(k)) == vecsort(digits(sigma(k)))) \\ _V. Raman_, Feb 19 2014, based on edits by _M. F. Hasler_ %o A216395 (Python) %o A216395 from sympy import divisor_sigma %o A216395 def A216395(n): %o A216395 if n == 1: %o A216395 return 1 %o A216395 c = 0 %o A216395 for i in range(2**(n-1)+1, 2**n): %o A216395 s1, s2 = sorted(str(i)), sorted(str(divisor_sigma(i))) %o A216395 if len(s1) == len(s2) and s1 == s2: %o A216395 c += 1 %o A216395 return c # _Chai Wah Wu_, Jul 23 2015 %Y A216395 Cf. A115920, A000203. %K A216395 nonn,base,more %O A216395 1,9 %A A216395 _V. Raman_, Sep 06 2012