|
|
A326746
|
|
a(n) = (sum of digits of n) mod (sum of digits of n+1).
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
For n > 100 the maximum value of a(n) increases by 1 a total of nine times for every order-of-magnitude increase of n; for n up to 10^10 the largest value of a(n) is 89.
The frequency of occurrence for the values of a(n) for large values of n has an interesting distribution - it is a bell-shaped curve but with large increases for a(n) = 8, and a smaller increase for a(n) = 17. The value a(n) = 8 is likely the most common value as every time n increases by 100 the value of a(n) goes through ten smaller cycles, and 8 appears to be the only value that is present in all ten cycles. The reason a(n) = 17 also appears more often is not clear, although the distribution for n up to 10^10 also shows a slight increase in the number of occurrences for a(n) = 26, suggesting that a(n) values of the form a(n) = 8 + 9 * k, where k >= 0, occur more frequently than one would predicted from the surrounding bell-curve distribution.
The sequence is unbounded because a(10^k-2) = 9*k-1 for k>0. - Giovanni Resta, Oct 19 2019
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
MATHEMATICA
|
sod[n_] := Plus @@ IntegerDigits@ n; a[n_] := Mod[sod[n], sod[n+1]]; Array[a, 100, 0] (* Giovanni Resta, Oct 19 2019 *)
|
|
PROG
|
(PARI) a(n) = sumdigits(n) % sumdigits(n+1); \\ Michel Marcus, Oct 19 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|