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 71-80 of 80 results.

A244452 Primes p such that p^2-2 and p^2+4 are also prime (i.e., initial members of prime triples (p, p^2-2, p^2+4)).

Original entry on oeis.org

3, 5, 7, 13, 37, 47, 103, 233, 293, 313, 607, 677, 743, 1367, 1447, 2087, 2543, 3023, 3803, 3863, 4093, 4153, 4373, 4583, 4643, 4793, 4957, 5087, 5153, 5623, 5683, 5923, 6287, 7177, 7247, 7547, 7817, 8093, 8527, 9133, 9403
Offset: 1

Views

Author

Felix Fröhlich, Jun 28 2014

Keywords

Comments

Intersection of A062326 and A062324.

Examples

			3 is in the sequence since it is the first member of the triple (3, 3^2-2, 3^2+4) and the resulting values in the triple (3, 7, 13) are all prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1200]],AllTrue[#^2+{4,-2},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 28 2018 *)
  • PARI
    forprime(p=2, 10^4, if(isprime(p^2-2) && isprime(p^2+4), print1(p, ", ")))

A286313 Union of A078561 and A078562.

Original entry on oeis.org

19, 31, 43, 61, 73, 79, 127, 157, 163, 229, 271, 349, 373, 379, 433, 439, 499, 607, 643, 673, 733, 751, 937, 967, 1009, 1093, 1213, 1279, 1291, 1429, 1489, 1543, 1549, 1597, 1609, 1657, 1777, 1861, 1987, 2131, 2203, 2287, 2341, 2347, 2371, 2383, 2389
Offset: 1

Views

Author

Zak Seidov, May 06 2017

Keywords

Comments

Number of terms among first 10^k primes, k=1..8:
0, 1, 17, 105, 646, 4385, 31721, 240346, 1884832.
E.g., k=1, first 10 primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and only 19 is a term of the sequence. - Zak Seidov, May 08 2017
Primes p such that prime(p+2) = p + 10. - Harvey P. Dale, Jan 13 2022

Crossrefs

Cf. A078561 and A078562.

Programs

  • Maple
    select(p -> isprime(p) and isprime(p+10) and (isprime(p+4) xor isprime(p+6)), [seq(i,i=5..10000,2)]); # Robert Israel, May 08 2017
  • Mathematica
    Select[Prime[Range[1000]], NextPrime[#, 2] == # + 10 &]
    Select[Partition[Prime[Range[400]],3,1],#[[1]]+10==#[[3]]&][[All,1]] (* Harvey P. Dale, Jan 13 2022 *)

A308086 Carmichael numbers c such that c-4, c-2 and c+2 are primes.

Original entry on oeis.org

656601, 11512252145095521, 35151891169379601, 89283676825965441, 209606994019068801, 584047819872236721, 627126355430628801, 1107574117930742001, 1152431453119654401, 2990125943388676401, 6919232969930803761
Offset: 1

Views

Author

Rick L. Shepherd, May 11 2019

Keywords

Comments

Subsequence of A287591 (Carmichael numbers that are arithmetic means of cousin primes). Calculated from Amiram Eldar's table in that sequence. The Carmichael numbers here are contained within intervals defined by prime triples of the form (p, p+2, p+6); therefore, for each term, four consecutive odd numbers are prime, prime, Carmichael number (divisible by 3), then prime. None of the terms of A287591 available so far are contained within intervals defined by prime triplets of the form (p, p+4, p+6). Is that possible? If so, is it also possible for a Carmichael number to be immediately preceded and succeeded by twin primes, i.e., to be "contained" in a prime quadruplet? (Such Carmichael numbers would necessarily be multiples of 15.)

Examples

			656601 = 3*11*101*197 is a term because 656597 and 656599 are twin primes, 656601 is a Carmichael number, and 656603 is also a prime.
		

Crossrefs

Extensions

More terms from Amiram Eldar, Jul 02 2019

A341357 Primes p such that q*r == p (mod q+r) where q and r are the next primes after p.

Original entry on oeis.org

5, 11, 17, 41, 101, 107, 191, 227, 311, 347, 461, 467, 641, 821, 857, 881, 1091, 1277, 1301, 1427, 1481, 1487, 1511, 1607, 1811, 1871, 1997, 2081, 2237, 2267, 2447, 2657, 2687, 3251, 3461, 3527, 3671, 3917, 4001, 4127, 4517, 4637, 4787, 4931, 4967, 5039, 5231, 5477, 5501, 5651, 6101, 6197, 6827
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Feb 09 2021

Keywords

Comments

If for some k >= 0 we have q=p+2*(k+1)*(2*k+1) and r=p+2*(k+1)*(2*k+3) then p is in the sequence. This includes A022004 in the case k=0.
It appears that all terms are of the above form.

Examples

			a(3) = 17 is in the sequence because with p = 17, q = 19, r = 23, q*r = 437 == 17 (mod 19+23=42).
		

Crossrefs

Programs

  • Maple
    q:= 2: r:= 3: count:= 0: R:= NULL:
    while count < 100 do
      p:= q: q:= r: r:= nextprime(r);
    if (q*r) mod (q+r) = p then count:= count+1; R:= R, p fi;
    od:
    R;

A343691 a(n) is the least prime p such that p + A014574(n) is prime.

Original entry on oeis.org

3, 5, 5, 5, 7, 5, 7, 7, 5, 5, 11, 7, 11, 5, 13, 5, 11, 7, 11, 5, 5, 11, 7, 5, 19, 7, 7, 13, 5, 13, 11, 5, 11, 5, 5, 11, 7, 11, 7, 5, 11, 7, 5, 7, 5, 7, 5, 7, 5, 5, 5, 7, 29, 11, 11, 13, 5, 11, 17, 23, 5, 11, 5, 11, 17, 7, 11, 5, 5, 23, 7, 7, 7, 17, 5, 5, 7, 11, 7, 17, 29, 11, 17, 13, 5, 13, 7, 13
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Apr 26 2021

Keywords

Comments

a(n) >= 5 for n >= 2, since A014574(n) == 0 (mod 6).
a(n) = 5 if and only if A001359(n) is in A022004.

Examples

			a(5) = 7 because A014574(5) = 30 and 7 is the least prime p such that 30+p is prime.
		

Crossrefs

Programs

  • Maple
    P:= {seq(ithprime(i),i=1..10^4)}:
    A014574:= sort(convert(map(`+`,P,1) intersect map(`-`,P,1),list)):
    f:= proc(n) local p,t;
       p:= 2;
       do
          p:= nextprime(p);
          if isprime(p+A014574[n]) then return p fi
       od
    end proc:
    map(f, [$1..nops(A014574)]);

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

A165235 Least prime p such that the n+1 numbers p + 2^k - 2, k=1..n+1, are all prime.

Original entry on oeis.org

3, 5, 5, 17, 17, 1607, 1607, 19427, 2397347207, 153535525937
Offset: 1

Views

Author

T. D. Noe, Sep 09 2009

Keywords

Comments

The n+1 primes have common differences of 2^k for k=1..n. For any n, the set {2^k - 2, k=1..n+1} is admissible. Hence by the prime k-tuple conjecture, an infinite number of primes p should exist for each n. Note that a(1) is the first term of the twin primes A001359 and a(2) is the first term of prime triples A022004. The a(12) term is greater than 10^12.

Examples

			a(5)=17 because {17,19,23,31,47,79} are 6 primes whose differences are powers of 2, and 17 is the least such prime.
		

Crossrefs

Cf. A000918 (2^n - 2)

Programs

  • Mathematica
    p=3; Table[While[ !And@@PrimeQ[p+2^Range[2,n+1]-2], p=NextPrime[p]]; p, {n,8}]

A214000 Number of twin prime pairs between two consecutive prime triples (p, p+2, p+6).

Original entry on oeis.org

0, 0, 1, 2, 0, 3, 0, 3, 0, 2, 4, 2, 0, 0, 4, 2, 1, 1, 1, 0, 0, 5, 2, 1, 3, 0, 5, 0, 8, 5, 0, 3, 3, 1, 3, 9, 1, 2, 1, 0, 3, 3, 0, 2, 6, 12, 14, 2, 1, 0, 2, 4, 8, 0, 13, 0, 0, 10, 5, 5, 7, 0, 4, 2, 1, 0, 3, 1, 5, 7, 0, 2, 0, 1, 9, 3, 13, 3, 4, 5, 0, 7, 5, 4, 2
Offset: 1

Views

Author

Michel Lagneau, Jun 30 2012

Keywords

Examples

			a(6)= 3 because between the 6th and 7th prime triples there are 3 twin prime pairs : (107,109,113), (137,139), (149,151), (179,181), (191,193,197).
		

Crossrefs

Programs

  • Maple
    with(numtheory):T:=array(1..1000):k:=1:for n from 1 to 4000 do:p:=ithprime(n):if type(p+2,prime)=true and type(p+6,prime) = true then T[k]:=p:T[k+1]:=p+6:k:=k+2:else fi:od:for m from 2 by 2 to k-2 do: p1:= T[m]:p2:=T[m+1]:i:=0:for q from p1+1 to p2-1 do:if type(q,prime)=true and type(q+2,prime) = true and q+2 <>p2 then i:=i+1:else fi:od: printf(`%d, `,i):od:

A297709 Table read by antidiagonals: Let b be the number of digits in the binary expansion of n. Then T(n,k) is the k-th odd prime p such that the binary digits of n match the primality of the b consecutive odd numbers beginning with p (or 0 if no such k-th prime exists).

Original entry on oeis.org

3, 5, 7, 7, 13, 3, 11, 19, 5, 23, 13, 23, 11, 31, 7, 17, 31, 17, 47, 13, 5, 19, 37, 29, 53, 19, 11, 3, 23, 43, 41, 61, 37, 17, 0, 89, 29, 47, 59, 73, 43, 29, 0, 113, 23, 31, 53, 71, 83, 67, 41, 0, 139, 31, 19, 37, 61, 101, 89, 79, 59, 0, 181, 47, 43, 7, 41, 67
Offset: 1

Views

Author

Jon E. Schoenfield, Apr 15 2018

Keywords

Comments

For each n >= 1, row n is the union of rows 2n and 2n+1.
Rows with no nonzero terms: 15, 21, 23, 28, 30, 31, ...
Rows whose only nonzero term is 3: 7, 14, 29, 59, 118, 237, 475, 950, 1901, 3802, 7604, ...
Rows whose only nonzero term is 5: 219, 438, 877, 1754, 3508, 7017, 14035, ...
For j = 2, 3, 4, ..., respectively, the first row whose only nonzero term is prime(j) is 7, 219, 2921, ...; is there such a row for every odd prime?

Examples

			13 = 1101_2, so row n=13 lists the odd primes p such that the four consecutive odd numbers p, p+2, p+4, and p+6 are prime, prime, composite, and prime, respectively; these are the terms of A022004.
14 = 1110_2, so row n=14 lists the odd primes p such that p, p+2, p+4, and p+6 are prime, prime, prime, and composite, respectively; since there is only one such prime (namely, 3), there is no such 2nd, 3rd, 4th, etc. prime, so the terms in row 14 are {3, 0, 0, 0, ...}.
15 = 1111_2, so row n=15 would list the odd primes p such that p, p+2, p+4, and p+6 are all prime, but since no such prime exists, every term in row 15 is 0.
Table begins:
  n in base|                    k                   |  OEIS
  ---------+----------------------------------------+sequence
  10     2 |   1    2    3    4    5    6    7    8 | number
  =========+========================================+========
   1     1 |   3    5    7   11   13   17   19   23 | A065091
   2    10 |   7   13   19   23   31   37   43   47 | A049591
   3    11 |   3    5   11   17   29   41   59   71 | A001359
   4   100 |  23   31   47   53   61   73   83   89 | A124582
   5   101 |   7   13   19   37   43   67   79   97 | A029710
   6   110 |   5   11   17   29   41   59   71  101 | A001359*
   7   111 |   3    0    0    0    0    0    0    0 |
   8  1000 |  89  113  139  181  199  211  241  283 | A083371
   9  1001 |  23   31   47   53   61   73   83  131 | A031924
  10  1010 |  19   43   79  109  127  163  229  313 |
  11  1011 |   7   13   37   67   97  103  193  223 | A022005
  12  1100 |  29   59   71  137  149  179  197  239 | A210360*
  13  1101 |   5   11   17   41  101  107  191  227 | A022004
  14  1110 |   3    0    0    0    0    0    0    0 |
  15  1111 |   0    0    0    0    0    0    0    0 |
  16 10000 | 113  139  181  199  211  241  283  293 | A124584
  17 10001 |  89  359  389  401  449  479  491  683 | A031926
  18 10010 |  31   47   61   73   83  151  157  167 |
  19 10011 |  23   53  131  173  233  263  563  593 | A049438
  20 10100 |  19   43   79  109  127  163  229  313 |
  21 10101 |   0    0    0    0    0    0    0    0 |
  22 10110 |   7   13   37   67   97  103  193  223 | A022005
  23 10111 |   0    0    0    0    0    0    0    0 |
  24 11000 | 137  179  197  239  281  419  521  617 |
  25 11001 |  29   59   71  149  269  431  569  599 | A049437*
  26 11010 |  17   41  107  227  311  347  461  641 |
  27 11011 |   5   11  101  191  821 1481 1871 2081 | A007530
  28 11100 |   0    0    0    0    0    0    0    0 |
  29 11101 |   3    0    0    0    0    0    0    0 |
  30 11110 |   0    0    0    0    0    0    0    0 |
  31 11111 |   0    0    0    0    0    0    0    0 |
*other than the referenced sequence's initial term 3
.
Alternative version of table:
.
  n in base|primal-|               k              |  OEIS
  ---------+  ity  +------------------------------+  seq.
  10     2 |pattern|   1    2    3    4    5    6 | number
  =========+=======+==============================+========
   1     1 | p     |   3    5    7   11   13   17 | A065091
   2    10 | pc    |   7   13   19   23   31   37 | A049591
   3    11 | pp    |   3    5   11   17   29   41 | A001359
   4   100 | pcc   |  23   31   47   53   61   73 | A124582
   5   101 | pcp   |   7   13   19   37   43   67 | A029710
   6   110 | ppc   |   5   11   17   29   41   59 | A001359*
   7   111 | ppp   |   3    0    0    0    0    0 |
   8  1000 | pccc  |  89  113  139  181  199  211 | A083371
   9  1001 | pccp  |  23   31   47   53   61   73 | A031924
  10  1010 | pcpc  |  19   43   79  109  127  163 |
  11  1011 | pcpp  |   7   13   37   67   97  103 | A022005
  12  1100 | ppcc  |  29   59   71  137  149  179 | A210360*
  13  1101 | ppcp  |   5   11   17   41  101  107 | A022004
  14  1110 | pppc  |   3    0    0    0    0    0 |
  15  1111 | pppp  |   0    0    0    0    0    0 |
  16 10000 | pcccc | 113  139  181  199  211  241 | A124584
  17 10001 | pcccp |  89  359  389  401  449  479 | A031926
  18 10010 | pccpc |  31   47   61   73   83  151 |
  19 10011 | pccpp |  23   53  131  173  233  263 | A049438
  20 10100 | pcpcc |  19   43   79  109  127  163 |
  21 10101 | pcpcp |   0    0    0    0    0    0 |
  22 10110 | pcppc |   7   13   37   67   97  103 | A022005
  23 10111 | pcppp |   0    0    0    0    0    0 |
  24 11000 | ppccc | 137  179  197  239  281  419 |
  25 11001 | ppccp |  29   59   71  149  269  431 | A049437*
  26 11010 | ppcpc |  17   41  107  227  311  347 |
  27 11011 | ppcpp |   5   11  101  191  821 1481 | A007530
  28 11100 | pppcc |   0    0    0    0    0    0 |
  29 11101 | pppcp |   3    0    0    0    0    0 |
  30 11110 | ppppc |   0    0    0    0    0    0 |
  31 11111 | ppppp |   0    0    0    0    0    0 |
.
     *other than the referenced sequence's initial term 3
		

Crossrefs

A350856 Initial members of prime triples (p, p+2, p+14).

Original entry on oeis.org

3, 5, 17, 29, 59, 137, 149, 179, 197, 227, 269, 419, 599, 617, 659, 809, 1019, 1049, 1277, 1289, 1607, 1787, 1997, 2129, 2237, 2267, 2657, 2789, 3167, 3257, 3299, 3329, 3359, 3527, 3557, 3917, 3929, 4217, 4229, 4259, 4547, 4637, 4649, 4787, 4799, 5009, 5099
Offset: 1

Views

Author

Matt C. Anderson, Jan 19 2022

Keywords

Comments

According to the k-tuple conjecture this sequence is theoretically infinite.

Crossrefs

Cf. A022004 (p,p+2,p+6), A046134 (p,p+2,p+8), A046135 (p,p+2,p+12).

Programs

  • Maple
    for a from 3 to 1000 by 2 do
    if isprime(a) and isprime(a+2) and isprime(a+14) then
    print(a);
    end if
    end do
    # second Maple program:
    q:= p-> andmap(isprime, [p, p+2, p+14]):
    select(q, [$1..10000])[];  # Alois P. Heinz, Jan 28 2022
  • Mathematica
    Select[Range[7000], And @@ PrimeQ[# + {0, 2, 14}] &] (* Amiram Eldar, Jan 20 2022 *)
Previous Showing 71-80 of 80 results.