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

A066940 Numbers k such that gcd(prime(k+1) + 1, prime(k) + 1) = 2.

Original entry on oeis.org

2, 3, 5, 6, 7, 10, 11, 12, 13, 17, 18, 20, 21, 24, 25, 26, 28, 29, 30, 33, 35, 36, 37, 41, 42, 43, 44, 45, 49, 50, 52, 53, 57, 58, 59, 60, 61, 64, 65, 66, 67, 68, 69, 70, 73, 74, 77, 78, 79, 81, 82, 83, 84, 87, 88, 89, 98, 99, 100, 101, 104, 105, 106, 109, 110, 111, 112, 113
Offset: 1

Views

Author

Benoit Cloitre, Jan 24 2002

Keywords

Comments

Numbers k such that A063086(k) = 2. - Andrew Howroyd, Dec 10 2024

Crossrefs

Programs

  • Mathematica
    Select[ Range[120], GCD[ Prime[ # + 1] + 1, Prime[ # ] + 1] == 2 & ]
  • PARI
    isok(k) = { gcd(prime(k+1) + 1, prime(k) + 1) == 2 } \\ Harry J. Smith, Apr 09 2010

Extensions

Edited by Robert G. Wilson v, Feb 01 2002

A066941 Numbers k such that gcd(prime(k+1) + 1, prime(k) + 1) = 4.

Original entry on oeis.org

4, 8, 14, 19, 22, 27, 31, 38, 46, 47, 48, 63, 75, 85, 90, 93, 94, 95, 114, 117, 124, 131, 143, 149, 153, 154, 155, 163, 181, 192, 207, 213, 224, 229, 232, 235, 241, 242, 247, 248, 249, 261, 276, 285, 299, 303, 304, 314, 327, 328, 333, 334, 335, 348, 364, 370
Offset: 1

Views

Author

Benoit Cloitre, Jan 24 2002

Keywords

Comments

Numbers k such that A063086(k) = 4. - Andrew Howroyd, Dec 10 2024

Crossrefs

Programs

  • Mathematica
    Select[ Range[400], GCD[ Prime[ # + 1] + 1, Prime[ # ] + 1] == 4 & ]
  • PARI
    isok(k) = { gcd(prime(k+1) + 1, prime(k) + 1) == 4 } \\ Harry J. Smith, Apr 10 2010

Extensions

Edited by Robert G. Wilson v, Feb 01 2002

A066942 Numbers k such that gcd(prime(k+1) + 1, prime(k) + 1) = 6.

Original entry on oeis.org

9, 15, 16, 23, 32, 39, 40, 51, 54, 55, 56, 71, 76, 86, 96, 97, 102, 103, 107, 108, 118, 119, 123, 139, 160, 161, 164, 165, 170, 184, 185, 194, 195, 199, 200, 208, 218, 219, 227, 238, 245, 252, 255, 267, 290, 291, 292, 293, 298, 311, 312, 329, 342, 345, 349
Offset: 1

Views

Author

Benoit Cloitre, Jan 24 2002

Keywords

Comments

Numbers k such that A063086(k) = 6. - Andrew Howroyd, Dec 10 2024

Crossrefs

Programs

Extensions

Edited by Robert G. Wilson v, Feb 01 2002

A066944 Numbers k such that gcd(prime(k+1) + 1, prime(k) + 1) = 10.

Original entry on oeis.org

34, 80, 127, 145, 157, 175, 204, 222, 266, 289, 308, 316, 397, 442, 443, 518, 525, 578, 593, 656, 690, 746, 757, 773, 793, 832, 861, 866, 892, 908, 923, 949, 958, 971, 985, 1013, 1029, 1051, 1071, 1102, 1125, 1195, 1236, 1314, 1329, 1340, 1350, 1403, 1434
Offset: 1

Views

Author

Benoit Cloitre, Jan 24 2002

Keywords

Comments

Numbers k such that A063086(k) = 10. - Andrew Howroyd, Dec 10 2024

Crossrefs

Programs

  • Mathematica
    Select[ Range[1500], GCD[ Prime[ # + 1] + 1, Prime[ # ] + 1] == 10 & ]
    PrimePi/@Select[Partition[Prime[Range[1500]],2,1],GCD@@(#+1)==10&][[All,1]] (* Harvey P. Dale, May 05 2018 *)
  • PARI
    isok(k) = { gcd(prime(k+1) + 1, prime(k) + 1) == 10 } \\ Harry J. Smith, Apr 10 2010

Extensions

Edited by Robert G. Wilson v, Feb 01 2002

A067603 Least k such that gcd(prime(k)+1, prime(k+1)+1) = 2n.

Original entry on oeis.org

2, 4, 9, 72, 34, 91, 62, 478, 205, 2016, 522, 909, 1440, 5375, 2149, 6610, 7604, 2976, 5229, 7488, 11251, 7499, 8805, 20179, 18526, 70885, 28193, 40985, 33847, 17625, 27069, 77199, 66156, 90764, 26186, 141235, 70317, 856719, 110769, 50523, 217229
Offset: 1

Views

Author

Robert G. Wilson v, Jan 31 2002

Keywords

Comments

Since all consecutive primes, 2 < p < q, are odd, therefore gcd(p+1, q+1) must be even.

Examples

			a(1) = 2, the first entry in A066940,
a(2) = 4, the first entry in A066941,
a(3) = 9, the first entry in A066942,
a(4) = 72, the first entry in A066943,
a(5) = 34, the first entry in A066944.
That is to say that the first k-th prime that has gcd(prime(k+1)+1, prime(k)+1) of 2, 4, 6, 8, 10, ..., are k = 2, 4, 9, 72, 34, ..., and the prime_k = 3, 7, 23, 359, 139, 467, 293, ... (A067604).
If the floor of GCD is used, then a(0) equals 1.
		

Crossrefs

Programs

  • MATLAB
    P = primes(10^8);
    G = gcd(P(1:end-1)+1,P(2:end)+1);
    A = zeros(1,66);
    for n = 1:66
        A(n) = find(G == 2*n, 1, 'first');
    end
    A   % Robert Israel, Aug 16 2015
  • Mathematica
    t = 0*Range@ 70; p = 3; q = 5; While[p < 15*10^6, d = GCD[p + 1, q + 1]/2; If[ t[[d]] == 0, t[[d]] = PrimePi@ p]; p = q; q = NextPrime@ q]; t
  • PARI
    a(n) = p=2; q=3; k=1; while(gcd(p+1, q+1) != 2*n, k++; p=q; q = nextprime(p+1);); k; \\ Michel Marcus, Aug 16 2015
    
  • PARI
    a(n)=my(p=2,k=2*n,t); forprime(q=3,, t++; if((q-p)%k==0 && (p+1)%k==0, return(t)); p=q) \\ Charles R Greathouse IV, Aug 17 2015
    
  • PARI
    a(n)=my(k=2*n); forstep(p=k-1,oo,k, if(isprime(p) && (nextprime(p+1)-p)%k==0, return(primepi(p)))) \\ Charles R Greathouse IV, Aug 17 2015
    

Formula

Conjecture: a(n) = least k such that A001223(k) = 2n and A000040(k) == -1 (mod 2n). - Zak Seidov, Aug 16 2015

Extensions

Edited by Robert G. Wilson v, Aug 17 2015 at the direction of Zak Seidov

A067604 Smallest prime p of two consecutive primes, p < q, such that gcd(p+1, q+1) = 2n.

Original entry on oeis.org

3, 7, 23, 359, 139, 467, 293, 3391, 1259, 17519, 3739, 7079, 12011, 52639, 18869, 66239, 77383, 27143, 51071, 76039, 119447, 76163, 91033, 226943, 206699, 894451, 327347, 492911, 399793, 195599, 313409, 981823, 829883, 1169939, 302329
Offset: 1

Views

Author

Robert G. Wilson v, Jan 31 2002

Keywords

Comments

Since all consecutive primes, p < q and p greater than 2, are odd, therefore gcd(p+1, q+1) must be even.

Examples

			a(1) = 3, the 3rd prime being the first entry in A066940;
a(2) = 7, the 4th prime being the first entry in A066941;
a(3) = 23, the 9th prime being of the first entry in A066942;
a(4) = 359, the 72nd prime being the first entry in A066943;
a(5) = 139, the 34th prime being the first entry in A066944.
		

Crossrefs

Programs

  • Mathematica
    a = Table[0, {100}]; p = 3; q = 5; Do[q = Prime[n + 1]; d = GCD[p + 1, q + 1]/2; If[d < 101 && a[[d]] == 0, a[[d]] = n]; b = c, {n, 2, 10^7}]; Prime[a]
  • PARI
    a(n)=my(k=2*n); forstep(p=k-1,oo,k, if(isprime(p) && (nextprime(p+1)-p)%k==0, return(p))) \\ Charles R Greathouse IV, Aug 17 2015
Showing 1-6 of 6 results.