A141803 Triangle read by rows derived from generalized Thue-Morse sequences.
1, 1, 1, 1, 2, 0, 1, 2, 1, 1, 1, 2, 3, 2, 0, 1, 2, 3, 1, 0, 0, 1, 2, 3, 4, 2, 2, 1, 1, 2, 3, 4, 1, 3, 0, 1, 1, 2, 3, 4, 5, 2, 0, 1, 0, 1, 2, 3, 4, 5, 1, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 2, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 1, 3, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 2, 4, 2, 1, 2, 1, 1, 2, 3, 4, 5, 6, 7, 1, 3, 5, 3, 3, 0, 1
Offset: 1
Examples
First few rows of the array are: 1, 1, 0, 1, 0, 0, 1, 1,... 1, 2, 1, 2, 0, 2, 0, 1,... 1, 2, 3, 1, 2, 3, 0, 2,... 1, 2, 3, 4, 1, 2, 3, 4,... 1, 2, 3, 4, 5, 1, 2, 3,... 1, 2, 3, 4, 5, 6, 1, 2,... ... Triangle = antidiagonals of the array: 1; 1, 1; 1, 2, 0; 1, 2, 1, 1; 1, 2, 3, 2, 0; 1, 2, 3, 1, 0, 0; 1, 2, 3, 4, 2, 2, 1; 1, 2, 3, 4, 1, 3, 0, 1; 1, 2, 3, 4, 5, 2, 0, 1, 0; 1, 2, 3, 4, 5, 1, 3, 2, 1, 0; 1, 2, 3, 4, 5, 6, 2, 4, 3, 2, 1; 1, 2, 3, 4, 5, 6, 1, 3, 0, 0, 0, 0; 1, 2, 3, 4, 5, 6, 7, 2, 4, 2, 1, 2, 1; 1, 2, 3, 4, 5, 6, 7, 1, 3, 5, 3, 3, 0, 1; ... a(8) = 2, = (3,2) of the array indicating that in the sequence 1,2,3,...mod 4, sum of digits of "2" mod 4 = 2.
Links
- Ivan Neretin, Table of n, a(n) for n = 1..8001
Programs
-
Mathematica
Flatten@Table[Mod[Total@IntegerDigits[n - i, i], i], {n, 16}, {i, n - 1, 2, -1}] (* Ivan Neretin, Jun 18 2018 *)
Extensions
Explanation in the Comments section corrected by Andrey Zabolotskiy, May 18 2016
Comments