A357081 Leader at step n of the THROWBACK procedure (see definition in comments).
3, 4, 5, 6, 3, 7, 4, 8, 3, 5, 9, 4, 3, 6, 10, 5, 3, 4, 7, 11, 3, 6, 4, 5, 3, 8, 12, 4, 3, 7, 5, 6, 3, 4, 9, 13, 3, 5, 4, 8, 3, 6, 7, 4, 3, 5, 10, 14, 3, 4, 6, 5, 3, 9, 4, 7, 3, 8, 5, 4, 3, 6, 11, 15, 3, 4, 5, 7, 3, 6, 4, 10, 3, 5, 8, 4, 3, 9, 6, 5, 3, 4, 7, 12, 3, 16, 4, 5, 3, 6, 8, 4, 3, 7, 5, 11, 3, 4, 6, 9
Offset: 0
Examples
Before the first step, 3 is the leader, so a(0) = 3. In the first step, 3 is moved back 3 places giving the new sequence 4, 5, 6, 3, 7, 8, ..., so a(1) = 4.
Links
- Popular Computing (Calabasas, CA), Coding Fun: Rearranging All The Numbers, Annotated and scanned copy of pages PC55-2, PC55-3, and PC55-1(cover) of Vol. 5 (No. 55, Oct 1977).
- Anthony M. Kozar Jr., THROWBACK All of Your Number Sequences
Programs
-
Python
from collections import deque from itertools import count, islice def tgen(): yield from count(3) # generator of sequence to throwback def agen(): # generator of terms g = tgen() a = deque([next(g)]) while True: leader = a.popleft() yield leader while leader > len(a): a.append(next(g)) a.insert(leader, leader) print(list(islice(agen(), 100))) # Michael S. Branicky, Sep 11 2022
Formula
a(n) = A087165(n+1) + 2 (conjectured).
Comments