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 900 results. Next

A171727 The number of twin prime pairs in the interval (p^2,p*q), where (p,q) runs over the twin prime pairs (A001359(n),A006512(n)).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 1, 3, 2, 2, 4, 7, 3, 3, 5, 7, 4, 4, 7, 6, 11, 9, 5, 11, 9, 9, 11, 10, 11, 9, 11, 11, 12, 11, 12, 18, 12, 12, 16, 11, 16, 20, 14, 16, 15, 20, 16, 22, 13, 22, 16, 17, 21, 20, 20, 23, 22, 23, 20, 21, 21, 26, 20, 28, 24, 24, 23, 24, 25, 21, 24, 37, 27, 21, 28, 24, 31
Offset: 1

Views

Author

Jaspal Singh Cheema, Dec 16 2009

Keywords

Comments

If you graph the order of the twin primes along the x-axis (i.e., first twin, second, third, ...) and the number of twins in the sequence given above along the y-axis, a clear pattern emerges. As you go farther along the x-axis, the number of twin primes, on average, within the interval increases. The pattern appears to be nonlinear. If one could prove that there's at least one twin prime within each interval, the twin prime conjecture would be proved since the n-th twin produces larger intervals with more twin primes. The evidence seems overwhelming.

Examples

			The first twin prime pair (3,5) corresponds to the interval (9,15), which contains one twin prime pair (11,13), so a(1) = 1.
The fifth twin prime pair (29,31) corresponds to the interval (841,899), which contains the twin prime pairs (857,859) and (881,883), so a(5) = 2.
		

References

  • C. C. Clawson, Mathematical Mysteries: The Beauty and Magic of Numbers, Perseus Books, 1999.
  • J. Derbyshire, Prime Obsession: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics, Penguin Books Canada Ltd., 2004.
  • M. du Sautoy, The Music of the Primes: Searching to Solve the Greatest Mystery in Mathematics, HarperCollins Publishers Inc., 2004.

Crossrefs

Programs

  • PARI
    {for(k=1, 300, if(prime(k+1)-prime(k)==2, my(c=0); forprime(m=prime(k)^2, prime(k)*prime(k+1), c+=isprime(m+2)); print1(c, ", ")))} \\ Zhandos Mambetaliyev, Mar 28 2021

Extensions

Partially edited by Michel Marcus, Mar 19 2013
Edited by Charlie Neder, Feb 12 2019

A182483 a(n) is the least m such that A182482(m) = A001359(n), the n-th twin prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 4, 17, 9, 23, 25, 15, 8, 11, 19, 20, 45, 47, 13, 29, 14, 24, 77, 87, 95, 50, 103, 107, 22, 27, 137, 46, 143, 21, 34, 43, 175, 59, 91, 48, 41, 71, 215, 31, 44, 119, 121, 247, 62, 67, 54, 139, 283, 287, 149, 39, 313, 161, 65, 37, 169, 347, 116
Offset: 2

Views

Author

Vladimir Shevelev, May 01 2012

Keywords

Comments

a(n) exists for every n>=2.

Crossrefs

