OFFSET
1,1
COMMENTS
a(n) = Position of 6 on row n of array A249821. This is always larger than A250474(n), the position of 4 on row n, as 4 is guaranteed to be the first composite term on each row of A249821.
From Antti Karttunen, Mar 29 2015: (Start)
a(n) = 1 + number of positive integers <= (prime(n)*prime(n+1)) whose smallest prime factor is at least prime(n).
That a(n) > A250474(n) can also be seen by realizing that prime(n) must occur at least as many times as the smallest prime factor for the numbers in range 1 .. (prime(n)^2 * prime(n+1)) than for numbers in (smaller) range 1 .. (prime(n)^3), and also by realizing that a(n) cannot be equal to A250474(n) because each row of A249822 is a permutation of natural numbers.
Or more simply, by considering the comment given in A256447 which follows from the new interpretation given above.
(End)
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..564
Antti Karttunen, Ratio a(n)/A250474(n+1), plotted up to n=65 with OEIS Plot2-utility
FORMULA
a(1) = 1, a(n) = Sum_{d | A002110(n-1)} moebius(d) * floor(A006094(n) / d). [Follows when A251720, (p_n)^2 * p_{n+1} is substituted to the similar formula given for A078898. Here p_n is the n-th prime (A000040(n)), A006094(n) gives the product p_n * p{n+1} and A002110(n) gives the product of the first n primes. Because the latter is always squarefree, one could use here also Liouville's lambda (A008836) instead of Moebius mu (A008683)].
MATHEMATICA
f[n_] := Count[Range[Prime[n]^2*Prime[n + 1]], x_ /; Min[First /@ FactorInteger[x]] == Prime@ n]; Array[f, 20] (* Michael De Vlieger, Mar 30 2015 *)
PROG
(PARI)
allocatemem(234567890);
A002110(n) = prod(i=1, n, prime(i));
for(n=1, 23, print1(A250477(n), ", "));
\\ A more practical program:
(PARI)
allocatemem(234567890);
vecsize = (2^24)-4;
v020639 = vector(vecsize);
v020639[1] = 1; for(n=2, vecsize, v020639[n] = vecmin(factor(n)[, 1]));
A020639(n) = v020639[n];
A250477(n) = { my(p=prime(n), q=prime(n+1), u=p*q, k=1, s=1); while(k <= u, if(A020639(k) >= p, s++); k++); s; };
for(n=1, 564, write("b250477.txt", n, " ", A250477(n)));
\\ Antti Karttunen, Mar 29 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 14 2014
STATUS
approved