A326746 a(n) = (sum of digits of n) mod (sum of digits of n+1).
0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 2, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 8, 9, 10, 11, 12, 13, 14, 15, 16, 8, 9, 10
Offset: 0
Examples
a(1) = sum of digits of 1 mod sum of digits of 2 = 1 mod 2 = 1. a(9) = sum of digits of 9 mod sum of digits of 10 = 9 mod 1 = 0. a(38) = sum of digits of 38 mod sum of digits of 39 = 11 mod 12 = 11. a(39) = sum of digits of 39 mod sum of digits of 40 = 12 mod 4 = 0.
Links
- Scott R. Shannon, Table of n, a(n) for n = 0..19999
- Scott R. Shannon, Frequency distribution for a(n), where 0 <= a(n) <= 89, for n up to 10^10. The large peak is a(n) = 8, which occurs 900169158 times. The smaller peak is a(n) = 17. There is also a small bump on the bell-curve at a(n) = 26; this may become a separate peak when n >> 10^10. The bell-curve maximum value is at a(n) = 44.
Programs
-
Mathematica
sod[n_] := Plus @@ IntegerDigits@ n; a[n_] := Mod[sod[n], sod[n+1]]; Array[a, 100, 0] (* Giovanni Resta, Oct 19 2019 *)
-
PARI
a(n) = sumdigits(n) % sumdigits(n+1); \\ Michel Marcus, Oct 19 2019
Comments