OFFSET
1,3
COMMENTS
This sequence appears in the Korean counting game Sam-Yuk-Gu.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
A:= [0, 1, 2, 4, 5, 7, 8]:
for d from 1 to 2 do
A:= map(t -> seq(10*t+i, i=[0, 1, 2, 4, 5, 7, 8]), A)
od:
A; # Robert Israel, May 15 2019
PROG
(Magma) [n:n in [0..10000]| Set(Intseq(n, 10)) subset [0, 1, 2, 4, 5, 7, 8]]; // Marius A. Burtea, May 06 2019
(PARI) a(n, s=[0, 1, 2, 4, 5, 7, 8]) = fromdigits(apply(d -> s[1+d], digits(n-1, #s))) \\ Rémy Sigrist, May 06 2019
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Donghwi Park, May 06 2019
STATUS
approved