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!)
A038103 Numbers k such that k is a substring of its base-3 representation. 5
0, 1, 2, 10, 20, 21, 102, 110, 210, 211, 212, 220, 1011, 1112, 1121, 2022, 12101, 12102, 12112, 12122, 10121021, 10121022, 12222212, 102121110, 102121120, 200121022, 1001120220, 2011001102, 2012012221, 2100221021, 2102111111 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
Hans Havermann, Table of n, a(n) for n = 1..210 (terms 1..151 from Giovanni Resta).
EXAMPLE
12101 = base 10 -> 121{12101}2 = base 3.
PROG
(Python)
from sympy.ntheory.digits import digits
from itertools import count, islice, product
def agen(): # generator of terms
yield 0
for d in count(1):
for first in "12":
for rest in product("012", repeat=d-1):
s = first + "".join(rest)
if s in "".join(str(d) for d in digits(int(s), 3)[1:]):
yield int(s)
print(list(islice(agen(), 31))) # Michael S. Branicky, Jan 08 2022
(Python)
from itertools import count, islice
from gmpy2 import digits
def A038103_gen(): return (int(s) for s in (digits(n, 3) for n in count(0)) if s in digits(int(s), 3))
A038103_list = list(islice(A038103_gen(), 30)) # Chai Wah Wu, Jan 09 2022
CROSSREFS
Sequence in context: A357486 A350508 A306105 * A307254 A293725 A351552
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Feb 15 1999
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 April 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)