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.

A376220 Record values in A174414.

This page as a plain text file.
%I A376220 #27 Jul 21 2025 13:13:29
%S A376220 3,9,19,23,27,37,39,107,1007,1041,1047,1051,1073,10000011,10000047,
%T A376220 10000109,1000000000000017,1000000000000053,1000000000000071,
%U A376220 1000000000000291,1000000000000449,10000000000000000000000000000113,10000000000000000000000000000193,10000000000000000000000000000249
%N A376220 Record values in A174414.
%C A376220 Numbers m such that for some x, the concatenation (m+x)||m is prime, and for every j < x there is some k < m such that (k+j)||k is prime.
%H A376220 Chai Wah Wu, <a href="/A376220/b376220.txt">Table of n, a(n) for n = 1..28</a>
%F A376220 a(n) = A174414(A376219(n)).
%e A376220 a(3) = 19 because A376219(3) = 11 and A174414(11) = 19.  Thus 19 is the least k such that the concatenation (k+11)||k is prime, and for all j < 11 we have (k+j)||k prime for some k < 19.
%p A376220 tcat:= proc(a, b) a*10^(1+ilog10(b))+b end proc:
%p A376220 f:= proc(n) local k, d;
%p A376220     for d from 1 do
%p A376220       if igcd(n, 10^d+1) > 1 then next fi;
%p A376220       for k from 10^(d-1)+`if`(d=1, 0, 1) to 10^d by 2 do
%p A376220         if isprime(tcat(n+k, k)) then return k fi
%p A376220     od od
%p A376220 end proc:
%p A376220 R:= NULL: m:= 0:
%p A376220 for n from 1 to 10^6 do
%p A376220    v:= f(n);
%p A376220    if v > m then m:= v; R:= R, m fi
%p A376220 od:
%p A376220 R;
%o A376220 (Python)
%o A376220 from itertools import count, islice
%o A376220 from math import gcd
%o A376220 from sympy import isprime
%o A376220 def A376220_gen(): # generator of terms
%o A376220     c = 0
%o A376220     for n in count(1):
%o A376220         for l in count(1):
%o A376220             if gcd(n,(m:=10**l)+1)==1:
%o A376220                 r = m//10
%o A376220                 a = m*(n+r)+r
%o A376220                 for k in range(r,m):
%o A376220                     if isprime(a):
%o A376220                         if k>c:
%o A376220                             yield k
%o A376220                             c = k
%o A376220                         break
%o A376220                     a += m+1
%o A376220                 else:
%o A376220                     continue
%o A376220                 break
%o A376220 A376220_list = list(islice(A376220_gen(),22)) # _Chai Wah Wu_, Sep 19 2024
%Y A376220 Cf. A174414, A376219.
%K A376220 nonn,base
%O A376220 1,1
%A A376220 _Robert Israel_, Sep 16 2024