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

A173255 Smaller member p of a twin prime pair (p, p+2) such that the sum p+(p+2) is a fifth power: 2*(p+1) = k^5 for some integer k.

Original entry on oeis.org

4076863487, 641194278911, 16260080320511, 174339220049999, 420586798122287, 388931440807883087, 1715002302605720111, 2051821692518399999, 4617724356355049999, 5873208011345484287, 58698987193722272687, 76578949263222449999, 180701862444484649999, 562030251929933709311
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Feb 14 2010

Keywords

Comments

Since k^5 = 2*(p+1) is even, k is also even.
The lesser of twin primes p (except for 3) are congruent to -1 modulo 3 (see third comment in A001359), the greater of twin primes p+2 (except for 5) are congruent to 1 modulo 3. Therefore p+1 is a multiple of 3. Since k^5 = 2*(p+1) is a multiple of 3, k is also a multiple of 3. Hence k is divisible by 2 and by 3, i.e. a multiple of 6.
The lesser of twin primes except for 3 (A001359) are congruent to 1, 7 or 9 modulo 10; this applies also to the terms of the present sequence, a subsequence of A001359.

Examples

			p = 4076863487 and p+2 form a twin prime pair, their sum 8153726976 = 96^5 is a fifth power. Hence 4076863487 is in the sequence.
p = 641194278911 and p+2 form a twin prime pair, their sum 1282388557824 = 264^5 is a fifth power. Hence 641194278911 is in the sequence.
p = 388931440807883087 and p+2 form a twin prime pair, their sum 777862881615766176 = 3786^5 is a fifth power. Hence 388931440807883087 is in the sequence.
3786 is the smallest value of k that gives a prime when divided by 6, it corresponds to a(6): 3786 = 6*631 and 631 is prime. The next value of k that gives a prime when divided by 6 is 10326 and corresponds to a(11): 10326 = 6*1721 and 1721 is prime.
If p is a term and k^5 the corresponding fifth power, then a fifth-power multiple c^5*k^5 does not necessarily correspond to a term q. The fifth power 96^5 corresponds to a(1), but q = 2^5*96^5/2-1 = 130459631615 = 5*7607*3429989 is not prime, much less is (q, q+2) a twin prime pair.
If p is a term and k^5 the corresponding fifth power, and if k^5 is the product c^5*d^5 of two fifth powers where d is even, then d^5 does not necessarily correspond to a term q. The fifth power 3786^5 = 3^5*1262^5 corresponds to a(6), but q = 1262^5/2-1 = 1600540908674415 = 3*5*577*55171*3351883 is not prime, much less is (q, q+2) a twin prime pair.
		

Crossrefs

