OFFSET
0,3
COMMENTS
Not surprisingly, the sequence has a nice self-similar structure. It can be written as a table with rows of length 10, which are of the form [a,b,c,d; r,s,t; x,y,z], b = a+1 etc, where in all rows r = 0, 1, 2, 4, 5, 7, 8, ... with r not congruent to 3, 6 or 9 (mod 10), (r,s,t) = (x,y,z) = (b,c,d). When r == 3 (mod 10), then (r,s,t) = (x,y,z); when r == 6 (mod 10), then (r,s,t) = (b,c,d).
In rows 3, 13, 23, 43, 53, 63, ... one has r = x = a-2 (i.e., t = z = a),
in rows 6, 16, 26, 36, 46, 56, 76, ... one has r = b but x = a-2 (i.e., z = a),
in rows 33, 133, ... one has r = x = a-5,
in rows 66, 166, ... one has r = b but x = a-5.
The rows can also be partitioned in groups of 4+3+3 with the initial terms of the rows having exactly the same pattern as the rows, including exceptions. In particular, the first 4 X 4 or 3 X 4 block of these groups (of 4 X 10 resp. 3 X 10 terms) always have constant antidiagonals.
FORMULA
EXAMPLE
Written in rows of 4+3+3 terms, grouped in the same pattern, the table reads:
.
a( 0) = 0, 1, 2, 3, 1, 2, 3, 1, 2, 3,
a( 10) = 1, 2, 3, 4, 2, 3, 4, 2, 3, 4,
a( 20) = 2, 3, 4, 5, 3, 4, 5, 3, 4, 5,
a( 30) = 3, 4, 5, 6, 1, 2, 3, 1, 2, 3,
.
a( 40) = 1, 2, 3, 4, 2, 3, 4, 2, 3, 4,
a( 50) = 2, 3, 4, 5, 3, 4, 5, 3, 4, 5,
a( 60) = 3, 4, 5, 6, 4, 5, 6, 1, 2, 3,
.
a( 70) = 1, 2, 3, 4, 2, 3, 4, 2, 3, 4,
a( 80) = 2, 3, 4, 5, 3, 4, 5, 3, 4, 5,
a( 90) = 3, 4, 5, 6, 4, 5, 6, 4, 5, 6,
.
a(100) = 1, 2, 3, 4, 2, 3, 4, 2, 3, 4,
a(110) = 2, 3, 4, 5, 3, 4, 5, 3, 4, 5,
a(120) = 3, 4, 5, 6, 4, 5, 6, 4, 5, 6,
a(130) = 4, 5, 6, 7, 2, 3, 4, 2, 3, 4,
.
a(140) = 2, 3, 4, 5, 3, 4, 5, 3, 4, 5,
a(150) = 3, 4, 5, 6, 4, 5, 6, 4, 5, 6,
a(160) = 4, 5, 6, 7, 5, 6, 7, 2, 3, 4,
.
a(170) = 2, 3, 4, 5, 3, 4, 5, 3, 4, 5,
a(180) = 3, 4, 5, 6, 4, 5, 6, 4, 5, 6,
a(190) = 4, 5, 6, 7, 5, 6, 7, 5, 6, 7,
(...)
a(330) = 6, 7, 8, 9, 1, 2, 3, 1, 2, 3,
(...)
a(660) = 6, 7, 8, 9, 7, 8, 9, 1, 2, 3,
etc.
MATHEMATICA
a[n_] := Plus @@ IntegerDigits[3*n]/3; Array[a, 100, 0] (* Amiram Eldar, May 19 2021 *)
PROG
(PARI) A343638(n)=sumdigits(3*n)/3
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, May 19 2021
STATUS
approved