cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A167417 Largest prime concatenation of the first n primes, or 0 if no such prime exists.

This page as a plain text file.
%I A167417 #16 Dec 06 2021 03:16:37
%S A167417 2,23,523,7523,751123,75311213,7523171311,753217131911,75323219131117,
%T A167417 0,753312923219111713,75373312923192171311,7541373132923217111319,
%U A167417 754341373132923192171311,75474341373132923211171319
%N A167417 Largest prime concatenation of the first n primes, or 0 if no such prime exists.
%C A167417 a(10) doesn't exist, because the sum of digits of the first 10 primes (2+3+5+7+(1+1)+(1+3)+(1+7)+(1+9)+(2+3)+(2+9)) = 57 is a multiple of 3.
%D A167417 Richard E. Crandall and Carl Pomerance, Prime Numbers, Springer 2005.
%D A167417 Paulo Ribenboim, The New Book of Prime Number Records, Springer 1996.
%D A167417 A. Weil, Number theory: an approach through history, Birkhäuser 1984.
%H A167417 Gleb Ivanov, <a href="/A167417/a167417.py.txt">Python program for large terms</a>.
%e A167417 The only prime concatenations of the first n primes for n = 1..3 are a(1)=2, a(2)=23, and a(3)=523.
%e A167417 For n=4, the only prime concatenations of 2, 3, 5, and 7 are 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523; the largest of these is a(4) = 7523.
%o A167417 (Python)
%o A167417 from sympy import sieve, isprime
%o A167417 from itertools import permutations
%o A167417 for n in range(1, 14):
%o A167417     sieve.extend_to_no(n)
%o A167417     p = list(map(str, list(sieve._list)))[:n]
%o A167417     mint = 0
%o A167417     for i in permutations(p, len(p)):
%o A167417         t = int(''.join(i))
%o A167417         if  t > mint and isprime(t):
%o A167417             mint = t
%o A167417     print(mint, end = ', ') # _Gleb Ivanov_, Dec 05 2021
%Y A167417 Cf. A175429, A177275, A134966, A167416.
%K A167417 nonn,base
%O A167417 1,1
%A A167417 Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Nov 03 2009
%E A167417 Edited by _Charles R Greathouse IV_, Apr 28 2010
%E A167417 Several terms corrected and a(11)-a(15) from _Gleb Ivanov_, Dec 05 2021