A243590 Numbers returned when each digit of n is replaced by the sum modulo 10 of the digits to its (wrapped) left and (wrapped) right.
2, 4, 6, 8, 0, 2, 4, 6, 8, 2, 22, 42, 62, 82, 2, 22, 42, 62, 82, 4, 24, 44, 64, 84, 4, 24, 44, 64, 84, 6, 26, 46, 66, 86, 6, 26, 46, 66, 86, 8, 28, 48, 68, 88, 8, 28, 48, 68, 88, 0, 20, 40, 60, 80, 0, 20, 40, 60, 80, 2, 22, 42, 62, 82, 2, 22, 42, 62, 82, 4, 24
Offset: 1
Examples
For 1, the function returns (1 + 1) mod 10 = 2. For 5, the function returns (5 + 5) mod 10 = 0. For 125, the initial digits are (1,2,5). d(1) <- (d(3) + d(2)) mod 10 = (5 + 2) mod 10 = 7; d(2) <- (d(1) + d(3)) mod 10 = (1 + 5) mod 10 = 6; d(3) <- (d(2) + d(1)) mod 10 = (2 + 1) mod 10 = 3. The function returns (7,6,3) = 763.
Links
- Anthony Sand, Table of n, a(n) for n = 1..1000
Formula
for digits d(1)..d(t), d(i) = (d(i-1) + d(i+1)) mod 10, where (i-1 = 0) -> t, (i+1 > t) -> 1.
Comments