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 478 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

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} ] ] ] ]

A097492 a(n) = product of first n terms of A006512.

Original entry on oeis.org

5, 35, 455, 8645, 267995, 11523785, 702950885, 51315414605, 5285487704315, 576118159770335, 80080424208076565, 12092144055419561315, 2188678074030940598015, 422414868287971535416895
Offset: 1

Views

Author

Cino Hilliard, Aug 24 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Rest[FoldList[Times,1,Transpose[Select[Partition[Prime[Range[100]],2,1], Last[#]- First[#] == 2&]][[2]]]] (* Harvey P. Dale, Nov 02 2011 *)
  • PARI
    fu(n) = p=1;for(x=1,n,p*=twinu(x);print1(p",")) \The n-th upper twin prime twinu(n) = { local(c,x); c=0; x=1; while(c
    				

Extensions

Edited by Don Reble, Apr 16 2007

A139188 Greater twin prime member A006512 of the form k!/n + 1.

Original entry on oeis.org

7, 13, 241, 7, 7983361, 5
Offset: 1

Views

Author

Artur Jasinski, Apr 11 2008

Keywords

Comments

Given n, the sequence shows the smallest A006512(j) = a(n) of the form k!/n - 1.
The associated lower twin prime is A139187(n) = A001359(j) = a(n) - 2,
and the associated factorial index is k(n) = A139186(n).
a(7) is unknown, with k(7) > 25000. A continuation of the sequence, with unknown terms indicated by 0, is a(7)..a(50): 0, 453601, 0, 13, 0, 61, 0, 0, 2689, 0, 0, 0, 2688996956405760001, 7, 241, 0, 0, 31, 44960029111104307201, 0, 134401, 181, 0, 5, 0, 0, 0, 0, 1153, 100801, 0, 0, 536481792001, 19, 0, 0, 0, 141523201, 0, 1313375283986387731246850697141608641462272000000001, 0, 7561, 0, 8065829222532112711680001. - Hugo Pfoertner, Mar 30 2020

Crossrefs

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ ! (PrimeQ[(k! - n)/n] && PrimeQ[(k! + n)/n]), k++ ]; AppendTo[a, (k! + n)/n], {n, 1, 6}]; a

Formula

a(n) = A139187(n)+2 = A000142(A139186(n))/n+1 .

A218046 Primes p such that 8p + 2r is a primorial for some r in A006512.

Original entry on oeis.org

2, 11, 23, 83, 113, 131, 173, 191, 233, 239, 251, 263, 281, 293, 359, 419, 431, 449, 503, 641, 653, 659, 701, 719, 743, 761, 809, 821, 881, 911, 953, 1013, 1019, 1031, 1049, 1103, 1223, 1229, 1289, 1301, 1433, 1439, 1451, 1493, 1511, 1559, 1583, 1601, 1619
Offset: 1

Views

Author

Michael G. Kaarhus, Oct 19 2012

Keywords

Comments

The primes p in this sequence satisfy b#/2 = 4p + r, where p is a prime, b# is a primorial, and r is the second of the twin prime pair (r-2, r).
Each p is therefore associated with at least one primorial, and with a pair of twin primes.
The empirical evidence suggests that each twin prime pair is associated with at least one p, and each p with a twin prime pair. I conjecture that this sequence (and therefore the sequence of twin primes) is infinite.

Examples

			8*2   + 2*7 = 5#
8*11  + 2*61 = 7#
8*23  + 2*13 = 7#
8*83  + 2*823 = 11#
8*113 + 2*14563 = 13#
8*131 + 2*254731 = 17#
8*173 + 2*463 = 11#
8*191 + 2*14251 = 13#
8*233 + 2*14083 = 13#
8*239 + 2*199 = 11#
8*251 + 2*151 = 11#
8*263 + 2*103 = 11#
8*281 + 2*31 = 11#
8*293 + 2*307444891294244533 = 47#
8*359 + 2*253819 = 17#
		

Programs

  • PARI
    list(lim)={
        my(v=List(),P=3,q);
        forprime(p=5,lim,
            P*=p;
            forprime(t=2,min(lim, (P-2)\4),
                q=P-4*t;
                if(q%6==1 && ispseudoprime(q) && ispseudoprime(q-2), listput(v,t))
            )
        );
        vecsort(Vec(v),,8)
    }; \\ Charles R Greathouse IV, Oct 23 2012

Extensions

Terms corrected by Charles R Greathouse IV, Oct 23 2012

A339625 a(n) is the number of ways to write 6*n = p + q with p a lesser twin prime (A001359) and q a greater twin prime (A006512).

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 2, 4, 2, 3, 2, 4, 4, 3, 4, 0, 4, 2, 6, 5, 2, 4, 2, 5, 4, 4, 4, 6, 2, 6, 2, 4, 6, 5, 12, 3, 6, 2, 4, 8, 6, 8, 8, 2, 6, 3, 6, 10, 4, 13, 2, 6, 4, 4, 10, 4, 10, 4, 6, 3, 4, 6, 10, 5, 8, 1, 0, 6, 2, 12, 4, 6, 6, 2, 10, 3, 10, 6, 6, 7, 2, 8, 4, 6, 6, 0, 6, 6, 6, 9, 2, 6, 2, 5, 6, 4
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 10 2020

Keywords

Comments

If 6*n = p + q, then also 6*n = (p+2) + (q-2), with p+2 a greater and q-2 a lesser twin prime. Thus a(n) is odd if and only if n/2 is in A002822.

Examples

			a(4)=3 because 6*4 = 24 = 5 + 19 = 11 + 13 = 17 + 7 where (5,7), (11,13) and (17,19) are twin prime pairs.
		

Crossrefs

a(n)=0 for n in A243956.

Programs

  • Maple
    N:= 600: # for a(1)..a(floor(N/6)))
    P:= select(isprime, {seq(i,i=3..N,2)}):
    T1:= sort(convert(P intersect map(`-`,P,2),list)):
    T2:= map(`+`,T1,2):
    V:= Vector(N):
    nT:= nops(T1):
    for i from 1 to nT do
      for j from 1 to nT do
        v:= T1[i]+T2[j];
        if v > N then break fi;
        V[v]:= V[v]+1;
    od od:
    seq(V[6*i],i=1..N/6);

A339630 a(n) is the first number k such that there are exactly n ways to write 6*k = p + q with p a lesser twin prime (A001359) and q a greater twin prime (A006512), or 0 if there is no such k.

Original entry on oeis.org

1, 2, 3, 4, 8, 20, 19, 80, 40, 90, 48, 270, 35, 50, 117, 140, 110, 644, 215, 714, 222, 430, 345, 350, 315, 850, 390, 930, 620, 1110, 602, 1040, 385, 2290, 590, 780, 798, 910, 735, 990, 1020, 1700, 700, 770, 595, 1760, 950, 3380, 875, 5660, 1330, 1120, 975, 5970, 1085, 2990, 1400, 3980, 1815, 4570
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Dec 10 2020

Keywords

Comments

If n is odd, a(n)/2 (if nonzero) is in A002822.

Examples

			a(4) = 8 because 6*8 = 48 can be written as p+q in exactly 4 ways: 48 = 5 + 43 = 17 + 31 = 29 + 19 = 41 + 7, and no smaller number has this property.
		

Crossrefs

Programs

  • Maple
    # given list A339625
    T:= Array(0..max(A339625)):
    for n from 1 to nops(A339625) do
      if T[A339625[n]] = 0 then T[A339625[n]]:= n fi
    od:
    for k from 1 while T[k] <> 0 do od:
    seq(T[i],i=0..k-1);

Formula

A339625(a(n)) = n if a(n) > 0.

A079329 Let g(n)=A006512(n) be the larger member of the n-th pair of twin primes. Then a(n) is the average of g(n) and g(n+1).

Original entry on oeis.org

6, 10, 16, 25, 37, 52, 67, 88, 106, 124, 145, 166, 187, 196, 214, 235, 256, 277, 298, 331, 385, 427, 448, 493, 547, 586, 610, 631, 652, 736, 817, 826, 844, 871, 952, 1027, 1042, 1057, 1078, 1123, 1192, 1255, 1285, 1297, 1312, 1375, 1441, 1468, 1486, 1549
Offset: 1

Views

Author

Vincenzo Origlio (vincenzo.origlio(AT)itc.cnr.it), Feb 13 2003

Keywords

Crossrefs

Programs

  • Mathematica
    s=Select[Range[2000], PrimeQ[ # ]&&PrimeQ[ #-2]&];(Drop[s, 1]+Drop[s, -1])/2

Formula

a(n)=Sum_{x=n-th greater of twin primes..(n+1)th greater of twin primes}-(-1)^x*x - Juri-Stepan Gerasimov, Jul 14 2009

Extensions

Edited by Dean Hickerson, Feb 14 2003

A108170 Decimal expansion of the number 5.1413105308627310489... having continued fraction expansion 5, 7, 13, 19, 31, 43, 61, 73, 103, 109, 139, 151, 181, ... (greater of twin primes A006512).

Original entry on oeis.org

5, 1, 4, 1, 3, 1, 0, 5, 3, 0, 8, 6, 2, 7, 3, 1, 0, 4, 8, 9, 0, 6, 8, 0, 8, 9, 8, 6, 1, 2, 9, 1, 8, 2, 2, 3, 6, 9, 5, 5, 6, 6, 3, 2, 9, 5, 2, 0, 3, 1, 8, 3, 5, 0, 9, 9, 4, 7, 9, 8, 4, 0, 5, 2, 7, 3, 4, 1, 6, 1, 6, 2, 2, 0, 8, 6, 9, 1, 3, 1, 6, 8, 6, 8, 1, 4, 8, 4, 1, 7, 6, 7, 3, 1, 2, 2, 4, 0, 1, 9
Offset: 1

Views

Author

Artur Jasinski, Apr 20 2007

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[Prime[n] + 2], AppendTo[a, 2 + Prime[n]]], {n, 2, 500}]; RealDigits[N[FromContinuedFraction[a], 100]][[1]]

Extensions

a(99)-a(100) corrected by Sean A. Irvine, Jul 09 2023

A126194 Greater of twin primes (A006512) of the form p = k^2+s such that q = k^4+s is also a greater of twin primes, q > p.

Original entry on oeis.org

7, 19, 31, 43, 61, 73, 109, 139, 181, 193, 199, 229, 241, 271, 283, 313, 349, 421, 433, 463, 571, 601, 619, 643, 661, 811, 823, 829, 859, 883, 1021, 1051, 1063, 1093, 1153, 1231, 1279, 1291, 1303, 1321, 1429, 1453, 1483, 1489, 1609, 1621, 1669, 1699, 1723
Offset: 1

Views

Author

Tomas Xordan, Mar 07 2007

Keywords

Comments

p = q-k^4+k^2 where p and q are greater of twin primes and p < q.

Examples

			7 = 2^2+3 and 19 = 2^4+3; 7 and 19 are greater of twin primes;
31 = 4^2+15 and 271 = 4^4+15; 31 and 271 are greater of twin primes.
		

Crossrefs

Programs

  • PARI
    {m=42; v=[]; for(k=2, m, for(s=1, (m+1)^2-1, if((p=k^2+s)p&&isprime(q)&&isprime(q-2), v=concat(v,p)))); v=listsort(List(v), 1); for(j=1, #v, print1(v[j], ","))} /* Klaus Brockhaus, Mar 09 2007 */

Extensions

Edited and corrected by Klaus Brockhaus, Mar 09 2007
Showing 1-10 of 478 results. Next