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.

A091625 Number of consecutive primes less than 10^n such that their sum is a perfect power (A091624).

Original entry on oeis.org

1, 5, 8, 17, 34, 87, 203, 510, 1331
Offset: 1

Views

Author

Robert G. Wilson v, Jan 24 2004

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; PrimeExponents[n_] := Flatten[ Table[ #[[2]], {1}] & /@ FactorInteger[n]]; c = 0; p = q = 2; Do[ While[p < 10^n, q = NextPrim[p]; If[ Apply[ GCD, PrimeExponents[p + q]] > 1, c++ ]; p = q]; Print[c], {n, 1, 8}]

A061275 Smaller of two consecutive primes whose sum is a square.

Original entry on oeis.org

17, 47, 71, 283, 881, 1151, 1913, 2591, 3527, 4049, 6047, 7193, 7433, 15137, 20807, 21617, 24197, 26903, 28793, 34847, 46817, 53129, 56443, 69191, 74489, 83231, 84047, 98563, 103049, 103967, 109507, 110441, 112337, 136237, 149057, 151247
Offset: 1

Views

Author

Amarnath Murthy, Apr 25 2001

Keywords

Examples

			a(4) = 283, the next prime is 293 and 283 + 293 = 576 = 24^2.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[20000]],2,1],IntegerQ[Sqrt[Plus@@# ]]&]][[1]] (* Harvey P. Dale, Aug 04 2009 *)
  • PARI
    { default(primelimit, 550655327); n=0; q=2; forprime (p=3, 550655327, if (issquare(p+q), write("b061275.txt", n++, " ", q)); q=p ) } \\ Harry J. Smith, Jul 20 2009

Formula

a(n) = A000040(A064397(n)). - Amiram Eldar, Jun 28 2024

Extensions

More terms from Larry Reeves (larryr(AT)acm.org) and Asher Auel, May 15 2001
Offset changed from 0 to 1 by Harry J. Smith, Jul 20 2009

A242380 Lesser of consecutive primes whose average is a perfect power.

Original entry on oeis.org

3, 7, 61, 79, 139, 223, 317, 439, 619, 1087, 1669, 1723, 2593, 3593, 4093, 5179, 6079, 8461, 12541, 13687, 16633, 17573, 19037, 19597, 21943, 25261, 27211, 28219, 29581, 36857, 38011, 39199, 45361, 46649, 47521, 51977, 56167, 74527, 87013, 88801, 91807, 92413, 95479
Offset: 1

Views

Author

Antonio Roldán, May 12 2014

Keywords

Examples

			4093 is in the sequence because 4093 and 4099 are consecutive primes and (4093 + 4099)/2 = 4096 = 2^12.
		

Crossrefs

Supersequence of A225195 and A242382.
Cf. A091624.

Programs

  • Mathematica
    Select[Partition[Prime[Range[2, 10^4]], 2, 1], GCD @@ FactorInteger[(First[#] + Last[#])/2][[;; , 2]] > 1 &][[;; , 1]] (* Amiram Eldar, Jul 04 2022 *)
  • PARI
    for(i=3, 10^5, if(isprime(i), k=(i+nextprime(i+1))/2; if(ispower(k), print1(i, ", "))))

A071352 Numbers n such that the sum of two consecutive primes prime(n+1) + prime(n) is a prime power, say q^w. The w values are in A071087.

Original entry on oeis.org

1, 2, 18, 564, 1462626667154509638735
Offset: 1

Views

Author

Labos Elemer, May 21 2002

Keywords

Examples

			n=1: p(2)+p(1) = 3+2 = 5^1
n=2: p(3)+p(2) = 5+3 = 2^3
n=18: p(19)+p(18) = 61+67 = 2^7
n=564: p(565)+p(564) = 4099+4093 = 2^13
		

Crossrefs

Programs

  • Mathematica
    Do[s=Prime[n+1]+Prime[n]; If[Equal[Length[FactorInteger[s]], 1], Print[{n, Prime[n], s}]], {n, 1, 10000000}]
    p = q = 2; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[q = NextPrim[p]; If[ Length[ Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[p + q]]] == 1, Print[n]]; p = q, {n, 1, 10^7}] (* Robert G. Wilson v, Jan 24 2004 *)

Formula

For n>1, a(n) = A007053(A071087(n)-1). - Max Alekseyev, Jul 27 2009

Extensions

a(5) added by Max Alekseyev, Feb 10 2011

A242382 Lesser of consecutive primes whose average is a perfect cube.

Original entry on oeis.org

61, 1723, 4093, 17573, 21943, 46649, 110587, 195103, 287491, 314423, 405221, 474547, 1061189, 1191013, 1404919, 1601609, 1906621, 2000371, 2146687, 2196979, 3241783, 3511799, 4912991, 5268017, 6229501, 6751267, 6858997, 7077883, 11239421, 20346407, 21951997, 26198063
Offset: 1

Views

Author

Antonio Roldán, May 12 2014

Keywords

Examples

			1723 is in the sequence because it is prime, nextprime(1723) = 1733, and average(1723,1733) = 1728 = 12^3.
		

Crossrefs

Subsequence of A077037 and A242380.

Programs

  • Mathematica
    Select[Partition[Prime[Range[2, 10^5]], 2, 1], IntegerQ[Surd[(First[#] + Last[#])/2, 3]] &][[;; , 1]] (* Amiram Eldar, Jul 04 2022 *)
  • PARI
    {for(i=3,3*10^7,if(isprime(i),k=(i+nextprime(i+1))/2;if(ispower(k,3),print1(i,", "))))}

A125661 Primes p such that p + next prime = 2^k for some k.

Original entry on oeis.org

3, 61, 4093, 75557863725914323419121, 3064991081731777716716694054300618367237478244367204187
Offset: 1

Views

Author

J. M. Bergot, Feb 02 2007

Keywords

Comments

The next term is too large to include - see the b-file.

Examples

			3+5=8=2^3
61+67=128=2^7
		

Crossrefs

Cf. A091624.

Programs

  • Mathematica
    Select[Prime[Range[10^6]],Total[IntegerDigits[#+NextPrime[#],2]]==1&] (* James C. McMahon, Dec 19 2024 *)

Extensions

Corrected by N. J. A. Sloane, Feb 05 2007
Extended by Hans Havermann, Feb 05 2007

A245360 Perfect powers which are the sum of two consecutive primes.

Original entry on oeis.org

8, 36, 100, 128, 144, 216, 576, 1764, 2304, 3844, 5184, 7056, 8100, 8192, 12100, 14400, 14884, 21952, 30276, 41616, 43264, 48400, 53824, 57600, 69696, 74088, 93636, 106276, 112896, 138384, 148996, 166464, 168100, 197136, 206116, 207936, 219024, 220900, 224676, 272484, 279936
Offset: 1

Views

Author

Derek Orr, Jul 18 2014

Keywords

Examples

			47 + 53 = 100 = 10^2, so 100 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Total/@Partition[Prime[Range[13100]],2,1],GCD@@FactorInteger[#][[All,2]]>1&] (* Harvey P. Dale, Jan 22 2019 *)
  • PARI
    for(n=1,10^5,q=prime(n)+prime(n+1);if(ispower(q),print1(q,", ")))
    
  • PARI
    m=10^8; v=[]; forstep(b=2, sqrt(m), 2, forprime(p=2, 40, n=b^p; if(n>m,break); if(n==precprime(n/2)+nextprime(n/2+1), v=concat(v,n)))); v=vecsort(v) \\ Faster program. Jens Kruse Andersen, Jul 20 2014
Showing 1-7 of 7 results.