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 21-30 of 154 results. Next

A049489 Primes p such that p + 32 is also prime.

Original entry on oeis.org

5, 11, 29, 41, 47, 71, 107, 131, 149, 167, 179, 191, 197, 239, 251, 281, 317, 347, 389, 401, 431, 467, 491, 509, 569, 587, 599, 641, 659, 677, 701, 719, 797, 821, 827, 887, 977, 1019, 1031, 1061, 1091, 1097, 1181, 1217, 1259, 1289, 1367, 1427, 1439, 1451
Offset: 1

Views

Author

Keywords

Examples

			29 and 29 + 32 = 61 are both prime.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(2000) | IsPrime(p+32)]; // Vincenzo Librandi, Apr 22 2015
  • Maple
    Primes:= select(isprime,{seq(i,i=3..10000,2)}):
    sort(convert(Primes intersect map(`-`,Primes,32),list)); # Robert Israel, Dec 20 2015
  • Mathematica
    Select[Range[2000], PrimeQ[#] && PrimeQ[# + 32] &] (* Vincenzo Librandi, Apr 22 2015 *)
    Select[Prime[Range[300]],PrimeQ[#+32]&] (* Harvey P. Dale, Oct 14 2017 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+32); \\ Michel Marcus, Dec 31 2013
    

Extensions

Name improved by Bruno Berselli, Apr 22 2015

A049490 a(n) and a(n)+64 both prime.

Original entry on oeis.org

3, 7, 19, 37, 43, 67, 73, 103, 109, 127, 163, 193, 199, 229, 283, 337, 367, 379, 397, 439, 457, 499, 523, 577, 613, 619, 709, 733, 757, 823, 877, 883, 907, 919, 967, 997, 1033, 1039, 1087, 1117, 1123, 1129, 1153, 1213, 1237, 1297, 1303, 1423, 1429, 1447
Offset: 1

Views

Author

Keywords

Examples

			19 and 19+64=83 both prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[300]],PrimeQ[#+64]&] (* Harvey P. Dale, Mar 21 2011 *)
  • PARI
    select(p -> isprime(p+64),primes(1000)) \\ Edward Jiang, Sep 05 2014

A094343 List of pairs of primes (p, q) with q - p = 4.

Original entry on oeis.org

3, 7, 7, 11, 13, 17, 19, 23, 37, 41, 43, 47, 67, 71, 79, 83, 97, 101, 103, 107, 109, 113, 127, 131, 163, 167, 193, 197, 223, 227, 229, 233, 277, 281, 307, 311, 313, 317, 349, 353, 379, 383, 397, 401, 439, 443, 457, 461, 463, 467, 487, 491, 499, 503, 613, 617, 643
Offset: 1

Views

Author

Gerard Schildberger, Jun 04 2004

Keywords

Comments

The two primes p and p+4 are not necessarily consecutive primes (for that, see A111980).
The pairs are listed in order, sorted by their smallest member. - N. J. A. Sloane, Dec 27 2019

Examples

			The pairs are (3,7), (7,11), (13,17), etc.
		

Crossrefs

Almost identical to A111980.
Union of A023200 and A046132.
Cf. twin primes (A001097).
See also A000040, A111981, A001097.
For a gap of 6 (which initially is very common) see A140546.

Programs

  • Mathematica
    Flatten[{#,#+4}&/@Select[Prime[Range[200]],PrimeQ[#+4]&]] (* Harvey P. Dale, Apr 13 2011 *)
  • PARI
    isok(n) = (isprime(n) && isprime(n+4)) || (isprime(n-4) && isprime(n)); \\ Michel Marcus, Aug 26 2013

Formula

a(2*n-1)=A023200(n). a(2*n)=A046132(n).

Extensions

Description was corrupted up during editing; correct description restored Aug 21 2005.
a(3) = 7 added by Vincenzo Librandi, May 06 2016

A156104 Primes p such that p+36 is also prime.

Original entry on oeis.org

5, 7, 11, 17, 23, 31, 37, 43, 47, 53, 61, 67, 71, 73, 101, 103, 113, 127, 131, 137, 157, 163, 191, 193, 197, 227, 233, 241, 257, 271, 277, 281, 311, 313, 317, 331, 337, 347, 353, 373, 383, 397, 421, 431, 443, 463, 467, 487, 521, 541, 557, 563, 571, 577, 607
Offset: 1

Views

Author

Vincenzo Librandi, Feb 08 2009

Keywords

Crossrefs

Cf. A156112.
Cf. sequences of the type p+n are primes: A001359 (n=2), A023200 (n=4), A023201 (n=6), A023202 (n=8), A023203 (n=10), A046133 (n=12), A153417 (n=14), A049488 (n=16), A153418 (n=18), A153419 (n=20), A242476 (n=22), A033560 (n=24), A252089 (n=26), A252090 (n=28), A049481 (n=30), A049489 (n=32), A252091 (n=34), this sequence (n=36); A062284 (n=50), A049490 (n=64), A156105 (n=72), A156107 (n=144).

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | IsPrime(p + 36)]; // Vincenzo Librandi, Oct 31 2012
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[(#+ 36)]&] (* Vincenzo Librandi, Oct 31 2012 *)

A218867 Number of prime pairs {p,q} with p>q and {p-4,q+4} also prime such that p+(1+(n mod 6))q=n if n is not congruent to 4 (mod 6), and p-q=n and q

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 2, 1, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0, 1, 2, 2, 2, 2, 0, 2, 2, 1, 1, 1, 2, 1, 0, 0, 1, 0, 2, 2, 0, 2, 1, 3, 0, 1, 1, 2, 2, 1, 0, 3, 2, 3, 0, 2, 1, 4, 1, 1, 2, 1, 3, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 13 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>50000 with n different from 50627, 61127, 66503.
This conjecture implies that there are infinitely many cousin prime pairs. It is similar to the conjectures related to A219157 and A219055.

Examples

			a(20)=1 since 20=11+3*3 with 11-4 and 3+4 prime. a(28)=1 since 28=41-13 with 41-4 and 13+4 prime.
		

Crossrefs

Programs

  • Mathematica
    c[n_]:=c[n]=If[Mod[n+2,6]==0,1,-1-Mod[n,6]]; d[n_]:=d[n]=2+If[Mod[n+2,6]>0,Mod[n,6],0]; a[n_]:=a[n]=Sum[If[PrimeQ[Prime[k]+4] == True && PrimeQ[n+c[n]Prime[k]] == True && PrimeQ[n+c[n]Prime[k]-4]==True,1,0], {k,1,PrimePi[(n-1)/d[n]]}]; Do[Print[n," ",a[n]], {n,100}]

A098974 Primes p such that q-p = 24, where q is the next prime after p.

Original entry on oeis.org

1669, 2179, 4177, 4523, 4759, 5237, 6173, 6397, 6737, 7079, 7369, 7793, 8123, 8329, 9067, 11003, 11633, 11839, 12073, 12119, 13009, 13267, 16033, 16193, 16453, 16763, 16787, 17053, 17683, 17989, 18593, 18637, 19183, 19507, 20483, 22409, 22877, 23227
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Oct 23 2004

Keywords

Comments

Lower prime of a difference of 24 between consecutive primes.
23 successive numbers after prime number p are composite. - Artur Jasinski, Jan 15 2007

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[Prime[x + 1] - Prime[x] == 24, AppendTo[a, Prime[x]]], {x, 1, 10000}]; a (* Artur Jasinski, Jan 15 2007 *)

Extensions

Entry revised by N. J. A. Sloane, Feb 13 2007

A143206 Product of the n-th cousin prime pair.

Original entry on oeis.org

21, 77, 221, 437, 1517, 2021, 4757, 6557, 9797, 11021, 12317, 16637, 27221, 38021, 50621, 53357, 77837, 95477, 99221, 123197, 145157, 159197, 194477, 210677, 216221, 239117, 250997, 378221, 416021, 455621, 549077, 576077, 594437, 680621
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2008

Keywords

Comments

Intersection of A143203 and A001358.
Sum_{n>=2} 1/a(n) > 0.02187310784. - R. J. Mathar, Jan 23 2013

Examples

			a(1) = 3*7 = 3*(3+4) = 21;
a(2) = 7*11 = 7*(7+4) = 77;
a(3) = 13*17 = 13*(13+4) = 221;
a(4) = 19*23 = 19*(19+4) = 437.
		

Crossrefs

Programs

  • Haskell
    a143206 n = a143206_list !! (n-1)
    a143206_list = (3*7) : f a000040_list where
       f (p:ps@(p':_)) | p'-p == 4 = (p*p') : f ps
                       | otherwise = f ps
    -- Reinhard Zumkeller, Sep 13 2011
    
  • Magma
    [(p*(p+4)): p in PrimesUpTo(1000)| IsPrime(p+4)]; // Vincenzo Librandi, Jan 04 2018
    
  • Mathematica
    fQ[n_] := Block[{fi = FactorInteger@ n}, Last@# & /@ fi == {1, 1} && Differences[ First@# & /@ fi] == {4}]; Select[ Range@ 700000, fQ] (* Robert G. Wilson v, Feb 08 2012 *)
  • PARI
    lista(nn) = forprime(p=2, nn, if (isprime(q=p+4), print1(p*q, ", "))); \\ Michel Marcus, Jan 04 2018

Formula

a(n) = A023200(n)*A046132(n).

A160440 Smaller member of a pair (p,q) of cousin primes such that p and q are in different centuries.

Original entry on oeis.org

97, 397, 499, 1297, 1597, 1999, 2797, 3697, 4999, 6199, 6997, 7699, 9199, 10099, 10597, 12097, 13099, 16699, 18397, 20899, 21397, 21499, 21799, 23197, 23599, 25999, 26497, 27697, 27799, 27997, 32299, 32797, 33199, 34297, 35797, 38197, 38299, 39499, 42697
Offset: 1

Views

Author

Ki Punches, May 13 2009

Keywords

Comments

Sequence is probably infinite.
Dickson's conjecture implies there are infinitely many pairs of primes (100*k-3, 100*k+1) and infinitely many pairs of primes (100*k-1, 100*k+3). - Robert Israel, Mar 28 2023
It appears that every integer occurs as the difference round((a(n+1)-a(n))/100); all numbers 1..298 occur as these differences for a(n) < 1000000000. - Hartmut F. W. Hoft, May 18 2017

Examples

			Cousin primes 1597 and 1601 are in successive (that is 16th and 17th) centuries.
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0:
    for i from 1 while count < 100 do
      if ((i mod 3 = 1) and isprime(100*i-3) and isprime(100*i+1)) then
         R:= R, 100*i-3; count:= count+1
      elif ((i mod 3 = 2) and isprime(100*i-1) and isprime(100*i+3)) then
         R:= R, 100*i-1; count:= count+1
    fi od:
    R; # Robert Israel, Mar 28 2023
  • Mathematica
    a160440[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[100, n, 100]], First[#]-Last[#]==4&]]
    a160440[43000] (* data *) (* Hartmut F. W. Hoft, May 18 2017 *)

Formula

{A023200(n): [A023200(n)/100] <> [A046132(n)/100]}, where [..]=floor(..).

Extensions

Edited by R. J. Mathar, May 14 2009

A178071 Numbers k such that exactly one d, 2 <= d <= k/2, exists which divides binomial(k-d-1, d-1) and is not coprime to k.

Original entry on oeis.org

14, 16, 18, 22, 27, 28, 39, 55, 65, 77, 85, 221, 437, 1517, 2021, 4757, 6557, 9797, 11021, 12317, 16637, 27221, 38021, 50621, 53357, 77837, 95477, 99221, 123197, 145157, 159197, 194477, 210677, 216221, 239117, 250997, 378221, 416021, 455621, 549077, 576077
Offset: 1

Views

Author

Vladimir Shevelev, May 19 2010

Keywords

Comments

Note that every d > 1 divides binomial(k-d-1, d-1), if gcd(k,d)=1.
As shown in the Shevelev link, the sequence contains p*(p+4) for every p >= 7 in A023200. Thus it is infinite if A023200 is infinite. - Robert Israel, Feb 18 2016
Moreover, similar to proof of Theorem 1 in this link, one can prove that a number m > 85 is a member if and only if it has such a form. - Vladimir Shevelev, Feb 23 2016

Crossrefs

Programs

  • Maple
    filter:= proc(n) local d, b,count;
      count:= 0;
      b:= 1;
      for d from 2 to n/2 do
         b:= b * (n-2*d+1)*(n-2*d+2)/(n-d)/(d-1);
         if igcd(d,n) <> 1 and b mod d = 0 then
            count:= count+1;
            if count = 2 then return false fi;
         fi
      od;
      evalb(count=1);
    end proc:
    select(filter, [$1..10^4]); # Robert Israel, Feb 17 2016
  • Mathematica
    Select[Range@ 4000, Function[n, Count[Range[n/2], k_ /; And[! CoprimeQ[n, k], Divisible[Binomial[n - k - 1, k - 1], k]]] == 1]] (* Michael De Vlieger, Feb 17 2016 *)
  • PARI
    isok(n) = {my(nb = 0); for (d=2, n\2, if ((gcd(d, n) != 1) && ((binomial(n-d-1,d-1) % d) == 0), nb++); if (nb > 1, return (0));); nb == 1;} \\ Michel Marcus, Feb 17 2016

Formula

{k: A178101(k) = 1}.

Extensions

a(15)-a(23) from Michel Marcus, Feb 17 2016
a(24)-a(41) (from theorem in the Shevelev link) from Robert Price, May 14 2019

A015915 Numbers k such that sigma(k) + 8 = sigma(k+8).

Original entry on oeis.org

3, 5, 11, 23, 27, 29, 53, 59, 71, 89, 101, 131, 149, 173, 191, 233, 263, 269, 359, 389, 401, 431, 449, 479, 491, 563, 569, 593, 599, 653, 683, 701, 719, 743, 761, 821, 911, 929, 983, 1013, 1031, 1061, 1109, 1163, 1193, 1223, 1229, 1283, 1289
Offset: 1

Views

Author

Keywords

Comments

Different from A023202. Below 1000000 four composites were found [27, 1615, 1885, 218984] satisfying the "sigma(k) + 8 = sigma(k+8)" relation, together with more than 8000 primes. - Labos Elemer, May 23 2000

Examples

			sigma(27) + 8 = 48 = sigma(27+8), so 27 is in the sequence.
		

Crossrefs

Composite solutions are in A059118.

Programs

Previous Showing 21-30 of 154 results. Next