OFFSET
1,1
COMMENTS
MATHEMATICA
a[n_, poly_] := FromDigits[FoldList[{Mod[#[[1]], #2], Quotient[#[[1]], #2]} &, {n, 0}, Reverse[Map[(poly - 2) # (# - 1)/2 + # &, Range[Floor[Sqrt[2 n]]]]]][[All, 2]]]
t3 = Map[a[#, 3] &, Range[200]]; (* A000462 *)
m = Mod[t3, 10]
Table[Flatten[Position[m, r]], {r, 0, 2}]
p0 = Flatten[Position[m, 0]] (* A376354 *)
p1 = Flatten[Position[m, 1]] (* A376355 *)
p2 = Flatten[Position[m, 2]] (* this sequence *)
(* Peter J. C. Moses, Sep 20 2024 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Sep 25 2024
STATUS
approved