login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216396 Number of values of k for which sigma(k)-k is a permutation of decimal digits of k, for 2^(n-1) < k < 2^n. 1

%I #25 Jul 23 2015 22:21:39

%S 0,0,1,0,1,0,0,0,2,1,1,2,5,4,15,15,16,35,91,90,158,345,586,694,1549,

%T 2700,3363

%N Number of values of k for which sigma(k)-k is a permutation of decimal digits of k, for 2^(n-1) < k < 2^n.

%F a(n) = # { k in A085844 | 2^(n-1) < k < 2^n }. - _M. F. Hasler_, Feb 24 2014

%e a(13) = 5 because the values of k satisfying the condition for 2^12 < k < 2^13 are {4672, 4896, 5046, 7785, 8128}. - _V. Raman_, Feb 19 2014

%o (PARI) a(n)=sum(k=2^(n-1), 2^n, vecsort(digits(k)) == vecsort(digits(sigma(k)-k))) \\ _V. Raman_, Feb 19 2014, based on edits by _M. F. Hasler_

%o (Python)

%o from sympy import divisor_sigma

%o def A216396(n):

%o ....c = 0

%o ....for i in range(2**(n-1)+1,2**n):

%o ........s1, s2 = sorted(str(i)),sorted(str(divisor_sigma(i)-i))

%o ........if len(s1) == len(s2) and s1 == s2:

%o ............c += 1

%o ....return c # _Chai Wah Wu_, Jul 23 2015

%Y Cf. A085844, A001065.

%K nonn,base,more

%O 1,9

%A _V. Raman_, Sep 06 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)