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

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,", "))))}

A270696 Perfect powers that are the average of two consecutive primes.

Original entry on oeis.org

4, 9, 64, 81, 144, 225, 324, 441, 625, 1089, 1681, 1728, 2601, 3600, 4096, 5184, 6084, 8464, 12544, 13689, 16641, 17576, 19044, 19600, 21952, 25281, 27225, 28224, 29584, 36864, 38025, 39204, 45369, 46656, 47524, 51984, 56169, 74529, 87025, 88804, 91809, 92416, 95481
Offset: 1

Views

Author

Altug Alkan, Mar 21 2016

Keywords

Comments

The corresponding lesser primes are in A242380. - Michel Marcus, Mar 23 2016

Examples

			1728 is a term because 1728 = 12^3 = (1723 + 1733)/2.
		

Crossrefs

Programs

  • Mathematica
    Select[Mean/@Partition[Prime[Range[10000]],2,1],GCD@@FactorInteger[#][[All,2]]>1&] (* Harvey P. Dale, Jun 22 2022 *)
  • PARI
    for(n=2, 1e5, if((nextprime(n) - n) == (n - precprime(n)) && ispower(n), print1(n, ", ")));
    
  • PARI
    list(lim)=my(v=List(),t); forprime(e=2,logint(lim\=1,2), for(m=2,sqrtnint(lim,e), t=m^e; if(t-precprime(t)==nextprime(t)-t, listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Mar 21 2016
Showing 1-2 of 2 results.