login
A376219
Positions of records in A174414.
1
1, 10, 11, 33, 88, 132, 341, 505, 1111, 2828, 10504, 31512, 34138, 81103, 152207, 304414, 1378751, 2587519, 2757502, 5175038, 126845092, 486699103, 883779391, 973398206, 1857177597, 1942660159, 3095295995, 7307153656
OFFSET
1,2
COMMENTS
Positive integers k such that the least m for which the concatenation (m+k)||m is prime is greater than it is for all previous k.
If k and 10^d+1 are not coprime, then A174414(k) can't have d digits.
Therefore, assuming A174414(n) always exists, it is unbounded and this sequence is infinite.
EXAMPLE
a(3) = 11 because A174414(11) = 19 is greater than A174414(1),..., A174414(10).
MAPLE
tcat:= proc(a, b) a*10^(1+ilog10(b))+b end proc:
f:= proc(n) local k, d;
for d from 1 do
if igcd(n, 10^d+1) > 1 then next fi;
for k from 10^(d-1)+`if`(d=1, 0, 1) to 10^d by 2 do
if isprime(tcat(n+k, k)) then return k fi
od od
end proc:
J:= NULL: m:= 0:
for n from 1 to 10^6 do
v:= f(n);
if v > m then m:= v; J:= J, n fi
od:
J;
PROG
(Python)
from itertools import count, islice
from math import gcd
from sympy import isprime
def A376219_gen(): # generator of terms
c = 0
for n in count(1):
for l in count(1):
if gcd(n, (m:=10**l)+1)==1:
r = m//10
a = m*(n+r)+r
for k in range(r, m):
if isprime(a):
if k>c:
yield n
c = k
break
a += m+1
else:
continue
break
A376219_list = list(islice(A376219_gen(), 30)) # Chai Wah Wu, Sep 18 2024
CROSSREFS
Sequence in context: A041208 A041485 A041206 * A339078 A097990 A280203
KEYWORD
nonn,base,more
AUTHOR
Robert Israel, Sep 16 2024
EXTENSIONS
a(23)-a(28) from Chai Wah Wu, Sep 20 2024
STATUS
approved