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-2 of 2 results.

A343637 10^n + a(n) is the least (n+1)-digit prime member of a prime septuplet, or a(n) = 0 if no such number exists.

Original entry on oeis.org

0, 1, 0, 4639, 78799, 65701, 68701, 1900501, 24066079, 12986041, 5758291, 63497419, 126795511, 85452991, 693558301, 1539113749, 1265954431, 959416471, 8269773991, 620669029, 9487038451, 1024481911, 8285411491, 21631441411, 15981152869, 23307738889, 32551582849, 114332503171
Offset: 0

Views

Author

M. F. Hasler, Jul 13 2021

Keywords

Comments

The smallest (n+1)-digit septuplet is given by 10^n + a(n) + D, with either D = {0, 2, 6, 8, 12, 18, 20} or D = {0, 2, 8, 12, 14, 18, 20}. (For septuplets of the first resp. second type, the first member always ends in digit 1, resp. 9.)
Numerical evidence strongly suggests the conjecture that 0 < a(n) < 10^n for all n > 4, but not even the existence of infinitely many prime septuplets is proved.
Terms up to n = 200 and some further isolated terms due to Norman Luhn et al., cf. LINKS.

Examples

			a(0) = 0 because no single-digit prime starts a prime septuplet.
a(1) = 1 because 10^1 + 1 = 11 = A022009(1) is the first member of the smallest (2-digit) prime septuplet {11, 13, 17, 19, 23, 29, 31} (of the first type).
a(2) = 0 because there is no prime septuplet starting with a 3-digit prime.
a(3) = 4639 because 10^3 + a(3) = 5639 = A022010(1) is the first 4-digit initial member of a prime septuplet, which happens to be of the second type, D = {0, 2, 8, 12, 14, 18, 20}. Similarly, 10^4 + a(4) = 88799 = A022010(2) starts the smallest 5-digit prime septuplet.
For all subsequent terms, a(n) < 10^n (conjectured), so the primes are of the form 10...0XXX where XXX = a(n).
		

Crossrefs

Cf. A022009 and A022010 (initial members of prime septuplets of first and second type).
Cf. A343635, A343636 (analog for quintuplets and sextuplets).

Programs

  • PARI
    apply( {A343637(n,D=[2,6,8,12,14,18,20],X=2^6+2^14)=forprime(p=10^n, 10^(n+1), my(t=2); foreach(D, d, ispseudoprime(p+d)||(t-- && bittest(X,d))||next(2));return(p-10^n))}, [0..10]) \\ For illustration; unoptimized code, becomes slow for n >= 11.

Formula

a(n) = min { p > 10^n; p in A022009 U A022010 } - 10^n, for n > 2.

A357052 Distance from 10^n to the next prime triplet.

Original entry on oeis.org

4, 1, 1, 87, 267, 357, 33, 451, 2011, 2821, 10687, 2497, 5073, 5557, 15243, 7147, 7357, 7197, 6627, 9157, 26317, 25833, 39207, 56067, 6667, 32937, 70561, 106533, 597, 28503, 19167, 74551, 301711, 6747, 246871, 223353, 63057, 75183, 48513, 61323, 16107, 554287, 160141, 29821, 220711, 49441
Offset: 0

Views

Author

M. F. Hasler, Sep 14 2022

Keywords

Comments

Equivalently, least k > 0 such that either 10^n + k + {0, 2, 6} or 10^n + k + {0, 4, 6} are primes.
The initial term, index n = 0, is the only even term and the only case where the last member of the triplet has one digit more than the first member. The value a(0) = 4 correspond to the prime triplet (5, 7, 11). We do not consider the triplets (2, 3, 5) or (3, 5, 7) which come earlier but do not follow the standard pattern.

Examples

			(11, 13, 17) and (101, 103, 107) are the smallest 2-digit and 3-digit prime triplets, at distance a(1) = a(2) = 1 from 10^1 and 10^2, respectively.
(1087, 1091, 1093) is the smallest 4-digit prime triplet, at distance a(3) = 87 from 10^3.
a(6999) = 1141791245437 is the distance from 10^6999 to the smallest 7000 digit prime triplet, of the form (p, p+2, p+6).
		

Crossrefs

Cf. A007529 (start of prime triplets), A022004 and A022005 (start of prime triples {0,2,6} resp. {0,4,6}), A343635 (same for quintuplets).

Programs

  • Maple
    f:= proc(n) local p;
       for p from 10^n + 1 by 2 do
         if p mod 3 = 1 then if isprime(p) and isprime(p+4) and isprime(p+6) then return p-10^n fi
         elif p mod 3 = 2 and isprime(p) and isprime(p+2) and isprime(p+6) then
    return p-10^n
         fi
       od;
    end proc:
    f(0):= 4:
    map(f, [$0..45]); # Robert Israel, Sep 15 2022
    A357052 := proc(n) local p,q,r; p,q,r := 10^n,0,0; while p-r <> 6 do p,q,r := nextprime(p+1),p,q; od; r-10^n; end; # M. F. Hasler, Sep 15 2022
  • PARI
    A357052(n,q=-9,r=-9)=forprime(p=10^n,,p-r<7 && return(r-10^n);[q,r]=[p,q])

Formula

a(n) = min{ k>0 | 10^n + k + [0, 6] contains 3 primes }.
a(n) = min A007529 ∩ [10^n, oo) for n > 0.
Showing 1-2 of 2 results.