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.

This page as a plain text file.
%I A234240 #20 Oct 27 2023 21:39:37
%S A234240 64,1728,4096,17576,21952,46656,110592,195112,287496,314432,405224,
%T A234240 474552,1061208,1191016,1404928,1601613,1906624,2000376,2146689,
%U A234240 2197000,3241792,3511808,4913000,5268024,6229504,6751269,6859000,7077888,11239424,20346417,21952000
%N A234240 Cubes which are arithmetic mean of two consecutive primes.
%H A234240 Alois P. Heinz, <a href="/A234240/b234240.txt">Table of n, a(n) for n = 1..1000</a> (terms n = 1..57 from K. D. Bajpai)
%F A234240 a(n) = A075191(n)^3.
%e A234240 64 is in the sequence because cube 64 = 4^3 = (61+67)/2 is arithmetic mean of two consecutive primes.
%e A234240 1728 is in the sequence because 1728 = 12^3 = (1723+1733)/2.
%p A234240 a:= proc(n) option remember; local k, kk, p, q;
%p A234240       for k from 1 +`if`(n=1, 1, iroot(a(n-1), 3))
%p A234240       do kk:= k^3; p, q:= prevprime(kk), nextprime(kk);
%p A234240          if (p+q)/2=kk then return kk fi
%p A234240       od
%p A234240     end:
%p A234240 seq(a(n), n=1..60);  # _Alois P. Heinz_, Dec 21 2013
%t A234240 Select[Mean/@Partition[Prime[Range[1500000]],2,1],IntegerQ[Surd[#,3]]&] (* _Harvey P. Dale_, Oct 08 2014 *)
%t A234240 Select[Range[300]^3,#==Mean[{NextPrime[#],NextPrime[#,-1]}]&] (* _Harvey P. Dale_, Sep 02 2015 *)
%o A234240 (PARI) is(n)=nextprime(n)+precprime(n)==2*n && ispower(n,3)
%o A234240 for(n=8,1e4,if(is(n^3), print1(n^3", "))) \\ _Charles R Greathouse IV_, Aug 25 2014
%Y A234240 Cf. A000578, A062703, A069495, A075191.
%K A234240 nonn
%O A234240 1,1
%A A234240 _K. D. Bajpai_, Dec 21 2013