|
|
A216389
|
|
Number of values of k for which sigma(k) is a permutation of decimal digits of k, for k < 10^n.
|
|
0
|
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(3) = 7 because the values of k satisfying the condition for k < 10^3 are {1, 69, 258, 270, 276, 609, 639}. - V. Raman, Feb 17 2014
|
|
MATHEMATICA
|
With[{ds=Table[If[Sort[IntegerDigits[DivisorSigma[1, n]]]==Sort[ IntegerDigits[ n]], 1, 0], {n, 10^8}]}, Table[Total[Take[ds, 10^i]], {i, 8}]] (* Harvey P. Dale, Apr 20 2017 *)
|
|
PROG
|
(PARI) a(n)=sum(k=1, 10^n, vecsort(digits(k)) == vecsort(digits(sigma(k)))) \\ V. Raman, Feb 17 2014, based on edits by M. F. Hasler
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|