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!)
A046268 Largest prime substring in 2^n (or 0 if none exist). 3
0, 2, 0, 0, 0, 3, 0, 2, 5, 5, 2, 2, 409, 19, 163, 7, 6553, 131, 2621, 5, 857, 971, 419, 83, 1677721, 5443, 71, 1342177, 43, 709, 107, 83, 4294967, 89, 171798691, 3597383, 6871947673, 3743895347, 779069, 54975581, 511627, 99023, 4398046511, 79609, 18604441, 883 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..2000
EXAMPLE
2^37 = 1{3743895347}2, so a(37) = 3743895347.
PROG
(Python)
from sympy import isprime
def a(n):
s = str(2**n)
ss = (int(s[i:j]) for i in range(len(s)) for j in range(i+1, len(s)+1))
return max((k for k in ss if isprime(k)), default=0)
print([a(n) for n in range(46)]) # Michael S. Branicky, Sep 20 2022
CROSSREFS
Cf. A046260.
Sequence in context: A348341 A330936 A284687 * A202425 A292374 A292376
Adjacent sequences: A046265 A046266 A046267 * A046269 A046270 A046271
KEYWORD
nonn
AUTHOR
Patrick De Geest, Jun 15 1998
EXTENSIONS
a(44) and beyond from Michael S. Branicky, Sep 20 2022
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 July 19 16:24 EDT 2024. Contains 374410 sequences. (Running on oeis4.)