login
A364935
a(1) = 1 and thereafter a(n) = sum of digits of the number from concatenation of a(n-1) on the left with leftmost digit of a(n-1) + k and concatenation on the right with rightmost digit of a(n-1) + k, where k is the number of times a(n-1) has appeared in the sequence.
1
1, 5, 17, 18, 20, 6, 20, 8, 26, 18, 13, 10, 4, 14, 12, 8, 10, 6, 22, 10, 8, 12, 10, 10, 12, 12, 14, 14, 16, 16, 18, 15, 14, 18, 17, 20, 10, 14, 20, 12, 16, 20, 14, 13, 12, 18, 19, 13, 14, 15, 16, 13, 16, 15, 18, 21, 8, 14, 17, 13, 18, 23, 12, 20, 16, 17, 15, 20, 18, 25, 16, 19, 15, 13
OFFSET
1,2
COMMENTS
Empirical observations: this sequence is extremely slow to grow, but I believe it diverges; the mode M(n) grows slowly and after some initial stabilization increases in intervals of 2; the distribution of even numbers in the limit follows a Gaussian distribution, and the distribution of odd numbers in the limits follows its *own* smaller Gaussian distribution.
The graph of the first 100000 terms looks somewhat like that 90's Jazz design that was on cups and other items, with a darker band concentrated in the middle of thick, diffuse swooshes.
LINKS
Wikipedia, Jazz (design).
EXAMPLE
For n=2, a(1) = 1 and "1" has appeared once (k=1) in the sequence. We add 1 to the leftmost digit, 1, and the rightmost digit, 1, and concatenate on each side so 212 which has sum of digits a(2) = 5.
For n=3, similarly a(2)=5 has appeared once (1) so we add 1 to the leftmost digit, 5, and the rightmost digit, 5, so 656 and its sum of digits is a(3) = 17.
For n=4, 17 -> 2178 -> 18, a(4) = 18.
PROG
(Python)
from collections import Counter
def A364935_list(max_n):
A, C = [1], Counter()
for n in range(2, max_n+1):
x = str(A[n-2])
C.update({x})
z = str(int(x[0])+C[x]) + x + str(int(x[-1])+C[x])
A.append(sum(int(z[i]) for i in range (0, len(z))))
return(A) # John Tyler Rascoe, Oct 22 2023
CROSSREFS
Sequence in context: A316548 A275629 A351974 * A249589 A040153 A038896
KEYWORD
base,easy,look,nonn
AUTHOR
Jarrod G. Sage, Sep 15 2023
STATUS
approved