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.

A234240 Cubes which are arithmetic mean of two consecutive primes.

Original entry on oeis.org

64, 1728, 4096, 17576, 21952, 46656, 110592, 195112, 287496, 314432, 405224, 474552, 1061208, 1191016, 1404928, 1601613, 1906624, 2000376, 2146689, 2197000, 3241792, 3511808, 4913000, 5268024, 6229504, 6751269, 6859000, 7077888, 11239424, 20346417, 21952000
Offset: 1

Views

Author

K. D. Bajpai, Dec 21 2013

Keywords

Examples

			64 is in the sequence because cube 64 = 4^3 = (61+67)/2 is arithmetic mean of two consecutive primes.
1728 is in the sequence because 1728 = 12^3 = (1723+1733)/2.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k, kk, p, q;
          for k from 1 +`if`(n=1, 1, iroot(a(n-1), 3))
          do kk:= k^3; p, q:= prevprime(kk), nextprime(kk);
             if (p+q)/2=kk then return kk fi
          od
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Dec 21 2013
  • Mathematica
    Select[Mean/@Partition[Prime[Range[1500000]],2,1],IntegerQ[Surd[#,3]]&] (* Harvey P. Dale, Oct 08 2014 *)
    Select[Range[300]^3,#==Mean[{NextPrime[#],NextPrime[#,-1]}]&] (* Harvey P. Dale, Sep 02 2015 *)
  • PARI
    is(n)=nextprime(n)+precprime(n)==2*n && ispower(n,3)
    for(n=8,1e4,if(is(n^3), print1(n^3", "))) \\ Charles R Greathouse IV, Aug 25 2014

Formula

a(n) = A075191(n)^3.