login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261787 a(n) is the smallest nonzero number that is not a substring of n in ternary representation. 5
1, 2, 1, 2, 2, 3, 1, 3, 1, 2, 2, 4, 2, 2, 3, 3, 3, 3, 1, 3, 1, 4, 3, 3, 1, 3, 1, 2, 2, 4, 2, 2, 4, 4, 4, 4, 2, 2, 5, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 1, 3, 1, 4, 3, 3, 1, 3, 1, 4, 4, 4, 5, 3, 3, 3, 3, 3, 1, 3, 1, 4, 3, 3, 1, 3, 1, 2, 2, 4, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
A261789(n) = a(A261786(n)).
PROG
(Haskell)
import Data.List (isInfixOf)
a261787 x = f $ tail a030341_tabf where
f (cs:css) = if isInfixOf cs (a030341_row x)
then f css else foldr (\d v -> 3 * v + d) 0 cs
(PARI) ts(n) = Str(fromdigits(digits(n, 3)));
a(n) = my(s=ts(n), k=1); while (#strsplit(s, ts(k)) != 1, k++); k; \\ Michel Marcus, Feb 05 2022
CROSSREFS
Sequence in context: A202389 A210868 A176853 * A302480 A329656 A000374
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Sep 01 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 21:01 EDT 2024. Contains 372297 sequences. (Running on oeis4.)