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

%I #47 Mar 31 2015 06:18:32

%S 4,5,9,14,28,36,57,67,93,139,154,210,253,272,317,396,473,504,593,658,

%T 687,792,866,979,1141,1229,1270,1356,1397,1496,1849,1947,2111,2159,

%U 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

%N Number of times prime(n) occurs as the least prime factor among numbers 1 .. prime(n)^3: a(n) = A078898(A030078(n)).

%C Position of the first composite number (which is always 4) on row n of A249821. The fourth column of A249822.

%C Position of the first nonfixed term on row n of arrays of permutations A251721 and A251722.

%C 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

%H Antti Karttunen, <a href="/A250474/b250474.txt">Table of n, a(n) for n = 1..5001</a>

%F a(n) = 3 + A000879(n) - n = A054272(n) + 2 = A250473(n) + 1.

%F a(n) = A078898(A030078(n)).

%F 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)].

%F Other identities. For all n >= 1:

%F A249821(n, a(n)) = 4.

%e prime(1) = 2 occurs as the least prime factor in range [1,8] for four times (all even numbers <= 8), thus a(1) = 4.

%e 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.

%t f[n_] := Count[Range[Prime[n]^3], x_ /; Min[First /@ FactorInteger[x]] == Prime@ n]; Array[f, 16] (* _Michael De Vlieger_, Mar 30 2015 *)

%o (PARI)

%o A250474(n) = 3 + primepi(prime(n)^2) - n; \\ Fast implementation.

%o for(n=1, 5001, write("b250474.txt", n, " ", A250474(n)));

%o \\ The following program reflects the given sum formula, but is far from the optimal solution:

%o allocatemem(234567890);

%o A002110(n) = prod(i=1, n, prime(i));

%o A020639(n) = if(1==n,n,vecmin(factor(n)[,1]));

%o A055396(n) = if(1==n,0,primepi(A020639(n)));

%o A250474(n) = { my(p2 = prime(n)^2); sumdiv(A002110(n-1), d, moebius(d)*(p2\d)); };

%o for(n=1, 23, print1(A250474(n),", "));

%o (Scheme)

%o (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.

%Y One more than A250473. Two more than A054272.

%Y Column 4 of A249822.

%Y Cf. also A250477 (column 6), A250478 (column 8).

%Y Cf. A000040, A000879, A001248, A002110, A005867, A008683, A008836, A020639, A030078, A055396, A078898, A249821, A251721, A251722.

%K nonn

%O 1,1

%A _Antti Karttunen_, Nov 23 2014

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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)