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

A111739 Distance between k*(n-th prime) and next prime, k=7 case.

Original entry on oeis.org

3, 2, 2, 4, 2, 6, 8, 4, 2, 8, 6, 4, 6, 6, 2, 2, 6, 4, 10, 2, 10, 4, 6, 8, 4, 2, 6, 2, 6, 6, 18, 2, 8, 4, 6, 4, 4, 10, 2, 2, 6, 10, 24, 10, 2, 6, 4, 6, 8, 4, 6, 20, 6, 2, 2, 6, 6, 4, 10, 6, 6, 2, 4, 2, 12, 2, 16, 12, 8, 4, 2, 8, 10, 6, 4, 2, 6, 10, 12, 16, 6, 6, 2, 6, 6, 8, 20, 4, 2, 10, 2, 6, 4, 12, 6, 6, 8
Offset: 1

Views

Author

Zak Seidov, Nov 18 2005

Keywords

Comments

Other cases: k=1 A001223 Differences between consecutive primes, k=2 A059787, k=3 A114245, k=4 A114246, k=5 A114247, k=6 A114248, k=8 A111740, k=9 A111741, k=10 A111742.

Examples

			a(1)=3 because prime(1)=2 and 7*2+1=17 (prime).
		

Crossrefs

Programs

  • Mathematica
    dnp[n_]:=Module[{c=7*Prime[n]},NextPrime[c]-c]; Array[dnp,100] (* Harvey P. Dale, Jan 14 2022 *)

A111740 Distance between k*(n-th prime) and next prime, k=8 case.

Original entry on oeis.org

1, 5, 1, 3, 1, 3, 1, 5, 7, 1, 3, 11, 3, 3, 3, 7, 7, 3, 5, 1, 3, 9, 9, 7, 11, 1, 3, 1, 5, 3, 3, 1, 1, 5, 1, 5, 3, 3, 25, 15, 1, 3, 3, 5, 3, 5, 5, 3, 7, 15, 3, 1, 3, 3, 7, 7, 1, 11, 5, 3, 3, 3, 3, 15, 17, 3, 9, 3, 1, 5, 9, 7, 3, 15, 5, 3, 7, 5, 1, 27, 7, 3, 1, 3, 5, 3, 1, 3, 3, 5, 3, 1, 11, 1, 9, 3, 1, 9, 17
Offset: 1

Views

Author

Zak Seidov, Nov 18 2005

Keywords

Comments

Other cases: k=1 A001223 Differences between consecutive primes, k=2 A059787, k=3 A114245, k=4 A114246, k=5 A114247, k=6 A114248, k=7 A111739, k=9 A111741, k=10 A111742.

Examples

			a(1)=1 because prime(1)=2 and 8*2+1=17 (prime).
		

Crossrefs

A111741 Distance between k*(n-th prime) and next prime, k=9 case.

Original entry on oeis.org

1, 2, 2, 4, 2, 10, 4, 2, 4, 2, 2, 4, 4, 2, 8, 2, 10, 8, 4, 2, 2, 8, 4, 8, 4, 2, 2, 4, 2, 2, 8, 2, 4, 8, 20, 2, 10, 4, 8, 2, 2, 8, 2, 4, 4, 10, 2, 4, 10, 2, 2, 2, 10, 8, 20, 4, 2, 2, 10, 2, 2, 10, 4, 2, 2, 4, 20, 4, 14, 22, 4, 20, 4, 2, 2, 2, 10, 8, 4, 10, 8, 4, 2, 10, 16, 2, 8, 14, 4, 10, 8, 16, 8, 2, 2
Offset: 1

Views

Author

Zak Seidov, Nov 18 2005

Keywords

Comments

Other cases: k=1 A001223 Differences between consecutive primes, k=2 A059787, k=3 A114245, k=4 A114246, k=5 A114247, k=6 A114248, k=7 A111739, k=8 A111740, k=10 A111742.

Examples

			a(1)=1 because prime(1)=2 and 9*2+1=19 (prime).
		

Crossrefs

A111742 Distance between k*(n-th prime) and next prime, k=10 case.

Original entry on oeis.org

3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 1, 3, 9, 1, 9, 11, 3, 3, 3, 9, 3, 7, 9, 17, 1, 3, 1, 17, 1, 21, 7, 9, 3, 9, 3, 1, 1, 7, 23, 3, 11, 1, 3, 1, 3, 3, 1, 7, 3, 3, 3, 3, 1, 11, 9, 3, 3, 1, 7, 9, 3, 9, 9, 9, 7, 11, 3, 1, 21, 1, 3, 3, 1, 3, 3, 3, 17, 19, 3, 1, 11, 1, 17, 7, 1, 11, 3, 13, 11, 7, 3, 3, 1, 9, 3, 9, 9
Offset: 1

Views

