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.

Showing 1-1 of 1 results.

A376219 Positions of records in A174414.

Original entry on oeis.org

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

Views

Author

Robert Israel, Sep 16 2024

Keywords

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.

Examples

			a(3) = 11 because A174414(11) = 19 is greater than A174414(1),..., A174414(10).
		

Crossrefs

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
Showing 1-1 of 1 results.