OFFSET
0,5
COMMENTS
Is not periodic, but the distributions of the ten results is normal.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = A011371(n) mod 10.
EXAMPLE
a(100) = 7 because 2^50, 4^25, 8^12, 16^6, 32^3, 64^1 all divide 100, and the sum of their exponents is 97. 97 (mod 10) = 7.
MATHEMATICA
a[n_] := Mod[ Plus @@ Rest@ NestWhileList[ Floor[#/2] &, n, UnsameQ[##] &, All], 10]; Array[a, 105, 0] (* or *)
a[n_] := Mod[n - DigitCount[n, 2, 1], 10]; Array[a, 105, 0]
Table[Mod[IntegerExponent[n!, 2], 10], {n, 0, 110}] (* Harvey P. Dale, Feb 22 2026 *)
PROG
(PARI) a(n) = (n - hammingweight(n)) % 10; \\ Michel Marcus, Dec 29 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Dec 28 2024
STATUS
approved
