A376219 Positions of records in A174414.
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
Examples
a(3) = 11 because A174414(11) = 19 is greater than A174414(1),..., A174414(10).
Programs
-
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;
-
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
Extensions
a(23)-a(28) from Chai Wah Wu, Sep 20 2024
Comments