[go: up one dir, main page]

login
A358466
Number of 1's that appeared by n-th step when constructing A030717.
8
1, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 8, 8, 10, 14, 17, 23, 30, 38, 49, 62, 77, 94, 110, 129, 149, 172, 195, 218, 241, 266, 293, 323, 356, 389, 424, 461, 500, 545, 593, 641, 688, 737, 787, 839, 896, 957, 1021, 1085, 1152, 1219, 1291, 1368, 1447, 1527, 1611, 1697, 1788, 1879, 1974, 2074, 2181, 2290, 2401, 2519
OFFSET
1,2
LINKS
MATHEMATICA
nn = 94; c[_] = 0; k = a[1] = c[1] = 1; Accumulate@ Prepend[Reap[Do[w = Union@ Array[a, k]; t = 0; Do[Set[a[j + k], c[w[[j]]]]; If[a[j + k] == 1, t++], {j, Length[w]}]; Do[c[a[j + k]]++, {j, Length[w]}]; k += Length[w]; Sow[t], {n, nn}]][[-1, -1]], 1] (* Michael De Vlieger, Nov 18 2022 *)
PROG
(Ruby)
def A(k, n)
a = []
ary = [1]
n.times{
a << ary.count(k)
ary += ary.uniq.sort.map{|i| ary.count(i)}
}
a
end
p A(1, 100)
CROSSREFS
Partial sums of A358467.
Sequence in context: A077641 A329547 A330560 * A194210 A112672 A025765
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Nov 18 2022
STATUS
approved