OFFSET
1,4
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..1024
Michael De Vlieger, Plot of the n-th row of A030717 n = 1..512, showing 2's in red and all other terms in blue.
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] == 2, t++], {j, Length[w]}]; Do[c[a[j + k]]++, {j, Length[w]}]; k += Length[w]; Sow[t], {n, nn}]][[-1, -1]], 0] (* 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(2, 100)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Nov 18 2022
STATUS
approved