Author

Zak Seidov, Nov 18 2005

Keywords

Comments

Other cases: k=1 A001223 Differences between consecutive primes, k=2 A059787, k=3 A114245, k=4 A114246, k=5 A114247, k=6 A114248, k=7 A111739, k=8 A111740, k=9 A111741.

Examples

			a(1)=3 because prime(1)=2 and 10*2+3=23 (prime).
		

Crossrefs

A111735 Distance between k*(n-th prime) and next prime, k=3 case.

Original entry on oeis.org

1, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 4, 2, 8, 4, 2, 8, 10, 10, 4, 2, 2, 2, 2, 4, 2, 10, 4, 8, 2, 4, 8, 2, 2, 4, 8, 2, 2, 2, 4, 4, 4, 8, 2, 2, 8, 4, 2, 4, 2, 2, 4, 4, 2, 8, 2, 8, 8, 10, 4, 2, 8, 4, 2, 2, 4, 2, 8, 2, 2, 10, 2, 4, 14, 2, 4, 2, 10, 2, 2, 14, 4, 2, 2, 32, 14, 2, 16, 10, 8, 2, 10, 8, 2, 2, 4, 4, 2, 4
Offset: 1

Views

Author

Zak Seidov, Nov 18 2005

Keywords

Comments

Other cases: k=1 A001223 Differences between consecutive primes, k=2 A059787, k=4 A111736, k=5 A111737, k=6 A111738, k=7 A111739, k=8 A111740, k=9 A111741, k=10 A111742.

Crossrefs

Programs

  • Mathematica
    NextPrime[3#]-3#&/@Prime[Range[100]] (* Harvey P. Dale, Mar 29 2018 *)

A111736 Distance between k*(n-th prime) and next prime, k=4 case.

Original entry on oeis.org

3, 1, 3, 1, 3, 1, 3, 3, 5, 11, 3, 1, 3, 1, 3, 11, 3, 7, 1, 9, 1, 1, 5, 3, 1, 5, 7, 3, 3, 5, 1, 17, 9, 1, 3, 3, 3, 1, 5, 9, 3, 3, 5, 1, 9, 1, 9, 15, 3, 3, 5, 11, 3, 5, 3, 9, 11, 3, 1, 5, 19, 9, 1, 5, 7, 9, 3, 13, 11, 3, 11, 3, 3, 1, 7, 11, 3, 9, 3, 1, 17, 9, 9, 1, 3, 5, 5, 3, 3, 9, 3, 15, 1, 9, 1, 5, 3, 3, 7
Offset: 1

Views

Author

Zak Seidov, Nov 18 2005

Keywords

Comments

Other cases: k=1 A001223 Differences between consecutive primes, k=2 A059787, k=3 A111735, k=5 A111737, k=6 A111738, k=7 A111739, k=8 A111740, k=9 A111741, k=10 A111742.

Examples

			a(1)=3 because prime(1)=2 and 4*2+3=11
(prime).
		

Crossrefs

Programs

  • Mathematica
    dbkn[n_]:=Module[{t=4*Prime[n]},NextPrime[t]-t]; Array[dbkn,100] (* Harvey P. Dale, Nov 12 2014 *)

A111737 Distance between k*(n-th prime) and next prime, k=5 case.

Original entry on oeis.org

1, 2, 4, 2, 4, 2, 4, 2, 12, 4, 2, 6, 6, 8, 4, 4, 12, 2, 2, 4, 2, 2, 4, 4, 2, 4, 6, 6, 2, 4, 6, 4, 6, 6, 6, 2, 2, 6, 4, 12, 12, 2, 12, 2, 6, 2, 6, 2, 16, 6, 6, 6, 8, 4, 4, 4, 16, 6, 14, 4, 8, 6, 8, 4, 2, 12, 2, 8, 6, 2, 12, 6, 12, 2, 6, 16, 4, 2, 6, 8, 4, 6, 6, 14, 8, 6, 6, 2, 4, 18, 4, 4, 2, 4, 8, 6, 4, 4, 2
Offset: 1

Views

Author

Zak Seidov, Nov 18 2005

Keywords

Comments

Other cases: k=1 A001223 Differences between consecutive primes, k=2 A059787, k=3 A111735, k=4 A111736, k=6 A111738, k=7 A111739, k=8 A111740, k=9 A111741, k=10 A111742.

Examples

			a(1)=1 because prime(1)=2 and 5*2+1=11
(prime).
		

Crossrefs

Programs

  • Mathematica
    NextPrime[#]-#&/@(5Prime[Range[100]]) (* Harvey P. Dale, Oct 21 2011 *)

A111738 Distance between k*(n-th prime) and next prime, k=6 case.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 13, 1, 5, 5, 1, 5, 5, 1, 13, 5, 1, 7, 5, 1, 5, 1, 7, 5, 1, 1, 1, 5, 5, 7, 1, 1, 5, 13, 1, 5, 5, 7, 1, 13, 1, 5, 5, 5, 7, 11, 23, 5, 7, 1, 5, 1, 5, 1, 1, 5, 1, 1, 7, 1, 1, 5, 1, 1, 5, 1, 5, 1, 5, 11, 7, 1, 1, 7, 11, 5, 1, 5, 5, 7, 5, 5, 11, 13, 1, 5, 7, 1, 11, 1, 5, 5, 7, 5, 1, 7, 11, 25
Offset: 1

Views

Author

Zak Seidov, Nov 18 2005

Keywords

Comments

Other cases: k=1 A001223 Differences between consecutive primes, k=2 A059787, k=3 A111735, k=4 A111736, k=5 A111737, k=7 A111739, k=8 A111740, k=9 A111741, k=10 A111742.

Examples

			a(1)=1 because prime(1)=2 and 6*2+1=13
(prime).
		

Crossrefs

A060271 Difference between smallest prime following and largest prime preceding 2*(n-th prime).

Original entry on oeis.org

2, 2, 4, 4, 4, 6, 6, 4, 4, 6, 6, 6, 4, 6, 8, 4, 14, 14, 6, 10, 10, 6, 4, 6, 4, 12, 12, 12, 12, 4, 6, 6, 6, 4, 14, 14, 4, 14, 6, 10, 6, 8, 4, 6, 8, 4, 10, 6, 8, 4, 4, 12, 8, 4, 12, 18, 18, 6, 10, 6, 6, 10, 4, 12, 12, 10, 12, 4, 10, 10, 8, 10, 6, 8, 4, 8, 14, 10, 12, 10, 10, 14, 4, 14, 4, 4, 20, 8
Offset: 1

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Examples

			For n = 1: prime(1) = 2, 2*prime(1) = 4 is between 3 and 5, their difference is 2 = a(1).
For n = 6: prime(6) = 13, 2*prime(6) = 26 is between 23 and 29 and their difference is 6 = a(6).
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nextprime(2*ithprime(j))-prevprime(2*ithprime(j)),j=1...256)];
  • Mathematica
    dsplp[n_]:=Module[{np=2Prime[n]},NextPrime[np]-NextPrime[np,-1]]; Array[ dsplp,90] (* Harvey P. Dale, Mar 20 2013 *)
  • PARI
    a(n) = {my(m = 2*prime(n)); nextprime(m+1) - precprime(m-1);} \\ Amiram Eldar, Feb 08 2025

