login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A343638
a(n) = (Sum of decimal digits of 3*n) / 3.
2
0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 6, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 4, 5, 6
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
a(n) = A002264(A007953(A008585(n))), i.e., A343638 = A002264 o A007953 o A008585, by definition.
a(3n) = A343639(n)/3, or: A343638 o A008585 = A002264 o A343639.
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
Cf. A007953 (sum of digits), A008585 (3n), A343639 (same for 9), A002264 ([n/3]).
Cf. A083822 (reverse(3n)/3).
Sequence in context: A117373 A132677 A010882 * A293207 A106590 A194074
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, May 19 2021
STATUS
approved