proposed
approved
proposed
approved
editing
proposed
a(n) = # { k in A115920 | k < 2^n }. - M. F. Hasler, Feb 24 2014
(PARI) a(n)=sum(k=1, 2^n, vecsort(digits(k)) == vecsort(digits(sigma(k)))) \\ Use digits(n)=eval(Vec(Str(n))) in old versions of PARI. - __V. Raman_, Feb 18 2014, based on edits by M. F. Hasler
a(n) = # { k in A115920 | k < 2^n }. - M. F. Hasler, Feb 24 2014
(PARI) a(n)=sum(k=1, 2^n, vecsort(digits(k)) == vecsort(digits(sigma(k)))) \\ Use digits(n) = vectoreval(lengthVec(Str(n)), i, truncate(n/(10^(i-1)))%10) in old versions of PARI. - _V. Raman_, Feb 18 2014, based on edits by _M. F. Hasler_
a(n)=m=0; for(k=1, 2^n, if(vecsort(digits(k))==vecsort(digits(sigma(k))), m++)); m \\ V. Raman, Feb 18 2014
approved
editing
proposed
approved
editing
proposed
(PARI) digits(n) = vecsort(vector(length(Str(n)), i, truncate(n/(10^(i-1)))%10))
a(n)=m=0; for(k=1, 2^n, if(vecsort(digits(k))==vecsort(digits(sigma(k)), ), m++)); m \\ V. Raman, Feb 18 2014
proposed
editing
editing
proposed
a(10) = 7 because the values of k satisfying the condition for k < 2^10 are {1, 69, 258, 270, 276, 609, 639}. - _V. Raman, _, Feb 18 2014
(PARI) digits(n) = vecsort(vector(length(Str(n)), i, truncate(n/(10^(i-1)))%10))
proposed
editing