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

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

A066943 Numbers k such that gcd(prime(k+1) + 1, prime(k) + 1) = 8.

Original entry on oeis.org

72, 92, 128, 132, 156, 166, 228, 246, 281, 282, 386, 417, 507, 519, 619, 620, 640, 641, 661, 712, 738, 739, 759, 801, 853, 898, 915, 1000, 1077, 1152, 1241, 1246, 1273, 1289, 1297, 1364, 1389, 1421, 1489, 1493, 1525, 1543, 1564, 1632, 1691, 1699, 1729
Offset: 1

Views

Author

Benoit Cloitre, Jan 24 2002

Keywords

Comments

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

Crossrefs

Programs

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

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

A305318 Numbers k such that A071866(k)=3.

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, 64, 65, 67, 69, 70, 73, 74, 78, 79, 81, 82, 83, 84, 87, 88, 89, 98, 99, 100, 104, 105, 109, 110, 111, 112, 113, 115, 116, 120, 121, 122, 125, 129, 130, 133
Offset: 1

Views

Author

Robert Israel, May 29 2018

Keywords

Comments

All terms are in A066940. The first member of A066940 not in this sequence is 61.

Crossrefs

Programs

  • Maple
    select(n -> nops(convert(ithprime(n+1)/ithprime(n),confrac))=3, [$1..1000]);
  • PARI
    isok(n) = length(contfrac(prime(n+1)/prime(n))) == 3; \\ Michel Marcus, May 31 2018

Formula

a(n) = A000720(A275697(n+1)). - Robert Israel, May 31 2018

A309772 Least common multiple of prime(n+1)+1 and prime(n)+1.

Original entry on oeis.org

12, 12, 24, 24, 84, 126, 180, 120, 120, 480, 608, 798, 924, 528, 432, 540, 1860, 2108, 1224, 2664, 2960, 1680, 1260, 4410, 4998, 5304, 2808, 5940, 6270, 7296, 4224, 3036, 9660, 2100, 11400, 12008, 12956, 6888, 4872, 5220, 16380, 17472, 18624, 19206, 19800, 10600
Offset: 1

Views

Author

Daniel Hoyt, Aug 16 2019

Keywords

Comments

a(n) = (prime(n)+1)*(prime(n+1)+1)/2 if n is in A066940. - Robert Israel, Aug 16 2019

Crossrefs

Cf. A008864, A063086 (gcd), A066940, A180617 (product).

Programs

  • Magma
    [Lcm(1+NthPrime(n),1+NthPrime(n+1)):n in [1..50]]; // Marius A. Burtea, Aug 16 2019
  • Maple
    P:= [seq(ithprime(i),i=1..100)]:
    seq(ilcm(P[i]+1,P[i+1]+1),i=1..99); # Robert Israel, Aug 16 2019
  • Mathematica
    Array[LCM[Prime[#] + 1, Prime[# + 1] + 1] &, 50] (* Amiram Eldar, Aug 16 2019 *)

Formula

a(n) = lcm(A008864(n+1), A008864(n)) = lcm(prime(n+1)+1, prime(n)+1).
Showing 1-8 of 8 results.