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

A029707 Numbers n such that the n-th and the (n+1)-st primes are twin primes.

Original entry on oeis.org

2, 3, 5, 7, 10, 13, 17, 20, 26, 28, 33, 35, 41, 43, 45, 49, 52, 57, 60, 64, 69, 81, 83, 89, 98, 104, 109, 113, 116, 120, 140, 142, 144, 148, 152, 171, 173, 176, 178, 182, 190, 201, 206, 209, 212, 215, 225, 230, 234, 236, 253, 256, 262, 265, 268, 277
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Numbers m such that prime(m)^2 == 1 mod (prime(m) + prime(m + 1)). - Zak Seidov, Sep 18 2013
First differences are A027833. The complement is A049579. - Gus Wiseman, Dec 03 2024

Crossrefs

Cf. A014574, A027833 (first differences), A007508. Equals PrimePi(A001359) (cf. A000720).
The complement is A049579, first differences A251092 except first term.
Lengths of runs of terms differing by 2 are A179067.
The first differences have run-lengths A373820 except first term.
A000040 lists the primes, differences A001223 (run-lengths A333254, A373821).
A038664 finds the first prime gap of 2n.
A046933 counts composite numbers between primes.
For prime runs: A005381, A006512, A025584, A067774.

Programs

  • Maple
    A029707 := proc(n)
        numtheory[pi](A001359(n)) ;
    end proc:
    seq(A029707(n),n=1..30); # R. J. Mathar, Feb 19 2017
  • Mathematica
    Select[ Range@300, PrimeQ[ Prime@# + 2] &] (* Robert G. Wilson v, Mar 11 2007 *)
    Flatten[Position[Flatten[Differences/@Partition[Prime[Range[100]],2,1]], 2]](* Harvey P. Dale, Jun 05 2014 *)
  • Sage
    def A029707(n) :
       a = [ ]
       for i in (1..n) :
          if (nth_prime(i+1)-nth_prime(i) == 2) :
             a.append(i)
       return(a)
    A029707(277) # Jani Melik, May 15 2014

Formula

a(n) = A107770(n) - 1. - Juri-Stepan Gerasimov, Dec 16 2009

A087641 Start of the first sequence of exactly n consecutive pairs of twin primes.

Original entry on oeis.org

29, 101, 5, 9419, 909287, 325267931, 678771479, 1107819732821, 170669145704411, 3324648277099157, 789795449254776509
Offset: 1

Views

Author

Hugo Pfoertner, Sep 15 2003

Keywords

Comments

Start of the smallest twin prime clusters of order n such that the following and preceding two primes must be neither twin primes between themselves nor with the ends of the string. - Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 22 2006
Sequences of n consecutive pairs of twin primes are called twin prime clusters of order n. Here (and in the sequences A035789, ..., A035795) it is requested that the order be exactly n, i.e., the preceding prime and the following prime must not be (upper resp. smaller) member of another twin prime pair. Note that a(3)=5 is preceded by 3 which is member of the twin prime pair (3,5) but not upper member of a preceding twin prime pair. Since it cannot happen elsewhere that P2=P3-2 if P3=P4-2 (using notations of A179067 and A035791), there is no condition imposed on P3-P2, and the condition on P2-P1 is also satisfied for P3=5. This sequence lists the starting prime of the cluster corresponding to the first occurrence of n in A179067. - M. F. Hasler, May 04 2015

Examples

			a(6)=325267931 is the starting point of the first occurrence of 6 consecutive pairs of twin primes: (325267931 325267933) (325267937 325267939) (325267949 325267951) (325267961 325267963) (325267979 325267981) (325267991 325267993).
		

Crossrefs

The sequence consists of the initial terms of A035789, A035790, A035791, A035792, A035793, A035794, A035795, A263205, A259034.

Extensions

Extended by Jud McCranie
a(8)-a(10) from Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 22 2006
a(11) found by Gabor Levai in October 2011 (see Rivera), added by Dmitry Kamenetsky, Dec 15 2018

A378620 Lesser prime index of twin primes with nonsquarefree mean.

Original entry on oeis.org

2, 5, 7, 17, 20, 28, 35, 41, 43, 45, 49, 52, 57, 64, 69, 81, 83, 98, 109, 120, 140, 144, 152, 171, 173, 176, 178, 182, 190, 206, 215, 225, 230, 236, 253, 256, 262, 277, 286, 294, 296, 302, 307, 315, 318, 323, 336, 346, 373, 377, 390, 395, 405, 428, 430, 444
Offset: 1

Views

Author

Gus Wiseman, Dec 10 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
This is a subset of A029707 (twin prime indices). The other twin primes are A068361, so A029707 is the disjoint union of A068361 and A378620.

Crossrefs

The lesser of twin primes is A001359, index A029707 (complement A049579).
The greater of twin primes is A006512, index A107770 (complement appears to be A168543).
A subset of A029707 (twin prime lesser indices).
Prime indices of the primes listed by A061368.
Indices of twin primes with squarefree mean are A068361.
A000040 lists the primes, differences A001223, (run-lengths A333254, A373821).
A005117 lists the squarefree numbers, differences A076259.
A006562 finds balanced primes.
A013929 lists the nonsquarefree numbers, differences A078147.
A014574 is the intersection of A006093 and A008864.
A038664 finds the first position of a prime gap of 2n.
A046933 counts composite numbers between primes.
A120327 gives the least nonsquarefree number >= n.

Programs

  • Mathematica
    Select[Range[100],Prime[#]+2==Prime[#+1]&&!SquareFreeQ[Prime[#]+1]&]
    PrimePi/@Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]]==2&&!SquareFreeQ[Mean[#]]&][[;;,1]] (* Harvey P. Dale, Jul 13 2025 *)

Formula

prime(a(n)) = A061368(n).

A130973 Number of primes between successive pairs of twin primes, for a(n) > 0.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 4, 2, 1, 3, 1, 2, 3, 10, 4, 7, 4, 3, 2, 1, 2, 18, 2, 2, 17, 1, 2, 6, 9, 3, 1, 1, 1, 8, 3, 2, 15, 1, 4, 1, 1, 7, 7, 4, 4, 3, 4, 1, 1, 7, 2, 5, 1, 5, 18, 2, 5, 4, 3, 1, 5, 1, 18, 12, 2, 8, 1, 4, 2, 5, 4, 1, 1, 1, 9, 10
Offset: 1

Views

Author

Omar E. Pol, Aug 23 2007

Keywords

Comments

a(k) corresponds to the k-th term in the isolated prime sequence A007510 or A134797. a(1) corresponds to 23. a(2) corresponds to 37. a(3) corresponds to 47 and 53. - Enrique Navarrete, Jan 28 2017
Lengths of the runs of consecutive integers in A176656. - R. J. Mathar, Feb 19 2017

Crossrefs

Cf. A001223, A007510 (isolated primes), A027883, A048614, A048198, A052011, A052012, A061273, A076777, A073784, A082602, A088700, A179067 (clusters of twin primes).
Showing 1-4 of 4 results.