%I #15 Feb 28 2018 11:31:41
%S 2,2,2,4,3,5,3,7,7,3,9,7,5,6,10,11,4,10,7,6,12,7,13,16,8,5,10,4,8,29,
%T 13,13,7,21,3,14,16,12,13,18,4,22,6,14,7,29,31,11,5,12,18,7,27,17,19,
%U 15,6,17,12,6,31,36,17,7,9,44,19,34,4,13,20,29,15,19,11,23,27,11,27,31,7,37
%N Number of squares of primes between cubes of successive primes.
%C Or, number of terms in A001248 between A030078(n) and A030078(n+1).
%H Vincenzo Librandi, <a href="/A138241/b138241.txt">Table of n, a(n) for n = 1..5000</a>
%e First two cubes of primes: between p(1)^3=8 and p(2)^3=27 there are exactly two squares of primes, 9 and 25, hence a(1)=2. Similarly, between p(2)^3=27 and p(3)^3=125, there are exactly 2 squares of primes, 49 and121, hence a(2)=2. (Typo corrected Jul 01 2008.)
%e {n,p(n)^3,p(n+1)^3}, (squares of primes)}, a(n)}
%e n=1: {8,27}, {9,25}, a(n)=2
%e n=2: {27,125}, {49,121}, a(n)=2
%e n=3: {125,343}, {169,289}, a(n)=2
%e n=4: {343,1331}, {361,529,841,961}, a(n)=4
%e n=5: {1331,2197}, {1369,1681,1849}, a(n)=3
%e n=6: {2197,4913}, {2209,2809,3481,3721,4489}, a(n)=5
%e n=7: {4913,6859}, {5041,5329,6241}, a(n)=3
%e n=8: {6859,12167}, {6889,7921,9409,10201,10609,11449,11881}, a(n)=7
%e n=9: {12167,24389}, {12769,16129,17161,18769,19321,22201,22801},a(n)=7
%e n=10: {24389,29791}, {24649,26569,27889}, a(n)=3.
%t Table[PrimePi[Sqrt[Prime[n + 1]]^3] - PrimePi[Sqrt[Prime[n]]^3], {n, 1, 100}] (* _Vincenzo Librandi_, Feb 20 2018 *)
%o (PARI) A138241(n) = primepi(sqrt(prime(n+1)^3)) - primepi(sqrt(prime(n)^3)) \\ _Michael B. Porter_, Dec 18 2009
%Y Cf. A001248 (Squares of primes), A030078 (Cubes of primes).
%K nonn
%O 1,1
%A _Zak Seidov_, May 17 2008
|