A250477 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)).
6, 8, 12, 21, 33, 45, 63, 80, 116, 148, 182, 232, 265, 296, 356, 433, 490, 548, 625, 674, 740, 829, 919, 1055, 1187, 1252, 1313, 1376, 1446, 1657, 1897, 2029, 2134, 2301, 2484, 2605, 2785, 2946, 3110, 3301, 3439, 3654, 3869, 3978, 4086, 4349, 4811, 5147, 5273, 5395, 5604, 5787, 6049, 6403, 6684, 6954, 7153
Offset: 1
Keywords
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
Crossrefs
Programs
-
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 *)
-
PARI
allocatemem(234567890); A002110(n) = prod(i=1, n, prime(i)); A250477(n) = { my(m); m = (prime(n) * prime(n+1)); sumdiv(A002110(n-1), d, (moebius(d)*(m\d))); }; 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
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)].
Comments