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.

Previous Showing 41-45 of 45 results.

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.

A055737 Number of prime triples < 10^n, where a prime triple means 3 successive primes of the form {p, p+2, p+4} or {p, p+4, p+6}.

Original entry on oeis.org

0, 8, 30, 112, 507, 2837, 17220, 111156, 759256, 5425573, 40174725, 305689269, 2379622234, 18887841658
Offset: 1

Views

Author

Robert G. Wilson v, Jun 09 2000

Keywords

Comments

For this sequence all three members of the triple must be below the 10^n bound. - Sean A. Irvine, Apr 04 2022

References

  • J. Recreational Math., vol. 23, No. 2, 1991, p. 97.

Crossrefs

Programs

  • Mathematica
    x=168; a=Table[ Prime[ n ], {n, 1, x} ] c=0; Do[ If[ a[[ n ]]+6==a[ [ n+2 ] ], c++ ], {n, 1, x-2} ]; c # the values of x to use are given by A006880

Extensions

a(7)-a(9) from Jud McCranie, Oct 07 2000
a(10)-a(12) from Martin Raab, Oct 04 2006
a(13)-a(14) from Charles R Greathouse IV, Feb 09 2022

A143726 Middle members of beastly cousin prime triples: primes p such that both p+666 and p-666 are prime.

Original entry on oeis.org

733, 773, 823, 857, 877, 947, 997, 1033, 1087, 1123, 1213, 1223, 1283, 1307, 1327, 1423, 1487, 1607, 1993, 2027, 2137, 2153, 2237, 2273, 2287, 2333, 2543, 2663, 2677, 2693, 2797, 2803, 2917, 3187, 3257, 3323, 3407, 3433, 3463, 3467, 3593, 3623, 3847
Offset: 1

Views

Author

Keywords

Examples

			733 - 666 = 67, 733 + 666 = 1399 and 67, 733, 1399 are all prime, so 733 is a term of the sequence. - _Felix Fröhlich_, May 26 2022
		

Crossrefs

Cf. A007529 (p, p+2 or +4, p+6 prime), A023200 (p and p+4 prime), A046132 (p-4 and p prime), A073648 (p-2, p and p+4 prime).

Programs

  • Mathematica
    lst={};b=666;Do[p=Prime[n];If[PrimeQ[p+b]&&PrimeQ[p-b],AppendTo[lst,p]],{n,5!+2,7!}];lst
    Select[Prime[Range[122,600]],AllTrue[#+{666,-666},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 08 2018 *)
  • PARI
    forprime(p=1, 3900, if(ispseudoprime(p+666) && ispseudoprime(p-666), print1(p, ", "))) \\ Felix Fröhlich, May 26 2022

Extensions

Name edited by Felix Fröhlich, May 26 2022

A361267 Numbers k such that prime(k+2) - prime(k) = 6.

Original entry on oeis.org

3, 4, 5, 6, 7, 12, 13, 19, 25, 26, 27, 28, 43, 44, 48, 49, 59, 63, 64, 69, 88, 89, 112, 116, 142, 143, 147, 148, 151, 152, 181, 182, 206, 211, 212, 224, 225, 229, 234, 235, 236, 253, 261, 264, 276, 285, 286, 287, 301, 302, 313, 314, 322, 332, 336, 352, 384, 389
Offset: 1

Views

Author

Atabey Kaygun, Mar 06 2023

Keywords

Crossrefs

Programs

  • Clojure
    (defn next-prime [n]
      (if (= n 2)
          3
          (let [m (+ n 2)
                t (-> n Math/sqrt int (+ 2))]
              (if (some #(zero? (mod m %)) (range 2 t))
                  (next-prime m)
                  m))))
    (def primes (lazy-seq (iterate next-prime 2)))
    (defn triplet-primes-positions [n]
      (->> primes
           (take n)
           (partition 3 1)
           (map list (range))
           (filter (fn [[i xs]] (= 6 (- (last xs) (first xs)))))
           (map #(-> % first inc))))
    (println (triplet-primes-positions 2000))
    
  • Maple
    q:= n-> is(ithprime(n+2)-ithprime(n)=6):
    select(q, [$1..400])[];  # Alois P. Heinz, Mar 06 2023
  • Mathematica
    Select[Range[400], Prime[# + 2] - Prime[#] == 6 &] (* Michael De Vlieger, Mar 06 2023 *)
    PrimePi/@(Select[Partition[Prime[Range[400]],3,1],#[[3]]-#[[1]]==6&][[;;,1]]) (* Harvey P. Dale, Sep 16 2023 *)
  • Python
    from itertools import count, islice
    from sympy import nextprime, prime
    def A361267_gen(startvalue=1): # generator of terms >= startvalue
        p = prime(m:=max(startvalue,1))
        q = nextprime(p)
        r = nextprime(q)
        for k in count(m):
            if r-p == 6:
                yield k
            p, q, r = q, r, nextprime(r)
    A361267_list = list(islice(A361267_gen(),20)) # Chai Wah Wu, Mar 27 2023

Formula

a(n) = A000720(A007529(n)). - Alois P. Heinz, Mar 06 2023

A275683 Difference between the smallest 10^n-digit member of a prime triple and 10^(10^n - 1).

Original entry on oeis.org

4, 2821, 1821127, 1598241813
Offset: 0

Views

Author

Arkadiusz Wesolowski, Aug 05 2016

Keywords

Crossrefs

Cf. A007529.
Previous Showing 41-45 of 45 results.