login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A379265
a(n) is the number of coincidences of the first n terms of this sequence and A379266, i.e., the number of equalities a(k) = A379266(k) for 0 <= k < n.
4
0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 10, 11, 12, 13, 13, 14, 14, 14, 14, 14, 15
OFFSET
0,3
COMMENTS
a(n) appears to grow roughly like sqrt(n).
FORMULA
For n >= 1, a(n) = a(n-1)+1 if a(n-1) = A379266(n-1), otherwise a(n) = a(n-1).
PROG
(Python)
def A379265_list(nterms):
A = []
A379266 = []
for n in range(nterms):
if n != 0:
a += (a==A379266[-1])
else:
a = 0
b = sum(1 for x, y in zip(A, reversed(A379266)) if x==y)
A.append(a)
A379266.append(b)
return A
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved