login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #5 Oct 31 2024 01:02:55

%S 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,

%T 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,

%U 5,11,11,11,11,11,11,11,11,11,11,5,5,12

%N 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.

%C 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.)

%C With these definitions the present sequence A376238 = S[2] = D(A376239) has property P(2).

%F a(n) = A376239(n(n+1)/2).

%o (Python) A376238 = lambda n: A376239(n*(n+1)//2)

%o A376238_upto = lambda N: [A376238(n) for n in range(1,N+1)]

%o # less efficiently, for illustration:

%o S_upto = lambda N: [A376239(n) for n in range(1,N+1)]

%o def D(S, n=None):

%o if not n: n=next(n for n,a in enumerate(S) if a>1)

%o for c in range(1,len(S)//n): S[n*c:(n+1)*c] = []

%o return S

%o A376238_upto = lambda N: D(S_upto(N*(N+1)//2))

%Y Cf. A376239 (initial sequence S[1]), A000217 (triangular numbers n(n+1)/2).

%K nonn

%O 1,3

%A _M. F. Hasler_, Oct 28 2024