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 11-20 of 40 results. Next

A118071 Primes which are the sum of a twin prime pair + 1.

Original entry on oeis.org

13, 37, 61, 277, 397, 457, 541, 1201, 1237, 1321, 1621, 1657, 2557, 2857, 3217, 4057, 4177, 4261, 4621, 5101, 5581, 6337, 6661, 6781, 7057, 7537, 8101, 8317, 8461, 8521, 8677, 9277, 9601, 10837, 10957, 11317, 11701, 12541, 12601, 12721, 13381, 13921
Offset: 1

Views

Author

Jonathan Vos Post, May 11 2006

Keywords

Examples

			a(1) = 13 = 5 + 7 + 1 where (5,7) is a twin prime pair.
a(2) = 37 = 17 + 19 + 1.
a(3) = 61 = 29 + 31 + 1.
a(4) = 277 = 137 + 139 + 1.
a(5) = 397 = 197 + 199 + 1.
		

Crossrefs

Programs

  • Mathematica
    Select[Total/@Select[Partition[Prime[Range[1000]],2,1],#[[2]]-#[[1]] == 2&]+1,PrimeQ] (* Harvey P. Dale, Jul 25 2019 *)
  • PARI
    is(n)=n%12==1 && isprime(n) && isprime(n\2-1) && isprime(n\2+1) \\ Charles R Greathouse IV, Jan 21 2015

Formula

{A001359(k) + A006512(k) + 1} INTERSECT {A000040}.
{A054735(k) + 1} INTERSECT {A000040}.
{2*A001359(k) + 3} INTERSECT {A000040}.
{2*A006512(k) - 1} INTERSECT {A000040}. - Juri-Stepan Gerasimov, Apr 26 2010

Extensions

More terms added by Vladimir Joseph Stephan Orlovsky, Mar 10 2009

A152786 Integers k such that (k^2)/2 is the arithmetic mean of a pair of twin primes.

Original entry on oeis.org

6, 12, 42, 48, 72, 84, 90, 174, 204, 264, 306, 372, 408, 456, 474, 546, 594, 600, 642, 750, 852, 882, 936, 972, 978, 1038, 1140, 1212, 1272, 1386, 1470, 1512, 1518, 1584, 1770, 1836, 1902, 1980, 1986, 2130, 2196, 2256, 2262, 2316, 2382, 2652, 2688, 2718
Offset: 1

Views

Author

Keywords

Comments

Square roots of A054735 where these are integer.

Examples

			6 is a term since (6^2)/2 = 18 = mean(17, 19).
12 is a term since (12^2)/2 = 72 = mean(71,73).
42 is a term since (42^2)/2 = 882 = mean(881,883).
		

Crossrefs

Cf. A014574, A037073, A054735, A152788 (cubic version).
Subsequence of A074924. - Zak Seidov, Feb 01 2013

Programs

  • Magma
    [k:k in [2..2800 by 2]| IsPrime(k*k div 2 -1) and IsPrime(k*k div 2 +1)]; // Marius A. Burtea, Jan 01 2020
  • Maple
    isa := n -> isprime(n) and isprime(n+2) and issqr(2*n+2):
    select(isa, [$4..1000000]): map(n -> sqrt(2*n+2), %); # Peter Luschny, Jan 05 2020
  • Mathematica
    lst={};Do[p1=Prime[n];p2=Prime[n+1];If[p2-p1==2,e=(2*(p1+1))^(1/2);i=Floor[e]; If[e==i,AppendTo[lst,i]]],{n,3*9!}];lst
    (* Second program: *)
    Select[Map[Sqrt[2 #] &, Mean /@ Select[Partition[Prime@ Range[10^6], 2, 1], Subtract @@ # == -2 &]], IntegerQ] (* Michael De Vlieger, Feb 18 2018 *)
  • PARI
    forstep(n=6,1e3,6,if(isprime(n^2/2-1)&&isprime(n^2/2+1),print1(n", "))) \\ Charles R Greathouse IV, Feb 01 2013
    

Formula

{n: n^2 = A054735(i), any i}. - R. J. Mathar, Dec 12 2008
a(n) = 6*A037073(n). [Zak Seidov, seqfan list, Aug 20 2010] [From R. J. Mathar, Sep 07 2010]

Extensions

Edited by R. J. Mathar, Dec 12 2008

A309152 Numbers that can be written as the sum of two primes whose difference is also prime.

Original entry on oeis.org

7, 8, 9, 12, 15, 21, 24, 33, 36, 45, 60, 63, 75, 84, 105, 111, 120, 141, 144, 153, 183, 195, 201, 204, 216, 231, 243, 273, 276, 285, 300, 315, 351, 360, 384, 396, 423, 435, 456, 465, 480, 525, 540, 564, 573, 603, 621, 624, 645, 663, 696, 813, 825, 831, 840
Offset: 1

Views

Author

Wesley Ivan Hurt, Jul 14 2019

Keywords

Comments

Numbers k such that k = p + q where p < q and p, q, and q - p are all prime.
Union of A054735 and (A006512 + 2). - Robert Israel, Jul 15 2019
From Bernard Schott, Jul 15 2019: (Start)
If k is even, then k is in A054735 with q - p = 2.
If k is odd, then k is in (A006512 + 2) with p = 2. (End)

Crossrefs

Programs

  • Maple
    P:= select(isprime, {seq(i,i=3..10000,2)}):
    T:= P intersect map(`+`,P,2):
    A1:= map(`+`,T, 2):
    A2:= select(`<`, map(t -> 2*t-2, T), max(A1)):
    sort(convert(A1 union A2,list); # Robert Israel, Jul 15 2019
  • PARI
    is(n) = my(x=n-1, y=1); while(x >= y, if(ispseudoprime(x) && ispseudoprime(y), if(ispseudoprime(x-y), return(1))); x--; y++); 0 \\ Felix Fröhlich, Jul 14 2019

A118072 Primes which are the sum of a twin prime pair - 1.

Original entry on oeis.org

7, 11, 23, 59, 83, 359, 383, 479, 563, 839, 863, 1283, 1319, 1619, 2039, 2063, 2099, 2459, 2579, 2903, 2963, 3863, 4259, 4283, 4679, 5099, 5939, 6599, 6659, 6719, 6779, 7079, 7643, 7703, 8039, 8543, 8963, 10463, 10559, 10883, 11003, 11279, 11483, 11699, 12263
Offset: 1

Views

Author

Jonathan Vos Post, May 11 2006

Keywords

Comments

Dickson's conjecture implies this sequence is infinite. - Charles R Greathouse IV, Apr 18 2013

Examples

			a(1) = 7 = 3 + 5 - 1 where (3,5) is a twin prime pair.
a(2) = 11 = 5 + 7 - 1 where (5,7) is a twin prime pair.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(13000)|IsPrime((p-1) div 2) and IsPrime((p+3) div 2)]; // Marius A. Burtea, Jan 01 2020
  • Mathematica
    Select[(Total[#]-1)&/@Select[Partition[Prime[Range[500]],2,1], Last[#]- First[#]== 2&],PrimeQ]  (* Harvey P. Dale, Apr 04 2011 *)
  • PARI
    is(p)=isprime((p-1)\2)&&isprime((p+3)\2)&&isprime(p) \\ Charles R Greathouse IV, Apr 18 2013
    

Formula

{A001359(k) + A006512(k) - 1} INTERSECT {A000040}. {A054735(k) - 1} INTERSECT {A000040}. {2*A001359(k) + 1} INTERSECT {A000040}.

Extensions

More terms from Harvey P. Dale, Apr 04 2011
More terms from Amiram Eldar, Jan 01 2020

A158870 Sums of the form (twin primes + 1) which are also an upper twin prime.

Original entry on oeis.org

13, 61, 1321, 1621, 4261, 5101, 6661, 6781, 11701, 12541, 21061, 66361, 83221, 88261, 107101, 110881, 114661, 127681, 130201, 140761, 141961, 144541, 148201, 149521, 157561, 161341, 163861, 175081, 186481, 204601, 230941, 249541, 267961
Offset: 1

Views

Author

Cino Hilliard, Mar 28 2009

Keywords

Comments

If the sum is a member of a twin prime pair, it always is the upper member, shown in A158866.
Moreover, except the first term, these numbers are of the form 10k+1. [We prove this by exhausting the possibilities when calculating the upper, summing and inspecting the lower of the sum. Here are the possible outcomes.
p1(k), p2(k) p2(m) = p1(k)+p2(k)+1
------------ ---------------------------------
10k+1 10k+3 20k+4+1 not prime
10k+3 10k+5 p2(k) not prime
10k+5 10k+7 p1(k) not prime
10k+7 10k+9 20k+16+1 upper => p1(m) not prime
10k+9 10k+11 20k+20+1 = 10(2k+2)+1
So the only form that was not eliminated, is 10k+1. 13 defies this scheme because 10k+5 is prime for k=0, Q.E.D.]

Examples

			The 30th lower twin prime is 659. 659+661+1 = 1321, prime and 1319 is too.
Then 1319 is the lower member of the twin prime pair (1319,1321). So 1321 is in the sequence.
		

Crossrefs

Cf. A158866.

Programs

  • Mathematica
    With[{tws=Total/@Select[Partition[Prime[Range[25000]],2,1],#[[2]]-#[[1]] == 2&]+1},Select[tws,And@@PrimeQ[#+{0,-2}]&]] (* Harvey P. Dale, Apr 30 2014 *)
  • PARI
    gp > g(n)=for(x=1,n,y=2*twinl(x)+3;if(isprime(y)&&isprime(y-2), print1(y",")))

Formula

{A054735(k)+1: A054735(k)+1 = A006512(j), any j,k} - R. J. Mathar, Apr 06 2009

Extensions

Edited by R. J. Mathar, Apr 06 2009

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

Original entry on oeis.org

13, 23, 41, 65, 101, 143, 191, 245, 311, 353, 425, 479, 551, 581, 623, 695, 749, 821, 875, 971, 1115, 1271, 1325, 1445, 1613, 1739, 1817, 1877, 1943, 2129, 2441, 2471, 2513, 2597, 2783, 3071, 3113, 3161, 3215, 3335, 3533, 3737, 3845, 3881, 3923, 4067
Offset: 1

Views

Author

Cino Hilliard, Dec 02 2007

Keywords

Comments

We list the twin primes in staircase fashion as follows.
3
5_5
__7_11
____13_17
_______19_29
__________31_41
________________tu(n)_tl(n)
______________________tu(n+1)
...
where tl(n) = n-th lower twin prime, tu(n) = n-th upper twin prime. Then a(n) = tl(n) + tu(n) + tl(n+1).

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

a(n) = A054735(n)+A001359(n+1). - R. J. Mathar, Sep 10 2016

A158866 Indices of twin primes if the sum of these twin primes+1 is an upper twin prime.

Original entry on oeis.org

2, 5, 30, 31, 66, 73, 88, 91, 141, 147, 217, 513, 607, 637, 743, 760, 784, 845, 856, 911, 920, 938, 949, 958, 994, 1015, 1031, 1092, 1150, 1246, 1373, 1470, 1553, 1586, 1768, 1814, 1871, 2017, 2029, 2129, 2261, 2271, 2331, 2370, 2458, 2488, 2510, 2545, 2579
Offset: 1

Views

Author

Cino Hilliard, Mar 28 2009

Keywords

Comments

If the sum is a member of a twin prime pair, it always is the upper twin prime member. [Proof: Twin primes are sequentially of the form 6n-1 and 6n+1. Then adding according to the condition, we get 6n-1+6n+1+1 = 12n+1. This implies 12n+1 is an upper member since if it were a lower member, 12n+1+2 would be the upper member but 12n+3 is not prime contradicting the definition of a twin prime. Therefore 12n+1 must be an upper twin prime member as stated.]

Examples

			The 30th lower twin prime is 659. 659+661+1 = 1321, prime and 1319 is too.
Then 1319 is the lower member of the twin prime pair (1319,1321). So 30 is in the sequence.
		

Crossrefs

Cf. A158870.

Programs

  • Maple
    count:= 0: Res:= NULL:
    k:= 1:
    for j from 1 while count < 100 do
      if isprime(6*j-1) and isprime(6*j+1) then
        k:= k+1;
        if isprime(12*j-1) and isprime(12*j+1) then
           count:= count+1;
           Res:= Res,k;
        fi
      fi
    od:
    Res; # Robert Israel, Mar 06 2018
  • Mathematica
    utpQ[{a_, b_}]:=And@@PrimeQ[a + b + {1, -1}]; Flatten[Position[Select[ Partition[Prime[Range[25000]],2,1],#[[2]]-#[[1]]==2&],?utpQ]] (* _Harvey P. Dale, Sep 16 2013 *)
  • PARI
    twinl(n) = { local(c,x); c=0; x=1; while(c
    				

Formula

{k: A054735(k)+1 = A006512(j), any j} - R. J. Mathar, Apr 06 2009

Extensions

Edited by R. J. Mathar, Apr 06 2009

A165966 Triangular numbers that are sums of twin prime pairs.

Original entry on oeis.org

36, 120, 276, 300, 2556, 3240, 5460, 8256, 12720, 23436, 26796, 34980, 41616, 46056, 56616, 59340, 103740, 122760, 139656, 147696, 157080, 185136, 195000, 231540, 277140, 333336, 353220, 386760, 401856, 516636, 609960, 860016, 1001820
Offset: 1

Views

Author

Zak Seidov, Oct 01 2009

Keywords

Comments

All terms are multiples of 12.

Examples

			36 = 8*9/2 is a term since it is triangular and the sum of the twin primes 17 and 19.
120 = 15*16/2 is a term since it is triangular and the sum of the twin primes 59 and 61.
		

Crossrefs

Subsequence of A111163 and of A054735.

Programs

  • Mathematica
    tri[n_] := n*(n+1)/2; Select[tri /@ Range[10^3], And @@ PrimeQ[#/2 + {-1, 1}] &] (* Amiram Eldar, Dec 27 2019 *)
  • PARI
    lista(nn) = {for (n = 1, nn, trg = n*(n+1)/2; if (!(trg % 2) && isprime(trg/2-1) && isprime(trg/2+1), print1(trg, ", ")););} \\ Michel Marcus, Oct 16 2013

Formula

a(n) = A105174(n)*(A105174(n) + 1)/2.

A226539 Numbers which are the sum of two squared primes in exactly two ways (ignoring order).

Original entry on oeis.org

338, 410, 578, 650, 890, 1010, 1130, 1490, 1730, 1802, 1898, 1970, 2330, 2378, 2738, 3050, 3170, 3530, 3650, 3842, 3890, 4010, 4658, 4850, 5018, 5090, 5162, 5402, 5450, 5570, 5618, 5690, 5858, 6170, 6410, 6530, 6698, 7010, 7178, 7202, 7250, 7850, 7970, 8090
Offset: 1

Views

Author

Henk Koppelaar, Jun 10 2013

Keywords

Examples

			338 = 7^2 + 17^2 = 13^2 + 13^2;
410 = 7^2 + 19^2 = 11^2 + 17^2.
		

References

  • Stan Wagon, Mathematica in Action, Springer, 2000 (2nd ed.), Ch. 17.5, pp. 375-378.

Crossrefs

Cf. A054735 (restricted to twin primes), A037073, A069496.
Cf. A045636 (sum of two squared primes: a superset).
Cf. A214511 (least number having n representations).
Cf. A226562 (restricted to sums decomposed in exactly three ways).

Programs

  • Maple
    Prime2PairsSum := p -> select(x ->`if`(andmap(isprime, x),true,false), numtheory:-sum2sqr(p)):
    for n from 2 to 10^6 do
      if nops(Prime2PairsSum(n)) = 2 then print(n, Prime2PairsSum(n)) fi;
    od;
  • Mathematica
    Select[Range@10000, Length[Select[ PowersRepresentations[#, 2, 2], And @@ PrimeQ[#] &]] == 2 &] (* Giovanni Resta, Jun 11 2013 *)
  • PARI
    select( is_A226539(n)={#[0|t<-sum2sqr(n),isprime(t[1])&&isprime(t[2])]==2}, [1..10^4]) \\ For more efficiency, apply selection to A045636. See A133388 for sum2sqr(). - M. F. Hasler, Dec 12 2019

Extensions

a(25)-a(44) from Giovanni Resta, Jun 11 2013

A226562 Numbers which are the sum of two squared primes in exactly three ways (ignoring order).

Original entry on oeis.org

2210, 3770, 5330, 6290, 12818, 16490, 18122, 19370, 24050, 24650, 26690, 32810, 33410, 34970, 36530, 39650, 39770, 44642, 45050, 45890, 49010, 50690, 51578, 57770, 59450, 61610, 63050, 66170, 67490, 72410, 73610, 74210, 80330, 85202, 86210, 86330, 88010
Offset: 1

Views

Author

Henk Koppelaar, Jun 11 2013

Keywords

Comments

Suggestion: difference between successive terms is always at least 3. (With the known 115885 terms <10^9, the smallest difference is 24.) - Zak Seidov, Jun 12 2013

Examples

			2210 = 19^2 + 43^2 = 23^2 + 41^2 = 29^2 + 37^2;
		

References

  • Stan Wagon, Mathematica in Action, Springer, 2000 (2nd ed.), Ch. 17.5, pp. 375-378.

Crossrefs

Cf. A054735 (restricted to twin primes), A037073, A069496.
Cf. A045636 (sum of two squared primes), A226539.
Cf. A214511 (least number having n representations).
Cf. A226539 (restricted to sums decomposed in exactly three ways).

Programs

  • Maple
    Prime2PairsSum := s -> select( x -> `if`(andmap(isprime, x), true, false), numtheory:-sum2sqr(s)):
    for n from 2 to 10 do
    if nops(Prime2PairsSum(n)) = 3 then print(n,Prime2PairsSum(n)) fi
    od;
  • Mathematica
    Select[Range@20000, Length[Select[ PowersRepresentations[#, 2, 2], And @@ PrimeQ[#] &]] == 3 &] (* Giovanni Resta, Jun 11 2013 *)

Extensions

a(22)-a(37) from Giovanni Resta, Jun 11 2013
Previous Showing 11-20 of 40 results. Next