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!)
A068837 Smallest prime with concatenation of first n odd numbers as leading digits. 2

%I #20 Mar 19 2024 17:24:57

%S 11,13,13513,13577,135799,135791107,13579111307,1357911131503,

%T 13579111315171,135791113151719,1357911131517192157,

%U 13579111315171921231,135791113151719212325007,1357911131517192123252763,13579111315171921232527291,135791113151719212325272931

%N Smallest prime with concatenation of first n odd numbers as leading digits.

%C a(351) has 1002 digits. - _Michael S. Branicky_, Mar 19 2024

%H Michael S. Branicky, <a href="/A068837/b068837.txt">Table of n, a(n) for n = 1..350</a>

%o (Python)

%o from sympy import isprime

%o from itertools import count

%o def a(n):

%o prefix = int("".join(map(str, (2*i+1 for i in range(n)))))

%o if isprime(prefix): return prefix

%o for extra in count(1):

%o prefix *= 10

%o for i in range(10**extra):

%o t = prefix + i

%o if isprime(t): return t

%o print([a(n) for n in range(1, 17)]) # _Michael S. Branicky_, Mar 19 2024

%K nonn,base

%O 1,1

%A _Amarnath Murthy_, Mar 09 2002

%E More terms from _Benoit Cloitre_, Mar 10 2002

%E a(10) corrected by _Jayanta Basu_, Aug 08 2013

%E a(6)-a(8) and a(13) corrected and more terms from _Sean A. Irvine_, Mar 17 2024

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 July 26 02:32 EDT 2024. Contains 374615 sequences. (Running on oeis4.)