A079668 Start with 1; at n-th step, write down what is in the sequence so far.
1, 1, 1, 3, 1, 4, 1, 0, 2, 1, 3, 1, 0, 6, 1, 1, 2, 2, 3, 1, 4, 2, 0, 10, 1, 3, 2, 3, 3, 2, 4, 0, 5, 1, 6, 4, 0, 12, 1, 6, 2, 6, 3, 3, 4, 1, 5, 2, 6, 0, 7, 0, 8, 0, 9, 1, 10, 8, 0, 15, 1, 8, 2, 8, 3, 5, 4, 2, 5, 5, 6, 1, 7, 1, 8, 1, 9, 2, 10, 0, 11, 1, 12, 10
Offset: 1
Examples
Row n lists all terms written at the n-th step: 1; 1, 1; 3, 1; 4, 1, 0, 2, 1, 3; 1, 0, 6, 1, 1, 2, 2, 3, 1, 4; 2, 0, 10, 1, 3, 2, 3, 3, 2, 4, 0, 5, 1, 6; 4, 0, 12, 1, 6, 2, 6, 3, 3, 4, 1, 5, 2, 6, 0, 7, 0, 8, 0, 9, 1, 10; ...
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20377 (first 55 steps)
Programs
-
Maple
b:= proc(n) option remember; `if`(n<1, 0, b(n-1)+add(x^i, i=T(n))) end: T:= proc(n) option remember; `if`(n=1, 1, (p-> seq([coeff(p, x, i), i][], i=ldegree(p)..degree(p)))(b(n-1))) end: seq(T(n), n=1..10); # Alois P. Heinz, Aug 24 2025
-
Mathematica
s={1}; Do[s=Flatten[{s,{Count[s,#],#}&/@Range[Min[s],Max[s]]}],{20}];s (* Peter J. C. Moses, Mar 21 2013 *)
-
Python
from itertools import islice def agen(): # generator of terms a = [1] yield 1 while True: counts = [] for d in range(min(a), max(a)+1): c = a.count(d) counts.extend([c, d]) a += counts yield from counts print(list(islice(agen(), 84))) # Michael S. Branicky, Aug 24 2025
Extensions
More terms from Sean A. Irvine, Aug 24 2025
Comments