Extensions

Offset changed to 1 and a(1) prepended by Amiram Eldar, Feb 08 2025

A074973 Smallest index i such that next_prime( 2*prime(i) ) - 2*prime(i) = 2n - 1.

Original entry on oeis.org

1, 4, 11, 20, 17, 67, 104, 56, 125, 165, 182, 316, 236, 359, 407, 1254, 667, 836, 1521, 1210, 1966, 3197, 1520, 2294, 2279, 2046, 5410, 5472, 1965, 6702, 13947, 10138, 12122, 16760, 7659, 22325, 16784, 13072, 36169, 17852, 15414, 69872, 23814, 16370, 46752
Offset: 1

Views

Author

Zak Seidov, Oct 06 2002

Keywords

Comments

First index i such that NextPrime[p2=2*Prime[i]]-p2 is 2n-1; case n=1 corresponds to Sophie Germain (SG) primes, others may be called SG n-primes. Distance between 2*(n-th prime) and next prime in A059787.

Examples

			a(54) = 342337 because difference between 2*p(342337) and next prime is 2*54 -1 = 107 and 342337 is the smallest such index.
		

Crossrefs

Cf. A059787.

Programs

  • Magma
    S:=[];
    i:=1;
    for n in [1..45] do
       while not NextPrime(2*NthPrime(i))-2*NthPrime(i) eq 2*n-1 do
            i:=i+1;
       end while;
       Append(~S, i);
       i:=1;
    end for;
    S;  // Bruno Berselli, Oct 03 2013
  • Maple
    N:= 60: # for a(1) .. a(N)
    V:= Vector(N): count:= 0:
    p:= 1:
    for i from 1 while count < N do
      p:= nextprime(p);
      v:= (nextprime(2*p)-2*p+1)/2;
      if v <= N and V[v] = 0 then V[v]:= i; count:= count+1;  fi;
    od:
    convert(V,list); # Robert Israel, May 03 2025
  • PARI
    a(n) = {i = 1; while (nextprime(p2=2*prime(i)) - p2 != 2*n-1, i++); i;} \\ Michel Marcus, Oct 03 2013
    

Extensions

a(44)-a(45) from Bruno Berselli, Oct 03 2013
Showing 1-10 of 10 results.