proposed
editing
editing
proposed
(Python)
from itertools import islice
def agen(): # generator of terms
e, a = set(), []
while True:
an, allnew = 0, False
while not allnew:
allnew, an, ndset = True, an+1, set()
for i in range(len(a)):
if an == a[i]:
nd = len(set(a[i+1:]))
if nd in e or nd in ndset: allnew = False; break
ndset.add(nd)
yield an; a.append(an); e |= ndset
print(list(islice(agen(), 72))) # Michael S. Branicky, Oct 25 2023
proposed
editing
editing
proposed
1, 1, 2, 1, 3, 4, 2, 5, 6, 3, 7, 4, 8, 2, 9, 5, 10, 11, 6, 12, 3, 13, 14, 7, 15, 4, 16, 17, 8, 18, 2, 19, 20, 21, 9, 22, 5, 23, 24, 10, 25, 11, 26, 6, 27, 28, 12, 29, 30, 13, 31, 14, 32, 7, 33, 15, 34, 35, 36, 16, 37, 17, 38, 8, 39, 18, 40, 41, 19, 42, 43, 20
Rémy Sigrist, <a href="/A366691/a366691.gp.txt">PARI program</a>
(PARI) See Links section.
nonn,more,new
More terms from Rémy Sigrist, Oct 25 2023
proposed
editing
editing
proposed
1, 1, 2, 1, 3, 4, 2, 5, 1, 6, 7, 3, 8, 4, 9, 2, 10, 11, 5, 12, 1, 13, 14, 6, 15, 7, 16, 3, 17, 18, 8, 19, 4, 20, 21, 9, 22, 2, 23, 24, 10, 25, 11, 26, 5, 27, 28, 12, 29, 1, 30, 31, 13, 32, 14, 33, 6, 34, 35, 15, 36, 7, 37, 38, 16, 39, 3, 40, 41, 17, 42, 18, 43, 8, 44, 45
1, 1, 2, 1, 3, 4, 2, 5, 6, 3
The sequence appears to be fractal in the sense that removing the first occurrence of each value returns the sequence itself.
A003152 gives the index of the first occurrence of n.
A187971 appears to be the index of the second occurrence of n.
A024537 appears to be the index of 1s in the sequence.
A353580 appears to be the index of 2s in the sequence (excluding the initial 0).
Neal Gersh Tolunsky, <a href="/A366691/b366691_1.txt">Table of n, a(n) for n = 1..10000</a>
Skip ahead to a(11)=7. Any smaller term would enclose a set of 0,2,3,4, or 5 terms, which is impossible since sets with this many distinct elements have already occurred. For example, the set of 5 distinct terms appeared as {1,2,1,3,4,2,5,1} = {2,1,3,4,5}.
nonn,new,more
proposed
editing
editing
proposed
The sequence appears to be fractal in the sense that removing the first occurrence of each value returns the sequence itself (checked for 10000 terms).
1, 1, 2, 1, 3, 4, 2, 5, 1, 6, 7, 3, 8, 4, 9, 2, 10, 11, 5, 12, 1, 13, 14, 6, 15, 7, 16, 3, 17, 18, 8, 19, 4, 20, 21, 9, 22, 2, 23, 24, 10, 25, 11, 26, 5, 27, 28, 12, 29, 1, 30, 31, 13, 32, 14, 33, 6, 34, 35, 15, 36, 7, 37, 38, 16, 39, 3, 40, 41, 17, 42, 18, 43, 8, 44, 45
The sequence appears to be fractal in the sense that removing the first occurrence of each value returns the sequence itself (checked for 10000 terms).
A003152 gives the index of the first occurrence of n.
A187971 appears to be the index of the second occurrence of n.
A024537 appears to be the index of 1s in the sequence.
A353580 appears to be the index of 2s in the sequence (excluding the initial 0).
Neal Gersh Tolunsky, <a href="/A366691/b366691_1.txt">Table of n, a(n) for n = 1..10000</a>
nonn,more,new
approved
editing