login

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

A379354
Beginning with 3, least prime such that concatenation of first n terms is prime.
4
3, 7, 3, 3, 7, 29, 43, 11, 61, 71, 19, 191, 43, 53, 7, 239, 31, 173, 43, 137, 79, 53, 13, 557, 619, 47, 271, 797, 463, 83, 211, 467, 229, 131, 199, 359, 1249, 887, 853, 641, 109, 257, 1153, 1031, 613, 953, 607, 641, 499, 359, 1297, 1031, 2137, 401, 283, 29, 1321, 1499, 547, 83, 397, 2153, 1759, 1277
OFFSET
1,1
LINKS
MATHEMATICA
w = {3};
Do[k = 1;
q = Monitor[
Parallelize[
While[True,
If[PrimeQ[FromDigits[
Join @@ IntegerDigits /@ Append[w, Prime[k]]]], Break[]]; k++];
Prime[k]], k];
w = Append[w, q], {i, 2, 57}];
w
PROG
(Python)
from itertools import count, islice
from gmpy2 import digits, is_prime, mpz, next_prime
def agen(): # generator of terms
s, an = "", 3
while True:
yield int(an)
s += digits(an)
p = 3
while not is_prime(mpz(s+digits(p))): p = next_prime(p)
an = p
print(list(islice(agen(), 57))) # Michael S. Branicky, Dec 21 2024
CROSSREFS
KEYWORD
base,nonn
AUTHOR
STATUS
approved

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy