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

A037074 Numbers that are the product of a pair of twin primes.

Original entry on oeis.org

15, 35, 143, 323, 899, 1763, 3599, 5183, 10403, 11663, 19043, 22499, 32399, 36863, 39203, 51983, 57599, 72899, 79523, 97343, 121103, 176399, 186623, 213443, 272483, 324899, 359999, 381923, 412163, 435599, 656099, 675683, 685583, 736163
Offset: 1

Views

Author

Keywords

Comments

Each entry is the product of p and p+2 where both p and p+2 are prime, i.e., the product of the lesser and greater of a twin prime pair.
Except for the first term, all entries have digital root 8. - Lekraj Beedassy, Jun 11 2004
The above statement follows from p > 3 => (p,p+2) = (6k-1,6k+1) => p*(p+2) = 36k^2 - 1 == 8 (mod 9), and A010888 === A010878 (mod 9). - M. F. Hasler, Jan 11 2013
Albert A. Mullin states that m is a product of twin primes iff phi(m)*sigma(m) = (m-3)*(m+1), where phi(m) = A000010(m) and sigma(m) = A000203(m). Of course, for a product of distinct primes p*q we know sigma(p*q) = (p+1)*(q+1) and if p, q, are twin primes, say q = p + 2, then sigma(p*q) = (p+1)*(q+1) = (p+1)*(p+3). - Jonathan Vos Post, Feb 21 2006
Also the area of twin prime rectangles. A twin prime rectangle is a rectangle whose sides are components of twin prime pairs. E.g., the twin prime pair (3,5) produces a 3 X 5 unit rectangle which has area 15 square units. - Cino Hilliard, Jul 28 2006
Except for 15, a product of twin primes is of the form 36k^2 - 1 (cf. A136017, A002822). - Artur Jasinski, Dec 12 2007
A072965(a(n)) = 1; A072965(m) mod A037074(n) > 0 for all m. - Reinhard Zumkeller, Jan 29 2008
The number of terms less than 10^(2n) is A007508(n). - Robert G. Wilson v, Feb 08 2012
If m is the product of twin primes, then sigma(m) = m + 1 + 2*sqrt(m + 1), phi(m) = m + 1 - 2*sqrt(m + 1). pmin(m) = sqrt(m + 1) - 1, pmax(m) = sqrt(m + 1) + 1. - Wesley Ivan Hurt, Jan 06 2013
Semiprimes of the form 4*k^2 - 1. - Vincenzo Librandi, Apr 13 2013

Examples

			a(2)=35 because 5*7=35, that is (5,7) is the 2nd pair of twin primes.
		

References

  • Albert A. Mullin, "Bicomposites, twin primes and arithmetic progression", Abstract 04T-11-48, Abstracts of AMS, Vol. 25, No. 4, 2004, p. 795.

Crossrefs

Cf. A000010, A000203, A001359, A006512, A014574, A136017, A074480 (multiplicative closure), A209328.
Cf. A071700 (subsequence).
Cf. A075369.

