%I #42 Nov 05 2020 16:11:42
%S 6,8,12,21,33,45,63,80,116,148,182,232,265,296,356,433,490,548,625,
%T 674,740,829,919,1055,1187,1252,1313,1376,1446,1657,1897,2029,2134,
%U 2301,2484,2605,2785,2946,3110,3301,3439,3654,3869,3978,4086,4349,4811,5147,5273,5395,5604,5787,6049,6403,6684,6954,7153
%N Number of times prime(n) (the n-th prime) occurs as the least prime factor among numbers 1 .. (prime(n)^2 * prime(n+1)): a(n) = A078898(A251720(n)).
%C 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.
%C From _Antti Karttunen_, Mar 29 2015: (Start)
%C a(n) = 1 + number of positive integers <= (prime(n)*prime(n+1)) whose smallest prime factor is at least prime(n).
%C 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.
%C Or more simply, by considering the comment given in A256447 which follows from the new interpretation given above.
%C (End)
%H Antti Karttunen, <a href="/A250477/b250477.txt">Table of n, a(n) for n = 1..564</a>
%H Antti Karttunen, <a href="/A250477/a250477.png">Ratio a(n)/A250474(n+1), plotted up to n=65 with OEIS Plot2-utility</a>
%F a(n) = A078898(A251720(n)).
%F 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)].
%F a(n) = A250474(n) + A256447(n).
%t 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 *)
%o (PARI)
%o allocatemem(234567890);
%o A002110(n) = prod(i=1, n, prime(i));
%o A250477(n) = { my(m); m = (prime(n) * prime(n+1)); sumdiv(A002110(n-1), d, (moebius(d)*(m\d))); };
%o for(n=1, 23, print1(A250477(n),", "));
%o \\ A more practical program:
%o (PARI)
%o allocatemem(234567890);
%o vecsize = (2^24)-4;
%o v020639 = vector(vecsize);
%o v020639[1] = 1; for(n=2,vecsize, v020639[n] = vecmin(factor(n)[, 1]));
%o A020639(n) = v020639[n];
%o 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; };
%o for(n=1, 564, write("b250477.txt", n, " ", A250477(n)));
%o \\ _Antti Karttunen_, Mar 29 2015
%Y Column 6 of A249822. Cf. also A250474 (column 4), A250478 (column 8).
%Y First differences: A256446. Cf. also A256447, A256448.
%Y Cf. A002110, A006094, A020639, A078898, A249821, A251720, A281890.
%K nonn
%O 1,1
%A _Antti Karttunen_, Dec 14 2014
|