OFFSET
0,3
LINKS
Scott R. Shannon, Table of n, a(n) for n = 0..10000
Scott R. Shannon, Image for the first 10000000 terms of A357943.
MATHEMATICA
nn = 1500; c[_] = q[_] = 0; Array[Set[{a[#], c[#], q[#]}, {#, 1, #}] &, 3, 0]; Do[(a[n] = c[#]; c[c[#]]++; If[q[c[#]] == 0, Set[q[c[#]], n]]) &[a[n - a[n - 1] - 1]], {n, 3, nn}]; {0}~Join~TakeWhile[Array[q, nn], # > 0 &] (* Michael De Vlieger, Oct 23 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Oct 22 2022
STATUS
approved