OFFSET
0,12
COMMENTS
Consider g = A008585 = multiply by 3, and its left inverse h = A002264, h o g = id (but g o h = id only on (the range of) A008585). In the spirit of group theory, we can write ad(g) = (x -> h o x o g), then A343638 = ad(A008585)(A007953) and this A343639 = ad(A008585)(A343638) = ad(A008585)^2 (A007953).
For a given m >= 1, special cases a(n) = m occur for n in the range k*(A002275(m)-1)+1 <= n <= k*A002275(m) with 1 <= k <= 10 since then 9*n becomes repeat 9's and first digit and last 2 digits summing to 9*m. - Rhys Feltman, Nov 13 2025
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = A343638(3*n)/3 = A002264(A343638(A008585(n))), i.e., A343639 = A002264 o A343638 o A008585 (just as A343638 = A002264 o A007953 o A008585).
a(A002275(m)) = m for all m >= 0 and a(k) < m for k < A002275(m), or in other words, m first appears as a term at index A002275(m). - Michael S. Branicky, Nov 25 2025
MATHEMATICA
a[n_] := Plus @@ IntegerDigits[9*n]/9; Array[a, 100, 0] (* Amiram Eldar, May 19 2021 *)
PROG
(PARI) A343639(n)=sumdigits(9*n)/9
(Python)
def a(n): return sum(map(int, str(9*n)))//9
print([a(n) for n in range(112)]) # Michael S. Branicky, Nov 24 2025
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, May 19 2021
STATUS
approved
