login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A250474 Number of times prime(n) occurs as the least prime factor among numbers 1 .. prime(n)^3: a(n) = A078898(A030078(n)). 19
4, 5, 9, 14, 28, 36, 57, 67, 93, 139, 154, 210, 253, 272, 317, 396, 473, 504, 593, 658, 687, 792, 866, 979, 1141, 1229, 1270, 1356, 1397, 1496, 1849, 1947, 2111, 2159, 2457, 2514, 2695, 2880, 3007, 3204, 3398, 3473, 3828, 3904, 4047, 4121, 4583, 5061, 5228, 5309, 5474, 5743, 5832, 6269, 6543, 6816, 7107, 7197, 7488, 7686, 7784, 8295, 9029, 9248, 9354, 9568, 10351 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Position of the first composite number (which is always 4) on row n of A249821. The fourth column of A249822.
Position of the first nonfixed term on row n of arrays of permutations A251721 and A251722.
According to the definition, this is the number of multiples of prime(n) below prime(n)^3 (and thus, the number of numbers below prime(n)^2) which do not have a smaller factor than prime(n). That is, the numbers remaining below prime(n)^2 after deleting all multiples of primes less than prime(n), as is done by applying the first n-1 steps of the sieve of Eratosthenes (when the first step is elimination of multiples of 2). This explains that the first differences are a(n+1)-a(n) = A050216(n)-1 for n>1, and a(n) = A054272(n)+2. - M. F. Hasler, Dec 31 2014
LINKS
FORMULA
a(n) = 3 + A000879(n) - n = A054272(n) + 2 = A250473(n) + 1.
a(n) = A078898(A030078(n)).
a(1) = 1, a(n) = Sum_{d|A002110(n-1)} moebius(d)*floor(prime(n)^2/d). [Follows when A030078(n), prime(n)^3 is substituted to the similar formula given for A078898(n). Here A002110(n) gives the product of the first n primes. Because the latter is always squarefree, one could use also Liouville's lambda (A008836) instead of Moebius mu (A008683)].
Other identities. For all n >= 1:
A249821(n, a(n)) = 4.
EXAMPLE
prime(1) = 2 occurs as the least prime factor in range [1,8] for four times (all even numbers <= 8), thus a(1) = 4.
prime(2) = 3 occurs as the least prime factor in range [1,27] for five times (when n is: 3, 9, 15, 21, 27), thus a(2) = 5.
MATHEMATICA
f[n_] := Count[Range[Prime[n]^3], x_ /; Min[First /@ FactorInteger[x]] == Prime@ n]; Array[f, 16] (* Michael De Vlieger, Mar 30 2015 *)
PROG
(PARI)
A250474(n) = 3 + primepi(prime(n)^2) - n; \\ Fast implementation.
for(n=1, 5001, write("b250474.txt", n, " ", A250474(n)));
\\ The following program reflects the given sum formula, but is far from the optimal solution:
allocatemem(234567890);
A002110(n) = prod(i=1, n, prime(i));
A020639(n) = if(1==n, n, vecmin(factor(n)[, 1]));
A055396(n) = if(1==n, 0, primepi(A020639(n)));
A250474(n) = { my(p2 = prime(n)^2); sumdiv(A002110(n-1), d, moebius(d)*(p2\d)); };
for(n=1, 23, print1(A250474(n), ", "));
(Scheme)
(define (A250474 n) (let loop ((k 2)) (if (not (prime? (A249821bi n k))) k (loop (+ k 1))))) ;; This is even slower. Code for A249821bi given in A249821.
CROSSREFS
One more than A250473. Two more than A054272.
Column 4 of A249822.
Cf. also A250477 (column 6), A250478 (column 8).
Sequence in context: A042031 A041493 A352321 * A042765 A041353 A121052
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 23 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 19:05 EDT 2024. Contains 371751 sequences. (Running on oeis4.)