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.
%I A054272 #43 Apr 03 2016 10:41:22 %S A054272 2,3,7,12,26,34,55,65,91,137,152,208,251,270,315,394,471,502,591,656, %T A054272 685,790,864,977,1139,1227,1268,1354,1395,1494,1847,1945,2109,2157, %U A054272 2455,2512,2693,2878,3005,3202,3396,3471,3826,3902,4045,4119,4581,5059 %N A054272 Number of primes in the interval [prime(n), prime(n)^2]. %C A054272 These primes are candidates for fortunate numbers (A005235). %C A054272 These are precisely the primes available for the solution of Aguilar's conjecture or Haga's conjecture in Carlos Rivera's The Prime Puzzles and Problems Connection, (conjecture 26). Aguilar's conjecture states that at least one prime will be available for placement on each row and column of a p X p square array. Haga's conjecture states that just p primes are required for such placement in any p X p array. - _Enoch Haga_, Jan 23 2002 %C A054272 Also number of times p_n (the n-th prime) occurs as the least prime factor (A020639) among numbers in range [(p_n)+1, ((p_n)^3)-1]. For n=1, p_1 = 2 and there are two even numbers in range [3, 7], namely 4 and 6, so a(1) = 2. See also A250474. - _Antti Karttunen_, Dec 05 2014 %C A054272 The number of consecutive primes after the leading 1 in the prime(n)-rough numbers. - _Benedict W. J. Irwin_, Mar 24 2016 %H A054272 Antti Karttunen, <a href="/A054272/b054272.txt">Table of n, a(n) for n = 1..5000</a> %H A054272 Carlos Rivera, <a href="http://www.primepuzzles.net/conjectures/conj_026.htm">Conjecture 26. The Calendar-like square Conjecture</a>, The Prime Puzzles and Problems Connection. %F A054272 a(n) = A000879(n) - n + 1. %F A054272 From _Antti Karttunen_, Dec 05-08 2014: (Start) %F A054272 a(n) = A250473(n) - 1 = A250474(n) - 2. %F A054272 a(n) = sum_{d | A002110(n)} moebius(d) * floor((p_n)^2 / d). [Where p_n is the n-th prime (A000040(n)) and A002110(n) gives the product of the first n primes. Because the latter is always squarefree, one could also use Liouville's lambda (A008836) instead of Moebius mu (A008683).] %F A054272 The ratio (a(n) * A002110(n)) / (A001248(n) * A005867(n)) stays near 1, which follows from the above summation formula. See also A249747. %F A054272 (End) %e A054272 n=4, the zone in question is [7,49] and encloses a(4)=12 primes, as follows: {7,11,13,17,19,23,29,31,37,41,43,47}. %t A054272 a[n_] := PrimePi[Prime[n]^2] - n + 1; Array[a, 50] (* _Jean-François Alcover_, Dec 07 2015 *) %o A054272 (PARI) %o A054272 \\ A fast version: %o A054272 default(primelimit, 2^31 + 2^30); %o A054272 A054272(n) = 1 + primepi(prime(n)^2) - n; %o A054272 for(n=1, 5000, write("b054272.txt", n, " ", A054272(n))); %o A054272 \\ The following mirrors the given new formula. It is far from an optimal way to compute this sequence: %o A054272 allocatemem(234567890); %o A054272 A002110(n) = prod(i=1, n, prime(i)); %o A054272 A054272(n) = { my(p2); p2 = prime(n)^2; sumdiv(A002110(n), d, moebius(d)*floor(p2/d)); }; %o A054272 for(n=1, 22, print1(A054272(n),", ")); \\ _Antti Karttunen_, Dec 05 2014 %Y A054272 One less than A250473, two less than A250474. %Y A054272 First differences: A251723. %Y A054272 Cf. A000040, A000879, A001248, A002110, A005235, A005867, A008683, A008836, A020639, A078898, A249747. %K A054272 nonn %O A054272 1,1 %A A054272 _Labos Elemer_, May 05 2000