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

A335303 Numbers k such that k divides sum of k-th twin prime pair.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 12, 18, 30, 60, 70, 78, 150, 220, 240, 340, 360, 396, 672, 840, 1188, 1365, 1665, 3080, 3770, 6420, 7317, 9952, 10356, 12972, 18318, 19218, 20544, 21996, 24750, 28656, 34543, 37449, 41910, 180622, 201570, 245115, 728028, 856420, 897022, 986794
Offset: 1

Views

Author

Metin Sariyar, May 31 2020

Keywords

Examples

			8 is a term because sum of 8th twin prime pair is 71 + 73 = 8*18.
		

Crossrefs

Programs

  • Mathematica
    l={};c=0;Do[If[PrimeQ[Prime[n]+2],c=c+1;If[IntegerQ[(2*Prime[n]+2)/c], AppendTo[l,c]]] ,{n,2,10000}];l
  • PARI
    is(n) = {!bittest(n, 0)&&isprime(n\2-1)&&isprime(n\2+1)}; \\ A054735
    lista(nn) = {my(nb=0); for (n=1, nn, if (is(n), nb++; if ((n % nb) == 0, print1(nb, ", "));););} \\ Michel Marcus, Jun 01 2020

A335304 Primes k such that k divides sum of k-th twin prime pair.

Original entry on oeis.org

2, 3, 5, 34543
Offset: 1

Views

Author

Metin Sariyar, May 31 2020

Keywords

Comments

Primes in A335303.
a(5) > 2*10^11, if it exists. - Giovanni Resta, Jun 01 2020

Examples

			34543 is a term because sum of 34543th twin prime pair is 5388707 + 5388709 = 8*3*13*34543.
		

Crossrefs

Programs

  • Mathematica
    l={};c=0;Do[If[PrimeQ[Prime[n]+2],c=c+1;If[IntegerQ[(2*Prime[n]+2)/c]&&PrimeQ[c], AppendTo[l,c]]],{n,2,10^6}];l
  • PARI
    is(n) = {!bittest(n, 0)&&isprime(n\2-1)&&isprime(n\2+1)}; \\ A054735
    lista(nn) = {my(nb=0); for (n=1, nn, if (is(n), nb++; if (isprime(nb) && ((n % nb) == 0), print1(nb, ", "));););} \\ Michel Marcus, Jun 01 2020

A349757 Even numbers that are both the sum of a twin prime pair and the sum of 1 and a prime.

Original entry on oeis.org

8, 12, 24, 60, 84, 360, 384, 480, 564, 840, 864, 1284, 1320, 1620, 2040, 2064, 2100, 2460, 2580, 2904, 2964, 3864, 4260, 4284, 4680, 5100, 5940, 6600, 6660, 6720, 6780, 7080, 7644, 7704, 8040, 8544, 8964, 10464, 10560, 10884, 11004, 11280, 11484, 11700, 12264, 12540
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 01 2022

Keywords

Examples

			8 is in the sequence since 8 = 3+5 = 7+1.
12 is in the sequence since 12 = 5+7 = 11+1.
24 is in the sequence since 24 = 11+13 = 23+1.
		

Crossrefs

Cf. A008864, A054735 (sums of twin prime pairs).

A350500 Even numbers that are both the sum of a twin prime pair and the sum of 1 and a semiprime.

Original entry on oeis.org

36, 120, 144, 204, 216, 300, 396, 624, 696, 924, 1044, 1140, 1200, 1644, 1656, 1764, 2124, 2184, 2604, 2856, 3216, 3240, 3444, 3744, 3756, 3900, 4056, 4164, 4224, 4536, 4620, 4764, 5184, 5316, 5460, 5580, 5604, 6000, 6240, 6504, 6516, 6744, 7116, 7344, 7836, 7860, 8004
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 01 2022

Keywords

Examples

			36 is in the sequence since 36 = 17+19 = 1+35.
120 is in the sequence since 120 = 59+61 = 1+119.
		

Crossrefs

Intersection of A054735 and A088707.
Cf. A349757.