Programs

  • Magma
    /* gives triples  */ [ : k in [2..10500 by 2] | IsPrime(p) and IsPrime(p+2) where p is (k^5 div 2)-1 ];
  • Mathematica
    Select[Range[2, 10^5, 2]^5/2 - 1, And@@PrimeQ[# + {0, 2}] &] (* Amiram Eldar, Dec 24 2019 *)

Extensions

Edited, non-specific references and keywords base, hard removed, MAGMA program added and listed terms verified by the Associate Editors of the OEIS, Feb 26 2010
More terms from Amiram Eldar, Dec 24 2019

A172271 Smaller member p of a twin prime pair (p,p+2) with a cube sum N^3.

Original entry on oeis.org

3, 107, 2634011, 29659499, 57395627, 104792291, 271669247, 485149499, 568946591, 588791807, 752530067, 863999999, 2032678367, 2772616499, 2945257307, 3505869971, 4473547487, 4670303507, 5470523999, 6911999999, 7498065347, 8646803027, 8828622431, 8951240447
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Jan 30 2010

Keywords

Comments

It is conjectured that the number of twin prime pairs is infinite, one of the great open questions in number theory.
It is conjectured that this sequence is infinite.
Necessarily the cube base is even: N=2n => p = (2n)^3 / 2 - 1.
For n>1: necessarily n=3k since for n=3k+1, p = (2n)^3 / 2 - 1 is divisible by 3, and for n=3k+2, p+2 = (2n)^3 / 2 + 1 is divisible by 3.
It has been proved that the pair (p,p+2) is a twin prime couple iff 4((p-1)! + 1) == -p (mod p*(p+2)).
Equivalently, primes of the form 4n^3-1 such that 4n^3+1 is also prime. - Charles R Greathouse IV, Aug 27 2013

Examples

			3 + 5 = 2^3;
107 + 109 = (2*3)^3;
2634011 + 2634013 = (2*87)^3.
		

References

  • G. H. Hardy, E. M. Wright, An Introduction to the Theory of Numbers (Fifth Edition), Oxford University Press, 1980.
  • N. J. A. Sloane, Simon Plouffe: The Encyclopedia of Integer Sequences, Academic Press, 1995.

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and isprime(t+2), [seq(4*n^3-1, n=1..2000)]); # Robert Israel, Feb 10 2015
  • Mathematica
    lst={}; Do[a=Prime[n]; b=Prime[n+1]; If[b-a==2,c=a+b; If[Mod[c^(1/3),1]==0,AppendTo[lst,a]]],{n,11!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 13 2010 *)
    Select[Partition[Prime[Range[31*10^6]],2,1],#[[2]]-#[[1]]==2&&IntegerQ[CubeRoot[Total[#]]]&][[;;,1]] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, May 31 2025 *)
  • PARI
    v=List([3]); for(n=1,1e3,if(isprime(t=108*n^3-1) && isprime(t+2), listput(v,t))); Vec(v) \\ Charles R Greathouse IV, Aug 27 2013

Extensions

Edits and more terms from Jon E. Schoenfield, Feb 10 2015

A172494 Numbers k with (p,p+2) = ((2*k)^3/2 - 1,(2*k)^3/2 + 1) is a twin prime pair.

Original entry on oeis.org

1, 3, 87, 195, 243, 297, 408, 495, 522, 528, 573, 600, 798, 885, 903, 957, 1038, 1053, 1110, 1200, 1233, 1293, 1302, 1308, 1368, 1473, 1482, 1578, 1623, 1797, 1953, 2028, 2142, 2238, 2370, 2772, 2868, 2973, 3033, 3393, 3483, 3582, 3777, 3822, 3840, 3912
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Feb 05 2010

Keywords

Comments

a(n) is necessarily a multiple of 3 for n > 1.

Examples

			3 = (2*1)^3/2 - 1 = prime(2), 3 + 2 = 5 = (2*1)^3/2 + 1, (3,5) is the first twin prime pair => a(1) = 1.
107 = (2*3)^3/2 - 1 = prime(28), 107 + 2 = 109 = (2*3)^3/2 + 1, (107,109) is the 10th twin prime pair => a(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[4000],AllTrue[(2#)^3/2+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 21 2015 *)
  • PARI
    select(n -> isprime((2*n)^3/2-1) && isprime((2*n)^3/2+1), [1..4000]) \\ Satish Bysany, Mar 03 2017

Formula

2*a(n) = (2*A172271(n) + 2)^(1/3). - R. J. Mathar, Aug 21 2014

A174370 Lesser member p of a twin prime pair (p, p + 2) such that 2p + 3(p + 2) is a perfect square.

Original entry on oeis.org

71, 191, 6551, 9767, 18119, 21647, 27527, 35447, 46271, 79631, 103391, 103967, 121367, 127679, 161639, 207671, 241559, 254927, 264959, 273311, 380327, 421079, 450599, 479879, 592367, 700127, 745751, 949607, 986567, 1011599, 1013399
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 17 2010

Keywords

Comments

2p + 3(p + 2) = 5p + 6.
There are two parametric solutions for natural numbers:
(a) p = 5t^2 + 2t - 1, k = 5t + 1, necessarily for a prime p: t = 2s => p = 20s^2 + 4s - 1, k = 10s + 1.
If s = 3k + 2 => p of (a) is not prime but a multiple of 3.
If the least significant digit of k is 1, solution of (a) for s = (k - 1)/10).
(b) p = 5t^2 + 8t + 2, k = 5t + 4, necessarily for a prime p: t = 2s - 1 => p = 20s^2 - 4s - 1, N = 10s-1.
If s = 3k + 1 => p of (b) is not prime but a multiple of 3.
If the least significant digit of k is 9, solution of (b) for s = (k + 1)/10).

Examples

			71 and 73 are twin primes, 2 * 71 + 3 * 73 = 19^2.
191 and 193 are twin primes, 2 * 191 + 3 * 193 = 31^2.
		

References

  • Leonard E. Dickson, History of the Theory of numbers, vol. 2: Diophantine Analysis, Dover Publications 2005.
  • Richard K. Guy, Unsolved Problems in Number Theory, New York, Springer-Verlag, 1994.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Band I, B. G. Teubner, Leipzig u. Berlin, 1909.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[10^5]], PrimeQ[# + 2] && IntegerQ[Sqrt[2# + 3(# + 2)]] &] (* Alonso del Arte, Dec 05 2011 *)
    Select[(Range[2251]^2 - 6)/5, And @@ PrimeQ[# + {0, 2}] &] (* Amiram Eldar, Dec 24 2019 *)
    Select[Partition[Prime[Range[80000]],2,1],#[[2]]-#[[1]]==2&&IntegerQ[Sqrt[ 2#[[1]]+ 3#[[2]]]]&][[All,1]] (* Harvey P. Dale, May 12 2022 *)
  • PARI
    forstep(n=1,1e4,[10,8,10,2],if(isprime(p=n^2\5-1)&&isprime(p+2),print1(p", "))) \\ Charles R Greathouse IV, Dec 05 2011

A119768 Twin prime pairs that sum to a power.

Original entry on oeis.org

3, 5, 17, 19, 71, 73, 107, 109, 881, 883, 1151, 1153, 2591, 2593, 3527, 3529, 4049, 4051, 15137, 15139, 20807, 20809, 34847, 34849, 46817, 46819, 69191, 69193, 83231, 83233, 103967, 103969, 112337, 112339, 139967, 139969, 149057, 149059, 176417
Offset: 1

Views

Author

Walter Kehowski, Jun 18 2006

Keywords

Comments

Since twin prime pairs greater than (3,5) occur as either (5,7) mod 12 or (11,1) mod 12, all sums of such twin primes are always divisible by 12. Thus all powers are divisible by 12. The first few terms in base 12 are: 15, 17, 5E, 61, 8E, 91, 615, 617, 7EE, 801, 15EE, 1601 and the corresponding powers are 30, 100, 160, 1030, 1400, 3000.

Examples

			a(5) + a(6) = 71 + 73 = 144 = 12^2.
		

Crossrefs

Programs

  • Maple
    egcd := proc(n::nonnegint) local L; if n=0 or n=1 then n else L:=ifactors(n)[2]; L:=map(z->z[2],L); igcd(op(L)) fi end: L:=[]: for w to 1 do for x from 1 to 2*12^2 do s:=6*x; for r from 2 to 79 do t:=s^r; if egcd(s)=1 and andmap(isprime,[(t-2)/2,(t+2)/2]) then print((t-2)/2,(t+2)/2,t)); L:=[op(L),[(t-2)/2,(t+2)/2,t]]; fi; od od od; L:=sort(L,(a,b)->a[1]op(z[1..2]),L);
  • Mathematica
    powQ[n_] := GCD @@ FactorInteger[n][[;; , 2]] > 1; aQ[n_] := PrimeQ[n] && PrimeQ[n + 2] && powQ[2 n + 2]; s = Select[Range[10^4], aQ]; Union @ Join[s, s + 2] (* Amiram Eldar, Jan 05 2020 *)
  • PARI
    my(pp=3);forprime(p=5,180000,if(p-pp==2,if(ispower(p+pp),print1(pp,", ",p,", ")));pp=p) \\ Hugo Pfoertner, Jan 05 2020

Formula

If a(n) is the above sequence of twin primes, then a(2n-1),a(2n) is a twin prime pair and a(2n-1)+a(2n) is a power.
a(2*n-1) = A270231(n), a(2*n) = A270231(n) + 2. - Amiram Eldar, Jan 05 2020

Extensions

a(1)-a(2) inserted by Amiram Eldar, Jan 05 2020

A270231 Smaller member of a twin prime pair with a perfect power sum.

Original entry on oeis.org

3, 17, 71, 107, 881, 1151, 2591, 3527, 4049, 15137, 20807, 34847, 46817, 69191, 83231, 103967, 112337, 139967, 149057, 176417, 179999, 206081, 281249, 362951, 388961, 438047, 472391, 478241, 538721, 649799, 734471, 808991, 960497, 1080449, 1143071, 1152161, 1254527
Offset: 1

Views

Author

Altug Alkan, Mar 13 2016

Keywords

Comments

A069496 is a subsequence.

Examples

			3 is a term because 3 + 5 = 2^3.
17 is a term because 17 + 19 = 6^2.
107 is a term because 107 + 109 = 6^3.
139967 is a term because 139967 + 139969 = 6^7.
		

Crossrefs

First bisection of A119768.

Programs

  • Magma
    [p:p in PrimesUpTo(1300000)|IsPrime(p+2) and IsPower(2*p+2)]; // Marius A. Burtea, Dec 20 2019
  • PARI
    t(n,p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
    for(n=1, 1e4, if(ispower(2*t(n)+2), print1(t(n), ", ")));
    

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

A232878 Twin prime pairs which sum to perfect squares.

Original entry on oeis.org

17, 19, 71, 73, 881, 883, 1151, 1153, 2591, 2593, 3527, 3529, 4049, 4051, 15137, 15139, 20807, 20809, 34847, 34849, 46817, 46819, 69191, 69193, 83231, 83233, 103967, 103969, 112337, 112339, 149057, 149059, 176417, 176419, 179999, 180001, 206081, 206083
Offset: 1

Views

Author

Gary Croft, Dec 01 2013

Keywords

Comments

All square roots of twin prime sums in this sequence (see A152786) are multiples of 6.
Digital roots of all pairs in this sequence are {8,1}.
Twin primes of the form 18n^2 +- 1. - Charles R Greathouse IV, Aug 26 2014

Examples

			17+19 = 36, square root of 36 = 6; 71+73 = 144, square root of 144 = 12.
		

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = {2 n^2 - 1, 2 n^2 + 1}; If[PrimeQ[ps[[1]]] && PrimeQ[ps[[2]]], AppendTo[t, ps]], {n, 1000}]; Flatten[t] (* T. D. Noe, Dec 03 2013 *)
  • PARI
    for(n=1,1e3, if(isprime(t=18*n^2-1) && isprime(t+2), print1(t", "t+2", "))) \\ Charles R Greathouse IV, Aug 26 2014

Formula

a(2*n) = a(2*n-1) + 2, a(2*n+1) = A069496(n).

A118593 Larger member of twin prime pairs whose sum is a square.

Original entry on oeis.org

19, 73, 883, 1153, 2593, 3529, 4051, 15139, 20809, 34849, 46819, 69193, 83233, 103969, 112339, 149059, 176419, 180001, 206083, 281251, 362953, 388963, 438049, 472393, 478243, 538723, 649801, 734473, 808993, 960499, 1080451, 1143073
Offset: 1

Views

Author

Cino Hilliard, May 08 2006

Keywords

Examples

			17 and 19 are twin primes whose sum is 36, a square, so 19 is a term in this sequence.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[200000]],2,1],#[[2]]-#[[1]]==2 && IntegerQ[Sqrt[Total[#]]]&]][[2]] (* Harvey P. Dale, Jul 29 2014 *)
  • PARI
    g(n) = for(x=1,n,p1=prime(x);p2=prime(x+1);if(p2-p1==2&issquare(p1+p2),print1(p2",")))

Formula

a(n) = A069496(n) + 2.
Showing 1-10 of 13 results. Next