Programs

  • Haskell
    a037074 = subtract 1 . a075369  -- Reinhard Zumkeller, Feb 10 2015
    -- Reinhard Zumkeller, Feb 10 2015, Aug 14 2011
  • Magma
    [p*(p+2): p in PrimesUpTo(1000) | IsPrime(p+2)];  // Bruno Berselli, Jul 08 2011
    
  • Magma
    IsSemiprime:=func; [s: n in [1..500] | IsSemiprime(s) where s is 4*n^2-1]; // Vincenzo Librandi, Apr 13 2013
    
  • Maple
    ZL:=[]: for p from 1 to 863 do if (isprime(p) and isprime(p+2) ) then ZL:=[op(ZL),(p*(p+2))]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
    for i from 1 to 150 do if ithprime(i+1) = ithprime(i) + 2 then print({ithprime(i)*ithprime(i+1)}); fi; od; # Zerinvary Lajos, Mar 19 2007
  • Mathematica
    s = Select[ Prime@ Range@170, PrimeQ[ # + 2] &]; s(s + 2) (* Robert G. Wilson v, Feb 21 2006 *)
    (* For checking large numbers, the following code is better. For instance, we could use the fQ function to determine that 229031718473564142083 is in this sequence. *) fQ[n_] := Block[{fi = FactorInteger[n]}, Last@# & /@ fi == {1, 1} && Differences[ First@# & /@ fi] == {2}]; Select[ Range[750000], fQ] (* Robert G. Wilson v, Feb 08 2012 *)
    Times@@@Select[Partition[Prime[Range[500]],2,1],Last[#]-First[#]==2&] (* Harvey P. Dale, Oct 16 2012 *)
  • PARI
    g(n) = for(x=1,n,if(prime(x+1)-prime(x)==2,print1(prime(x)*prime(x+1)","))) \\ Cino Hilliard, Jul 28 2006
    

Formula

a(n) = A001359(n)*A006512(n). A000010(a(n))*A000203(a(n)) = (a(n)-3)*(a(n)+1). - Jonathan Vos Post, Feb 21 2006
a(n) = (A014574(n))^2 - 1. a(n+1) = (6*A002822(n))^2 - 1. - Lekraj Beedassy, Sep 02 2006
a(n) = A075369(n) - 1. - Reinhard Zumkeller, Feb 10 2015
Sum_{n>=1} 1/a(n) = A209328. - Amiram Eldar, Nov 20 2020
A000010(a(n)) == 0 (mod 8). - Darío Clavijo, Oct 26 2022

Extensions

More terms from Erich Friedman

A167053 a(1)=3; for n > 1, a(n) = 1 + a(n-1) + gcd( a(n-1)*(a(n-1)+2), A073829(a(n-1)) ).

Original entry on oeis.org

3, 19, 39, 81, 165, 333, 335, 673, 1347, 1349, 1351, 1353, 1355, 1357, 1359, 2721, 2723, 2725, 2727, 5457, 5459, 5461, 5463, 5465, 5467, 5469, 10941, 10943, 10945, 10947, 21897, 21899, 21901, 21903, 21905, 21907, 21909, 43821, 43823, 43825, 43827, 43829, 43831
Offset: 1

Views

Author

Vladimir Shevelev, Oct 27 2009

Keywords

Comments

The first differences are 16, 20, 42, etc. They are either 2 or in A075369 or in A008864, see A167054.
A proof follows from Clement's criterion of twin primes.

Examples

			a(2) = 1 + 3 + gcd(3*5, 4*(2! + 1) + 3) = 19.
		

References

  • E. Trost, Primzahlen, Birkhäuser-Verlag, 1953, pages 30-31.

Crossrefs

Programs

  • Maple
    A073829 := proc(n) n+4*((n-1)!+1) ; end proc:
    A167053 := proc(n) option remember ; local aprev; if n = 1 then 3; else aprev := procname(n-1) ; 1+aprev+gcd(aprev*(aprev+2),A073829(aprev)) ; end if; end proc:
    seq(A167053(n),n=1..60) ; # R. J. Mathar, Dec 17 2009
  • Mathematica
    A073829[n_] := 4((n-1)! + 1) + n;
    a[1] = 3;
    a[n_] := a[n] = 1 + a[n-1] + GCD[a[n-1] (a[n-1] + 2), A073829[a[n-1]]];
    Array[a, 60] (* Jean-François Alcover, Mar 25 2020 *)

Extensions

Definition shortened and values from a(4) on replaced by R. J. Mathar, Dec 17 2009

A120875 Product of twin primes minus 1.

Original entry on oeis.org

14, 34, 142, 322, 898, 1762, 3598, 5182, 10402, 11662, 19042, 22498, 32398, 36862, 39202, 51982, 57598, 72898, 79522, 97342, 121102, 176398, 186622, 213442, 272482, 324898, 359998, 381922, 412162, 435598, 656098, 675682, 685582, 736162
Offset: 1

Views

Author

Lekraj Beedassy, Jul 09 2006

Keywords

Comments

This sequence is a subsequence of A023515.

Crossrefs

Programs

  • Mathematica
    Times[#, # + 2] - 1 & /@ Select[Prime@ Range@ 150, PrimeQ[# + 2] &] (* Michael De Vlieger, Oct 23 2015 *)
  • PARI
    for(n=1, 200, if(prime(n+1)-prime(n)==2, print1(prime(n)*prime(n+1)-1", "))) \\ Altug Alkan, Oct 23 2015

Formula

a(n) = A037074(n)-1 = (A014574(n))^2 -2 = A075369(n)-2.
a(n) = 2*A120876(n). - Jason Kimberley, Oct 23 2015
a(n) = 36*A002822(n-1)^2-2, for n>1. - Jason Kimberley, Oct 23 2015
a(n) = A023515(A107770(n)). - Jason Kimberley, Oct 23 2015

A120876 (Product of twin primes - 1)/2.

Original entry on oeis.org

7, 17, 71, 161, 449, 881, 1799, 2591, 5201, 5831, 9521, 11249, 16199, 18431, 19601, 25991, 28799, 36449, 39761, 48671, 60551, 88199, 93311, 106721, 136241, 162449, 179999, 190961, 206081, 217799, 328049, 337841, 342791, 368081, 388961, 520199, 532511, 551249, 563921
Offset: 1

Views

Author

Lekraj Beedassy, Jul 09 2006

Keywords

Comments

This sequence is a subsequence of A102770.

Crossrefs

Cf. The subsequence A086870.

Programs

  • Mathematica
    (Times@@#-1)/2&/@Select[Partition[Prime[Range[200]], 2,1],Last[#]- First[#]== 2&] (* Harvey P. Dale, Jun 26 2011 *)
  • PARI
    for(n=1, 200, if(prime(n+1)-prime(n)==2, print1((prime(n)*prime(n+1)-1)/2", "))) \\ Altug Alkan, Oct 23 2015
    
  • PARI
    p=2; forprime(q=3, 1e3, if(q-p==2, print1(p*q\2", ")); p=q) \\ Charles R Greathouse IV, Apr 01 2016

Formula

a(n) = A120875(n)/2 = A075369(n)/2-1 = A075369(n)^2/2-1.
a(n) = 18*A002822(n-1)^2-1, for n>1.
a(n) = A102770(A107770(n)). - Jason Kimberley, Nov 10 2015

Extensions

Corrected by T. D. Noe, Oct 25 2006
Edited by Jason Kimberley, Oct 23 2015

A286195 Products of two numbers that are the average of a pair of twin primes.

Original entry on oeis.org

16, 24, 36, 48, 72, 108, 120, 144, 168, 180, 216, 240, 252, 288, 324, 360, 408, 432, 504, 540, 552, 600, 612, 648, 720, 756, 768, 792, 828, 864, 900, 912, 960, 1080, 1128, 1152, 1188, 1224, 1248, 1260, 1296, 1368, 1392, 1440, 1620, 1656, 1680, 1692, 1728, 1764, 1800
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 12 2017

Keywords

Comments

Product of two numbers from A014574 in at least one way. - David A. Corneth, Jun 12 2017
For n > 1, a(n) is divisible by 12. All terms not in 4*A014574 are divisible by 36. - Robert Israel, Jun 12 2017

Examples

			4 and 12 are the average of twin prime pairs (i.e., 4 = (3+5)/2 and 12 = (11+13)/2) and 4*12 = 48, which is in the sequence.
As 4 is the average of a twin prime pair, 4*4 = 16 is also in the sequence. - _David A. Corneth_, Jun 12 2017
		

Crossrefs

A075369 is a subsequence.

Programs

  • Maple
    N:= 2000: # to get all terms <= N
    P:= select(isprime, {seq(i,i=3..N/4+1,2)}):
    B:= map(`+`,P,1) intersect map(`-`,P,1):
    sort(convert(select(`<=`,{seq(seq(B[i]*B[j],j=1..i),i=1..nops(B))},N),list));
    # Robert Israel, Jun 12 2017
  • Mathematica
    With[{nn = 1800}, TakeWhile[Union@ Map[Times @@ # &, Tuples[#, {2}]], # <= nn &] &@ Map[Mean, Select[Partition[Prime@ Range@ PrimePi@ nn, 2, 1], Differences@ # == {2} &]]] (* Michael De Vlieger, Jun 12 2017 *)
  • PARI
    upto(n) = {my(l1=List(),l2=List(),p,q);
    p=2; forprime(q=3, n, if(q-p==2, listput(l1,p+1)); p=q); for(i=1,#l1,for(j=i,#l1, if(l1[i]*l1[j]<=n, listput(l2, l1[i]*l1[j]), next(2)))); listsort(l2,1); l2} \\ prog adapted from PARI-prog from Charles R Greathouse IV in A014574. - David A. Corneth, Jun 12 2017

A129816 Conjectured numbers n such that there do not exist two consecutive primes whose product + n is a square.

Original entry on oeis.org

2, 5, 6, 7, 8, 11, 12, 13, 15, 17, 18, 20, 22, 24, 27, 28, 31, 32, 33, 37, 39, 40, 41, 42, 45, 48, 50, 51, 52, 54, 55, 56, 57, 59, 60, 61, 63, 69, 70, 71, 72, 73, 74, 76, 79, 80, 84, 87, 88, 89, 90, 91, 93, 96, 97, 98, 99, 101, 102, 104, 105, 107, 108, 111, 112, 114, 116, 120
Offset: 1

Views

Author

Cino Hilliard, May 20 2007

Keywords

Comments

For twin primes and k=1, p(n)*p(n+1)+k is always a square. This follows from the fact that for any number x, x(x+2) + 1 = x^2+2x+1 = (x+1)^2. Since twin primes differ by 2, the product of twin primes + 1 is a square (A075369), and 1 is not in the sequence.
Note that the product of the special case of the first 2 consecutive primes 2 and 3 will produce infinitely many squares. 6+3 = 9, 6+10 = 16. 6+k = y^2 or k=y^2 - 6 for y > 4. This leaves us the cases for p(n) > 2 to prove the instances of k such that p(n)*p(n+1) + k != y^2.
Case k=2: Let x = p(n) and x+2m = p(n+1) since the next prime is a multiple of 2 away from the current prime. Now assume x^2+2mx + 2 = y^2.
Completing the square and rearranging terms, we have x^2 + 2mx + m^2 = y^2 -2 + m^2 or (x+m)^2 = y^2 - 2 + m^2 = z^2. Then y^2-z^2 = 2 - m^2. So m=1 is the only possibility.
This gives y^2-z^2 = 1 or y-z= and y+z=1, impossible.
This contradicts the assumption x^2+2mx+2 = y^2 so there are no consecutive primes such that p(n)*p(n+1)+k = y^2.
Case 5: Using the arguments for Case 2, c. so m = 1,2 are the only ppossibilities and y^2-z^2 = 4 or y^2-z^2 = 1 have no integer solutions.
Case 7: y^-z^2 = 7 - m^2. m = 1,2. y^2-z^2 = 6 has no integer solutions. For y^2-z^2 = 3 we have y-z = 1 y+z = 3 y = 2, z=1. Then x^2-2xm+7 = y^2 becomes x^2-2x+3 = 0 which has no integer solution.
Let us consider a working case for k = 14. y^-z^2 = 14 - m^2. m = 1,2,3. For m=1 y-z = 1 y+z = 13 y = 7 Then substituting m,y into x^2 + 2mx + 14 = y^2 we get x^2+2x + 14 = 49. Completing the square we get (x+1)^2 = 49-14+1 = 36 and x=5. So 5*7+14 = 49. I do not see a general proof for all cases that p(n)*p(n+1) + k != y^2.
Complement of A129783. - Omar E. Pol, Dec 26 2008

Crossrefs

Cf. A129783. - Omar E. Pol, Dec 26 2008

Programs

  • PARI
    primesq2(n) = {local(x); for(x=1,n, if(primesq(10000,x)==0,print1(x",") ) ) } primesq(n,m) = { local(c,k,x,p1,p2,j); c=0; for(k=m,m, for(x=1,n, p1=prime(x); p2=(prime(x+1)); y=p1*p2+k; if(issquare(y), c++; \ print1(k","); break; ) ) ); c; }

Extensions

There is probably no proof that this sequence is correct. - N. J. A. Sloane, May 24 2007

A165280 If p and q are twin primes then pq + 1 is always divisible by 3, except for (p,q)=(3,5). Sequence gives values of (pq + 1)/3.

Original entry on oeis.org

12, 48, 108, 300, 588, 1200, 1728, 3468, 3888, 6348, 7500, 10800, 12288, 13068, 17328, 19200, 24300, 26508, 32448, 40368, 58800, 62208, 71148, 90828, 108300, 120000, 127308, 137388, 145200, 218700, 225228, 228528, 245388, 259308, 346800
Offset: 1

Views

Author

Tanin (Mirza Sabbir Hossain Beg) (mirzasabbirhossainbeg(AT)yahoo.com), Sep 13 2009

Keywords

Crossrefs

Programs

  • Magma
    [(p+1)^2 div 3: p in PrimesInInterval(5,1100) |IsPrime(p+2)]; // Marius A. Burtea, Jan 02 2020
  • Mathematica
    p = Rest@ Select[ Prime@ Range@ 175, PrimeQ[ # + 2] & ]; (p (p + 2) + 1)/3 (* Robert G. Wilson v, Sep 13 2009 *)
    (Times@@#+1)/3&/@Select[Partition[Prime[Range[3,200]],2,1],#[[2]]-#[[1]] == 2&] (* Harvey P. Dale, Aug 28 2022 *)

Formula

a(n) = (A001359(n+1)*A006512(n+1)+1)/3 = (A037074(n+1)+1)/3 = A075369(n+1)/3. - Robert G. Wilson v, Sep 13 2009

Extensions

More terms from Robert G. Wilson v, Sep 13 2009
Edited by N. J. A. Sloane, Sep 15 2009
Showing 1-7 of 7 results.