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!)
A158962 a(n) is the smallest number m such that all n numbers m-1, m.m-1, ..., m.m. .. .m-1 are prime, where dot means concatenation. 1
3, 4, 4, 444, 827868, 10387692, 1885781034 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
All 4 numbers 444-1,444444-1,1+444444444-1,444444444444-1 are prime and 444
is the smallest such number so a(4)=444.
MAPLE
a:= proc(n) local m; for m do if andmap(isprime,
[seq(parse(cat(m$i))-1, i=1..n)]) then return m fi od
end:
seq(a(n), n=1..5); # Alois P. Heinz, Apr 14 2021
PROG
(Python)
from sympy import isprime
def A158962(n):
m = 1
while True:
for i in range(n):
if not isprime(int(str(m)*(i+1))-1):
break
else:
return m
m += 1 # Chai Wah Wu, Apr 14 2021
CROSSREFS
Cf. A153434.
Sequence in context: A067137 A060115 A100649 * A263824 A215747 A246667
KEYWORD
base,more,nonn
AUTHOR
Farideh Firoozbakht, Apr 02 2009
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 February 22 22:43 EST 2024. Contains 370265 sequences. (Running on oeis4.)