login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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
OFFSET
0,2
LINKS
FORMULA
a(n) = A047814(2^n). - Pontus von Brömssen, Jan 16 2025
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
KEYWORD
nonn,changed
AUTHOR
Patrick De Geest, Jun 15 1998
EXTENSIONS
a(44) and beyond from Michael S. Branicky, Sep 20 2022
STATUS
approved