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.

This page as a plain text file.
%I A343638 #19 May 26 2021 02:40:32
%S A343638 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,
%T A343638 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,
%U A343638 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
%N A343638 a(n) = (Sum of decimal digits of 3*n) / 3.
%C A343638 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).
%C A343638 In rows 3, 13, 23, 43, 53, 63, ... one has r = x = a-2 (i.e., t = z = a),
%C A343638   in rows 6, 16, 26, 36, 46, 56, 76, ... one has r = b but x = a-2 (i.e., z = a),
%C A343638   in rows 33, 133, ... one has r = x = a-5,
%C A343638   in rows 66, 166, ... one has r = b but x = a-5.
%C A343638 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.
%F A343638 a(n) = A002264(A007953(A008585(n))), i.e., A343638 = A002264 o A007953 o A008585, by definition.
%F A343638 a(3n) = A343639(n)/3, or: A343638 o A008585 = A002264 o A343639.
%e A343638 Written in rows of 4+3+3 terms, grouped in the same pattern, the table reads:
%e A343638 .
%e A343638   a(  0) =  0,  1,  2,  3,        1,  2,  3,      1,  2,  3,
%e A343638   a( 10) =  1,  2,  3,  4,        2,  3,  4,      2,  3,  4,
%e A343638   a( 20) =  2,  3,  4,  5,        3,  4,  5,      3,  4,  5,
%e A343638   a( 30) =  3,  4,  5,  6,        1,  2,  3,      1,  2,  3,
%e A343638 .
%e A343638   a( 40) =  1,  2,  3,  4,        2,  3,  4,      2,  3,  4,
%e A343638   a( 50) =  2,  3,  4,  5,        3,  4,  5,      3,  4,  5,
%e A343638   a( 60) =  3,  4,  5,  6,        4,  5,  6,      1,  2,  3,
%e A343638 .
%e A343638   a( 70) =  1,  2,  3,  4,        2,  3,  4,      2,  3,  4,
%e A343638   a( 80) =  2,  3,  4,  5,        3,  4,  5,      3,  4,  5,
%e A343638   a( 90) =  3,  4,  5,  6,        4,  5,  6,      4,  5,  6,
%e A343638 .
%e A343638   a(100) =  1,  2,  3,  4,        2,  3,  4,      2,  3,  4,
%e A343638   a(110) =  2,  3,  4,  5,        3,  4,  5,      3,  4,  5,
%e A343638   a(120) =  3,  4,  5,  6,        4,  5,  6,      4,  5,  6,
%e A343638   a(130) =  4,  5,  6,  7,        2,  3,  4,      2,  3,  4,
%e A343638 .
%e A343638   a(140) =  2,  3,  4,  5,        3,  4,  5,      3,  4,  5,
%e A343638   a(150) =  3,  4,  5,  6,        4,  5,  6,      4,  5,  6,
%e A343638   a(160) =  4,  5,  6,  7,        5,  6,  7,      2,  3,  4,
%e A343638 .
%e A343638   a(170) =  2,  3,  4,  5,        3,  4,  5,      3,  4,  5,
%e A343638   a(180) =  3,  4,  5,  6,        4,  5,  6,      4,  5,  6,
%e A343638   a(190) =  4,  5,  6,  7,        5,  6,  7,      5,  6,  7,
%e A343638 (...)
%e A343638   a(330) =  6,  7,  8,  9,        1,  2,  3,      1,  2,  3,
%e A343638 (...)
%e A343638   a(660) =  6,  7,  8,  9,        7,  8,  9,      1,  2,  3,
%e A343638 etc.
%t A343638 a[n_] := Plus @@ IntegerDigits[3*n]/3; Array[a, 100, 0] (* _Amiram Eldar_, May 19 2021 *)
%o A343638 (PARI) A343638(n)=sumdigits(3*n)/3
%Y A343638 Cf. A007953 (sum of digits), A008585 (3n), A343639 (same for 9), A002264 ([n/3]).
%Y A343638 Cf. A083822 (reverse(3n)/3).
%K A343638 nonn,base,easy
%O A343638 0,3
%A A343638 _M. F. Hasler_, May 19 2021