Programs

  • Mathematica
    t = Table[k = 0; While[p = 6*k*n - 1; ! (PrimeQ[p] && PrimeQ[p + 2]), k++]; p, {n, 1000}]; tp = Select[Prime[Range[1000]], PrimeQ[# + 2] &]; t2 = {}; found = True; n = 2; While[found, pos = Position[t, tp[[n]], 1, 1]; If[pos == {}, found = False, AppendTo[t2, pos[[1, 1]]]; n++]]; t2 (* T. D. Noe, May 02 2012 *)

A242917 Positions of smaller of twin primes in A001359 with index 4.

Original entry on oeis.org

7, 16, 20, 28, 30, 34, 35, 40, 49, 69, 74, 84, 89, 101, 105, 108, 133, 134, 142, 148, 154, 159, 169, 176, 182, 185, 194, 202, 213, 215, 220, 221, 225, 232, 235, 238, 251, 256, 261, 303, 310, 311, 314, 322, 323, 329, 330, 342, 343, 353, 354, 360, 382, 396, 398
Offset: 1

Views

Author

Vladimir Shevelev, May 26 2014

Keywords

Comments

For the definition of the index of a twin prime pair, see the comment in A242767.

Crossrefs

Programs

Extensions

More terms from Peter J. C. Moses, May 26 2014

A292691 a(n) = C(A001359(n)), n >= 1, with C(n) = (4*((n-1)! + 1) + n)/(n*(n+2)) for n >= 2.

Original entry on oeis.org

1, 3, 101505, 259105757127, 1356566605613854774200240267, 1851197466245939272480116323530608949000567215
Offset: 1

Views

Author

Jaime Gómez, Sep 20 2017

Keywords

Comments

Clement's criterion for twin primes is, for integers with n >= 2: n and n + 2 are both primes if and only if 4*((n-1)! + 1) + n == 0 (mod n*(n+2)). See the Clement and Ribenboim links. Like the criteron for primality using Theorem 81 of Hardy and Wright, p. 69, it "is of course quite useless as a practical test".
a(n) is an integer because of the necessary part of this twin prime criterion.
Thanks to Wolfdieter Lang for comments and helpful advice.

Examples

			a(2) = 3, because A001359(2) = 5 and C(5) = (4*(4! + 1) + 5)/(5*7) = 3.
a(2) = 3 because A014574(2) = 6 and delta(6) = (4*4! + 6 + 3)/35 = 3.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford Science Publications, 1979.
  • P. Ribenboim, The New Book of Prime Number Records, Springer-Verlag NY 1996, pp. 259-260 (a proof of Clement's theorem).

Crossrefs

Programs

  • Mathematica
    p1[1] = 3; p1[n_] := p1[n] = (p = NextPrime[p1[n-1]]; While[!PrimeQ[p + 2], p = NextPrime[p]]; p);
    a[n_] := (4*((p1[n] - 1)! + 1) + p1[n])/(p1[n]*(p1[n] + 2));
    Array[a, 6] (* Jean-François Alcover, Nov 04 2017 *)
  • PARI
    c(n) = (4*(n - 2)! + n + 3) / (n^2 - 1);
    lista(nn) = forprime(p=2, nn, if (isprime(p+2), print1(c(p+1), ", "));); \\ Michel Marcus, Sep 21 2017
  • Python
    # Python version 2.7
    import math
    from sympy import *
    list = []
    n = 3
    l = 1   # parameter that indicates the desired length of the list
    x = 1
    while x <= l:
           y = (4*factorial(n-2))+n+3
           z = n**2 - 1
           if y % z == 0:
                  print (y/z)
                  list.append(y/z)
           n+=1
           x+=1
    

Formula

a(n) = (4*((p1(n)-1)! + 1) + p1(n))/(p1(n)*(p1(n) + 2)) with p1(n) = A001359(n), for n >= 1. See the name.
From Wilson's theorem (see Hardy and Wright, Theorem 80, p. 68), a(n) = (4*kp1(n) + 1)/(p1(n) + 2) with p1(n) = A000359(n) and kp1(n) = A007619(p1(n)).
a(n) = delta(A014574(n)) with delta(n) = (4*(n-2)!+ n + 3)/(n^2 - 1).
delta(n) ~ ((4*(n-2)^(n - 2)* sqrt(2*Pi*(n - 2))) / (e^(n - 2)*(n^2 - 1)))+((n + 3) / (n^2 - 1)) for large n-values (using Stirling's approximation for n!).

Extensions

Edited by Wolfdieter Lang, Oct 25 2017

A342714 Decimal expansion of infinite sum of reciprocals of lesser twin primes, Sum_{n>=1} 1/A001359(n).

Original entry on oeis.org

1, 0, 5, 9, 0, 6, 4, 2, 6
Offset: 1

Views

Author

Artur Jasinski, Mar 19 2021

Keywords

Comments

Alternative definition: infinite sum of reciprocals of primes whose distance to the next prime is equal to 2.
R. J. Mathar gave an estimate of 1.059064 for this constant in a comment at A209328. Dimitris Valianatos estimated the constant as 1.059064266555685... in a comment at A306539.

Examples

			Equals 1.05906426...
		

Crossrefs

Formula

Equals 1/3 + 1/5 + 1/11 + 1/17 + 1/29 + 1/41 + 1/59 + ...
Equals (A065421 + A306539)/2.

A350246 a(n) is the minimum positive integer k such that the concatenation of k, a(n-1), a(n-2), ..., a(2), and a(1) is the lesser of a pair of twin primes (i.e., a term of A001359), with a(1) = 11.

Original entry on oeis.org

11, 3, 18, 15, 42, 189, 306, 369, 6, 1176, 93, 963, 2202, 750, 408, 498, 267, 1875, 240, 2751, 798, 1929, 3402, 6162, 6195, 4953, 5004, 8130, 18591, 20019, 4461, 1851, 46866, 29232, 7206, 24807, 4644, 23307, 48528, 21594, 28236, 4353, 28212, 3003, 22611, 50760
Offset: 1

Views

Author

Keywords

Comments

First observed by J. A. Hervás Contreras (see the links).
Every term (from the second on) is a multiple of 3.

Examples

			11, 311, 18311, 1518311, and 421518311 are terms of A001359.
		

Crossrefs

Cf. A001359.

Programs

  • Maple
    terms := proc(n)
       local i, j, p, q, L, M:
       i, L, M := 0, [11], [11]:
       while numelems(L) < n do
          i, j := i+1, 0:
          while 1 > 0 do
             j, p := j+1, M[numelems(M)]:
             q := parse(cat(j, p)):
             if isprime(q) and isprime(q+2) then
                L, M := [op(L), j], [op(M), q]:
                break: fi: od: od:
       L: end:
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A350246_gen(): # generator of terms
        yield 11
        s = '11'
        while True:
            for k in count(3,3):
                t = str(k)
                m = int(t+s)
                if isprime(m) and isprime(m+2):
                    yield k
                    break
            s = t+s
    A350246_list = list(islice(A350246_gen(),20)) # Chai Wah Wu, Jan 12 2022

A359640 a(n) is the least odd prime not in A001359 such that all subsequent composites in the gap up to the next prime have exactly n odd prime factors, counted with multiplicity.

Original entry on oeis.org

307, 1999, 101527, 7146697, 272572999, 4809363523
Offset: 2

Views

Author

Hugo Pfoertner, Jan 16 2023

Keywords

Examples

			a(2) = 307: 308 = 2^2*7*11, 309 = 3*103, 310 = 2*5*31, all have exactly 2 odd prime factors.
		

Crossrefs

Programs

  • PARI
    a087436(n) = bigomega (n >> valuation (n, 2));
    a359640(maxp) = {my(k=2, pp=5); forprime (p=7, maxp, my(mi=oo, ma=0); if (p-pp>2, for (j=pp+1, p-1, my(mo=a087436(j)); if (mo
    				

A064409 Positive even numbers not of the form A001359(i) + A006512(j) for integers i and j.

Original entry on oeis.org

2, 4, 6, 14, 20, 26, 28, 32, 38, 40, 44, 50, 52, 56, 58, 62, 68, 70, 74, 80, 82, 86, 88, 92, 94, 96, 98, 100, 104, 110, 116, 118, 122, 124, 128, 130, 134, 136, 140, 146, 148, 152, 158, 160, 164, 166, 170, 172, 176, 178, 182, 188, 190, 194, 200
Offset: 1

Views

Author

Robert G. Wilson v, Sep 29 2001

Keywords

Comments

This is different from A007534, which gives positive even numbers which are not the same of a pair of twin primes. The old definition of the present sequence was misleading. - N. J. A. Sloane, Feb 16 2024

Examples

			The lesser of the twin primes < 200 are 3, 5, 11, 17, 29, 41, 59, 71, 101, 107, 137, 149, 179, 191, 197 and the greater of the twin primes < 200 are 5, 7, 13, 19, 31, 43, 61, 73, 103, 109, 139, 151, 181, 193, 199. 20 is in the current sequence because no combination of any two numbers from each set just enumerated can be summed to make 20.
		

Crossrefs

Programs

  • Mathematica
    p = Select[ Range[ 200 ], PrimeQ[ # ] && PrimeQ[ # + 2 ] & ]; q = p + 2; Complement[ Table[ n, {n, 2, 200, 2} ], Union[ Flatten[ Table[ p[ [ i ] ] + q[ [ j ] ], {i, 1, 15}, {j, 1, 15} ] ] ] ]

A099728 Least number B such that (A001359(n) - B^2)^2 - B is also the lesser of larger twin primes, or 0 if no such B exists.

Original entry on oeis.org

380, 14, 5, 5, 365, 8, 5, 5, 14, 20, 5, 20, 8, 65, 8, 95, 35, 8, 14, 65, 20, 65, 8, 17, 350, 188, 5, 104, 98, 68, 35, 17, 158, 35, 92, 50, 62, 5, 26, 8, 8, 68, 233, 110, 5, 50, 23, 23, 8, 65, 59, 35, 14, 23, 35, 20, 47, 140, 5, 50, 14, 5, 44, 125, 386, 713, 23, 59, 44, 635, 98
Offset: 1

Views

Author

Ray G. Opao, Nov 07 2004

Keywords

Comments

Conjecture: No term is zero.

Examples

			a(3) = 5 since A001359(3) = 11, 11 and 13 are twin primes, (11 - 5^2)^2 - 5 = 191, and 191 and 193 are also twin primes.
		

Crossrefs

Programs

  • Maple
    a135 := [] : f := fopen("b001359.txt",READ) : while nops(a135) < 200 do l := fscanf(f,"%d %d") : if l = [] then break : else a135 := [op(a135),l[2]] : fi ; od : for n from 1 to nops(a135) do a := op(n,a135) : B := 0 : while true do srch := (a-B^2)^2-B ; if isprime(srch) and isprime(srch+2) and srch > a then printf("%d, ",B) ; break ; fi ; B := B+1 : od : od: # R. J. Mathar, Aug 06 2007
  • Mathematica
    f[p_] := Module[{b = 1}, While[(pb = (p - b^2)^2 - b) <= p || ! And @@ PrimeQ[pb + {0, 2}], b++]; b]; seq = {}; Do[If[And @@ PrimeQ[p + {0, 2}], AppendTo[seq, f[p]]], {p, 2, 3000}]; seq (* Amiram Eldar, Dec 30 2019 *)

Extensions

Corrected and extended by R. J. Mathar, Aug 06 2007
Data corrected by Amiram Eldar, Dec 30 2019

A099742 Least number B such that (A001359(n)-B^2)^2+B is also the lesser of larger twin primes, or 0 if no such B exists.

Original entry on oeis.org

1, 1, 1, 7, 412, 7, 7, 133, 7, 7, 316, 7, 25, 10, 10, 10, 7, 7, 16, 10, 7, 25, 1, 7, 7, 100, 55, 7, 28, 940, 37, 148, 22, 16, 28, 67, 31, 82, 64, 4, 82, 445, 292, 310, 16, 1687, 13, 37, 43, 7, 58, 22, 31, 97, 70, 7, 22, 1, 19, 52, 58, 25, 1, 367, 4, 7, 4, 37, 55
Offset: 1

Views

Author

Ray G. Opao, Nov 09 2004

Keywords

Comments

Conjecture: No term is zero.

Examples

			a(3) = 1 since A001359(3) = 11, 11 & 13 are twin primes, (11 - 1^2)^2 + 1 = 101, and 101 & 103 are also twin primes.
		

Crossrefs

Programs

  • Mathematica
    f[p_] := Module[{b = 1}, While[(pb = (p - b^2)^2 + b) <= p || ! And @@ PrimeQ[pb + {0, 2}], b++]; b]; seq = {}; Do[If[And @@ PrimeQ[p + {0, 2}], AppendTo[seq, f[p]]], {p, 2, 3000}]; seq (* Amiram Eldar, Dec 30 2019 *)

Extensions

More terms from Amiram Eldar, Dec 30 2019
Previous Showing 21-30 of 900 results. Next