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!)
A090269 Least k made of identical digits such that the concatenation k, prime(n), k is prime. a(5) = 0. 3
7, 1, 1, 3, 0, 33, 1, 9, 1, 1, 3, 3, 3, 3, 1, 1, 3, 3, 3, 7, 3, 3, 1, 1111, 111, 3, 3, 1, 9, 1, 33, 1, 111, 3, 1, 3, 3, 9, 777, 1, 3, 77, 7, 9, 1, 777, 9, 3, 7, 333, 7, 1, 3, 1, 3, 3, 3, 3, 9, 7, 3, 3, 3, 3, 9, 1, 9, 777, 7, 3, 3, 1, 77, 9, 11, 1, 3, 9, 1, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MAPLE
isA010785 := proc(n) convert(convert(n, base, 10), set) ; if nops(%) = 1 then true ; else false ; fi ; end: A055642 := proc(n) ilog10(n)+ 1; end: A090269 := proc(n) local kern, k, p ; if n = 5 then RETURN(0) ; fi ; kern := ithprime(n) ; k := 1 ; while true do if isA010785(k) then p := k+10^A055642(k)*kern+k*10^(A055642(k)+A055642(kern)) ; if isprime(p) then RETURN(k) ; fi ; fi ; k := k+1 ; od ; end: seq(A090269(n), n=1..80); # R. J. Mathar, Jul 20 2007
PROG
(Python)
from sympy import prime, isprime
def a(n):
if n == 5: return 0
spn, digits = str(prime(n)), 1
while True:
for sk in [d*digits for d in "1379"]:
if isprime(int(sk + spn + sk)): return int(sk)
digits += 1
print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Jul 01 2021
CROSSREFS
Sequence in context: A115064 A086868 A241299 * A086867 A090266 A010142
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 28 2003
EXTENSIONS
More terms from R. J. Mathar, Jul 20 2007
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 9 14:31 EDT 2024. Contains 372351 sequences. (Running on oeis4.)