login
A376238
Sequence obtained from A376239 by deleting the substrings of k-1 copies of k starting at index k(k-1)/2 + 1 for each k > 1.
1
1, 1, 2, 1, 2, 3, 3, 1, 2, 4, 4, 4, 1, 3, 5, 5, 5, 5, 3, 2, 6, 6, 6, 6, 6, 1, 2, 7, 7, 7, 7, 7, 7, 4, 4, 8, 8, 8, 8, 8, 8, 8, 4, 3, 9, 9, 9, 9, 9, 9, 9, 9, 3, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 5, 5, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 5, 5, 12
OFFSET
1,3
COMMENTS
In A376239 we conjecture that the sequences S[r+1] = D S[r], starting with S[1] = A376239, will have the property P(r) for all r >= 1. Here D means to delete the subsequences of k repeated k-1 times, starting at index (k-1)r + T(k-2) + 1, for all k > 1. The property P(r) means that for all k > 1, the sequence has k-1 copies of k, starting at index (k-1)r + T(k-2) + 1, and each of these runs is preceded by r smaller terms. (Thus, r is the number of 1s preceding the first 2 in the sequence.)
With these definitions the present sequence A376238 = S[2] = D(A376239) has property P(2).
FORMULA
a(n) = A376239(n(n+1)/2).
PROG
(Python) A376238 = lambda n: A376239(n*(n+1)//2)
A376238_upto = lambda N: [A376238(n) for n in range(1, N+1)]
# less efficiently, for illustration:
S_upto = lambda N: [A376239(n) for n in range(1, N+1)]
def D(S, n=None):
if not n: n=next(n for n, a in enumerate(S) if a>1)
for c in range(1, len(S)//n): S[n*c:(n+1)*c] = []
return S
A376238_upto = lambda N: D(S_upto(N*(N+1)//2))
CROSSREFS
Cf. A376239 (initial sequence S[1]), A000217 (triangular numbers n(n+1)/2).
Sequence in context: A112531 A373553 A100002 * A348330 A328471 A227909
KEYWORD
nonn
AUTHOR
M. F. Hasler, Oct 28 2024
STATUS
approved