cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A343638 a(n) = (Sum of decimal digits of 3*n) / 3.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, May 19 2021

Keywords

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.

Examples

			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.
		

Crossrefs

Cf. A007953 (sum of digits), A008585 (3n), A343639 (same for 9), A002264 ([n/3]).
Cf. A083822 (reverse(3n)/3).

Programs

  • Mathematica
    a[n_] := Plus @@ IntegerDigits[3*n]/3; Array[a, 100, 0] (* Amiram Eldar, May 19 2021 *)
  • PARI
    A343638(n)=sumdigits(3*n)/3

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.