A372808 a(n) = sum of the digits (mod 5) of 5^n.
1, 0, 2, 3, 3, 6, 4, 8, 10, 11, 10, 18, 18, 13, 9, 14, 18, 26, 24, 29, 26, 27, 27, 29, 32, 37, 34, 34, 40, 38, 36, 39, 46, 49, 38, 47, 39, 49, 44, 54, 60, 57, 60, 64, 66, 71, 52, 48, 55, 63, 71, 67, 70, 59, 52, 52, 71, 85, 96, 96, 84, 89, 87, 85, 76, 74, 71, 80
Offset: 0
Examples
a(7) = 8 since 5^7 = 78125 and (7 mod 5) + (8 mod 5) + (1 mod 5) + (2 mod 5) + (5 mod 5) = 2 + 3 + 1 + 2 + 0 = 8.
Links
- Paolo Xausa, Table of n, a(n) for n = 0..10000
- J. M. Borwein and P. B. Borwein, Strange Series and High Precision Fraud, The American Mathematical Monthly, Vol. 99, No. 7 (1992), pp. 622-640.
Programs
-
Mathematica
Array[Total[Mod[IntegerDigits[5^#], 5]] &, 100, 0]
-
PARI
a(n) = my(d=digits(5^n)); vecsum(apply(x->(x % 5), d)); \\ Michel Marcus, May 17 2024
Formula
Sum_{n >= 1} a(n)/5^n = 1/9. See Example 5.1 (e) in Borwein and Borwein (1992), p. 639.