login
A378765
(Exponent of the highest power of 2 that divides n!), reduced modulo 10.
1
0, 0, 1, 1, 3, 3, 4, 4, 7, 7, 8, 8, 0, 0, 1, 1, 5, 5, 6, 6, 8, 8, 9, 9, 2, 2, 3, 3, 5, 5, 6, 6, 1, 1, 2, 2, 4, 4, 5, 5, 8, 8, 9, 9, 1, 1, 2, 2, 6, 6, 7, 7, 9, 9, 0, 0, 3, 3, 4, 4, 6, 6, 7, 7, 3, 3, 4, 4, 6, 6, 7, 7, 0, 0, 1, 1, 3, 3, 4, 4, 8, 8, 9, 9, 1, 1, 2, 2, 5, 5, 6, 6, 8, 8, 9, 9, 4, 4, 5, 5, 7, 7, 8, 8, 1
OFFSET
0,5
COMMENTS
Is not periodic, but the distributions of the ten results is normal.
LINKS
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