Programs

  • Mathematica
    Select[12 * Range[700], And @@ PrimeQ[#/2 + {-1, 1}] && PrimeOmega[# - 1] == 2 &] (* Amiram Eldar, Jan 02 2022 *)
    Select[Total/@Select[Partition[Prime[Range[600]],2,1],#[[2]]-#[[1]]==2&],PrimeOmega[#-1]==2&] (* Harvey P. Dale, Feb 02 2025 *)
  • Python
    from sympy import isprime, factorint
    def ok(n): return n%2 == 0 and isprime(n//2-1) and isprime(n//2+1) and sum(factorint(n-1).values()) == 2
    print([k for k in range(8005) if ok(k)]) # Michael S. Branicky, Jan 02 2022

A087187 Number of ways to write n = i*p + j*q, where (p,q) is a twin prime pair and i,j>0.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 23 2003

Keywords

Comments

a(A054735(n)) > 0.

Examples

			n=50 = 5+5+5+5+5+5+5+3+3+3+3+3 = 5+5+5+5+3+3+3+3+3+3+3+3+3+3 =
5+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3 = 7+7+7+7+7+5+5+5 = 13+13+13+11, therefore
a(50)=5
		

Crossrefs

A135284 Sum of staircase twin primes according to the rule: top + bottom - next top.

Original entry on oeis.org

3, 1, 7, 7, 19, 25, 49, 43, 97, 79, 127, 121, 169, 187, 169, 217, 211, 259, 253, 277, 277, 409, 403, 403, 475, 541, 583, 595, 625, 511, 799, 817, 799, 835, 745, 1009, 1015, 1039, 1033, 1033, 1075, 1183, 1267, 1279, 1285, 1213, 1405, 1423, 1477, 1369, 1597, 1573
Offset: 1

Views

Author

Cino Hilliard, Dec 03 2007

Keywords

Comments

The case for bottom - top + next top produces A006512(n+1), the upper twin primes > 5.

Programs

  • PARI
    g(n) = for(x=1,n,y=twinu(x) + twinl(x) - twinl(x+1);print1(y",")) twinl(n) = / *The n-th lower twin prime. */ { local(c,x); c=0; x=1; while(c
    				

Formula

We list the twin primes in staircase fashion as in A135283. Then a(n) = tl(n) + tu(n) + (-tl(n+1)).
a(n) = A054735(n)-A001359(n+1). - R. J. Mathar, Sep 10 2016

A270245 Lesser of twin primes such that sum of twin prime pair is the sum of 2 nonzero squares.

Original entry on oeis.org

3, 179, 521, 809, 1619, 1871, 2087, 2339, 3257, 3329, 4049, 4337, 4931, 5651, 5849, 6569, 6659, 6947, 7487, 8009, 8387, 8819, 8999, 10529, 10889, 11699, 12239, 14561, 15137, 16361, 16451, 16649, 17657, 17747, 19079, 19889, 19961, 20231, 20771, 20807, 21059, 22481, 22697, 23039, 23201
Offset: 1

Views

Author

Altug Alkan, Mar 13 2016

Keywords

Examples

			3 is a term because 3 + 5 = 2^2 + 2^2.
179 is a term because 179 + 181 = 6^2 + 18^2.
521 is a term because 521 + 523 = 12^2 + 30^2.
809 is a term because 809 + 811 = 18^2 + 36^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Select[Prime@ Range@ 2700, PrimeQ[# + 2] &], Length[PowersRepresentations[2 # + 2, 2, 2] /. {0, } -> Nothing] > 0 &] (* _Michael De Vlieger, Mar 15 2016 *)
  • PARI
    isA000404(n)={ for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2))}
    t(n,p=3) = {while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
    for(n=1, 1e3, if(isA000404(2*t(n)+2), print1(t(n), ", ")));

A305558 If (p1,p2) is the n-th twin prime pair and p the prime before p1 and q the prime after p2 then a(n) = p + q - (p1 + p2).

Original entry on oeis.org

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

Views

Author

Dimitris Valianatos, Jun 21 2018

Keywords

Examples

			For n = 8, the 8th prime pair is (71, 73), the prime before 71 is 67 and prime after 73 is 79. So a(8) = 67 + 79 - 71 - 73 = 2.
		

Crossrefs

Programs

  • Mathematica
    Map[#1 + #4 - (#2 + #3) & @@ # &, Select[Partition[Prime@ Range[500], 4, 1], And[#3 - #2 == 2] & @@ # &]] (* Michael De Vlieger, Jun 30 2018 *)
  • PARI
    {
    print1(2+7-(5+3)", ");
    forstep(n=6,100,6,
            if(isprime(n-1)&&isprime(n+1),
               a=precprime(n-2);b=nextprime(n+2);
               print1(a+b-2*n", ")
              )
           )
    }

Formula

a(n) = A000040(A029707(n)-1) + A000040(A107770(n)+1) - (A001359(n) + A006512(n)). - Jianing Song, Jun 22 2018

Extensions

Definition clarified by Jianing Song, Jun 22 2018

A329590 Odd numbers k that cannot be expressed as k = p+q+r, with p prime and (q, r) a pair of twin primes.

Original entry on oeis.org

1, 3, 5, 7, 9, 33, 57, 93, 99, 129, 141, 153, 177, 183, 195, 213, 225, 243, 255, 261, 267, 273, 297, 309, 327, 333, 351, 369, 393, 411, 423, 435, 453, 477, 489, 501, 513, 519, 525, 537, 561, 573, 591, 597, 603, 633, 645, 657, 663, 675, 687, 693, 705, 711, 723
Offset: 1

Views

Author

Antonio Roldán, Feb 13 2020

Keywords

Examples

			33 can be expressed as the sum of three primes in 9 different ways:
33 = 11 + 11 + 11 = 13 + 13 + 7 = 17 + 11 + 5 = 17 + 13 + 3 = 19 + 7 + 7 = 19 + 11 + 3 = 23 + 5 + 5 = 23 + 7 + 3 = 29 + 2 + 2;
there is no pair of twin primes in the addends, so 33 is a term.
		

Crossrefs

Programs

  • PARI
    for(n = 0, 500, m = 2*n+1; v = 0; forprime(i = 3, m-8, j = (m-i)/2; if(isprime(j-1) && isprime(j+1), v = 1)); if(v == 0, print1(m,", ")))
    
  • PARI
    isok(k) = {if (! (k % 2), return (0)); forprime(p=3, k, if (isprime((k-p)\2-1) && isprime((k-p)\2+1), return(0));); return (1);} \\ Michel Marcus, Feb 16 2020

A334295 Integers k such that the sum of k twin primes pairs starting from (5,7) is a perfect power.

Original entry on oeis.org

2, 5, 9, 352, 165421, 356928514, 795471483
Offset: 1

Views

Author

Devansh Singh, Apr 21 2020

Keywords

Examples

			a(1) = 2 as 5+7 + 11+13 = 36 = 6^2;
a(2) = 5 as 5+7 + 11+13 + 17+19 + 29+31 + 41+43 = 216 = 6^3.
From _Michel Marcus_, Apr 27 2020: (Start)
Table of results, with k, greatest prime and corresponding sum:
   2, 13, 36 = 6^2;
   5, 43, 216 = 6^3;
   9, 109, 900 = 30^2;
   352, 20749, 6290064 = 2508^2;
   165421, 32841799, 5048685437184 = 2246928^2. (End)
From _Giovanni Resta_, Apr 27 2020: (Start)
The next two entries of the table above are:
   356928514, 165800305423, 56622416174760209796 = 7524786786^2;
   795471483, 396030375733, 301922786495024336196 = 17375925486^2. (End)
		

Crossrefs

Cf. A001097 (twin primes), A054735 (sum of twin prime pairs).

Programs

  • PARI
    lista(nn) = {my(s = 0, nb = 0); forprime(p=5, nn, if (isprime(p+2), s += 2*p+2; nb++; if (ispower(s), print1(nb, ", "));););} \\ Michel Marcus, Apr 22 2020

Extensions

a(4)-a(5) from Michel Marcus, Apr 22 2020
a(6) from Jinyuan Wang, Apr 24 2020
a(7) from Giovanni Resta, Apr 27 2020
Previous Showing 31-40 of 40 results.