The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A344888 a(n) is the least base k >= 2 where n is an undulating number (i.e., with digits of the form abababab...). 1
2, 2, 2, 2, 3, 2, 3, 2, 3, 4, 2, 4, 4, 3, 4, 2, 3, 4, 5, 5, 3, 2, 5, 3, 5, 4, 3, 6, 6, 4, 3, 2, 6, 6, 4, 6, 5, 6, 4, 7, 3, 5, 2, 6, 7, 7, 4, 7, 7, 6, 3, 4, 5, 8, 8, 4, 8, 5, 8, 4, 3, 6, 5, 2, 7, 8, 9, 5, 4, 9, 3, 7, 5, 8, 6, 9, 9, 9, 5, 9, 3, 8, 9, 5, 10, 2, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) <= A000196(n) + 1 for any n > 0.
a(n) <= 10 for any n in A033619.
a(n) = 2 iff n belongs to A000225 or to A000975.
EXAMPLE
For n = 49:
- we have:
b 49 in base b Undulating?
- ------------ -----------
2 110001 No
3 1211 No
4 301 No
5 144 No
6 121 Yes
- so a(49) = 6.
PROG
(PARI) is(n, base=10) = my (d=digits(n, base)); #d<=2 || d[1..#d-2]==d[3..#d]
a(n) = for (b=2, oo, if (is(n, b), return (b)))
(Python)
def A344888(n):
b, m = 2, n
while True:
m, x = divmod(m, b)
m, y = divmod(m, b)
while m > 0:
m, z = divmod(m, b)
if z != x:
break
if m > 0:
m, z = divmod(m, b)
if z != y:
break
else:
return b
else:
return b
b += 1
m = n # Chai Wah Wu, Jun 02 2021
CROSSREFS
Sequence in context: A331362 A139325 A341829 * A216325 A322868 A240975
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Jun 01 2021
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 15 09:54 EDT 2024. Contains 372540 sequences. (Running on oeis4.)