Displaying 1-10 of 1995 results found.
page
1
2
3
4
5
6
7
8
9
10
... 200
The pi-based arithmetic derivative of n: a(p) = pi(p) for p prime, a(u*v) = a(u)*v + u*a(v), where pi = A000720.
+20
50
0, 0, 1, 2, 4, 3, 7, 4, 12, 12, 11, 5, 20, 6, 15, 19, 32, 7, 33, 8, 32, 26, 21, 9, 52, 30, 25, 54, 44, 10, 53, 11, 80, 37, 31, 41, 84, 12, 35, 44, 84, 13, 73, 14, 64, 87, 41, 15, 128, 56, 85, 55, 76, 16, 135, 58, 116, 62, 49, 17, 136, 18, 53, 120, 192, 69, 107
COMMENTS
The pi-based variant of the arithmetic derivative of n ( A003415).
FORMULA
a(n) = n * Sum e_j*pi(p_j)/p_j for n = Product p_j^e_j with pi = A000720.
a(a(a( A258995(n)))) = n; A258995 = third pi-based antiderivative of n.
a(0) = a(0*p) = a(0)*p + 0*a(p) = a(0)*p for all p => a(0) = 0.
a(p) = a(1*p) = a(1)*p + 1*a(p) = a(1)*p + a(p) for all p => a(1) = 0.
a(u^v) = v * u^(v-1) * a(u).
MAPLE
with(numtheory):
a:= n-> n*add(i[2]*pi(i[1])/i[1], i=ifactors(n)[2]):
seq(a(n), n=0..100);
MATHEMATICA
a[n_] := n*Total[Last[#]*PrimePi[First[#]]/First[#]& /@ FactorInteger[n]]; a[0] = 0; Array[a, 100, 0] (* Jean-François Alcover, Apr 24 2016 *)
PROG
(PARI) A258851(n)=n*sum(i=1, #n=factor(n)~, n[2, i]*primepi(n[1, i])/n[1, i]) \\ M. F. Hasler, Jul 13 2015
a(n) = |{0 < k < n: pi(k*n) is prime}|, where pi(.) is given by A000720.
+20
31
0, 0, 2, 2, 1, 3, 2, 1, 2, 2, 4, 4, 1, 4, 2, 5, 5, 6, 2, 5, 4, 6, 3, 7, 3, 3, 7, 5, 5, 5, 10, 9, 3, 7, 6, 5, 12, 3, 3, 9, 10, 11, 12, 7, 3, 5, 11, 9, 7, 10, 12, 9, 10, 8, 12, 11, 10, 17, 15, 13, 14, 18, 4, 17, 10, 9, 15, 11, 14, 11, 23, 11, 9, 13, 12, 12, 12, 11, 14, 16
COMMENTS
Conjecture: a(n) > 0 for all n > 2, and a(n) = 1 only for n = 5, 8, 13. Moreover, for each n = 1, 2, 3, ..., there is a positive integer k < 3*sqrt(n) + 3 with pi(k*n) prime.
Note that the least positive integer k with pi(k*38) prime is 21 < 3*sqrt(38) + 3 < 21.5.
EXAMPLE
a(5) = 1 since pi(1*5) = 3 is prime.
a(8) = 1 since pi(4*8) = 11 is prime.
a(13) = 1 since pi(10*13) = pi(130) = 31 is prime.
a(38) = 3 since pi(21*38) = pi(798) = 139, pi(28*38) = pi(1064) = 179 and pi(31*38) = pi(1178) = 193 are all prime.
MATHEMATICA
a[n_]:=Sum[If[PrimeQ[PrimePi[k*n]], 1, 0], {k, 1, n-1}]
Table[a[n], {n, 1, 80}]
a(n) = Sum_{k=1..n} pi(k) (cf. A000720).
+20
30
0, 1, 3, 5, 8, 11, 15, 19, 23, 27, 32, 37, 43, 49, 55, 61, 68, 75, 83, 91, 99, 107, 116, 125, 134, 143, 152, 161, 171, 181, 192, 203, 214, 225, 236, 247, 259, 271, 283, 295, 308, 321, 335, 349, 363, 377, 392, 407, 422, 437, 452, 467, 483, 499, 515, 531, 547, 563, 580, 597, 615, 633, 651, 669
COMMENTS
Let S(n) be a string of length n, then a(n) is the number of substrings of S(n) with a prime number of characters. Example 1: "abcd" is a string of length 4; there are a(4)=5 substrings with a prime number of characters (ab, bc, cd, abc and bcd). Example 2: "abcde" is a string of length 5; there are a(5)=8 substrings with a prime number of characters (ab, bc, cd, de, abc, bcd, cde and abcde).
Also: If n is represented in base 1 (this means 1=1_1, 2=11_1, 3=111_1, 4=1111_1, etc.), then a(n) is the number of substrings of n with a prime number of digits. Example: 7=1111111_1; the number of prime substrings of 7 (in base 1) is a(7)=15, since there are 15 substrings of prime length: 6 2-digit substrings, 5 3-digit substrings, 3 5-digit substrings and 1 7-digit substring.
(End)
FORMULA
a(n) = Sum_{p<=n, p is prime} (n - p +1).
a(n) = (n+1)*pi(n) - Sum_pi(n), where pi(n) = number of primes <= n and Sum_pi(n) = sum of primes <= n.
(End)
MATHEMATICA
f[n_] := (f[n - 1] + PrimePi[n]); f[1] = 0; Table[ f[n], {n, 1, 60}]
PROG
(Haskell)
a046992 n = a046992_list !! (n-1)
a046992_list = scanl1 (+) a000720_list
(Python)
from sympy import primerange
def A046992(n): return (n+1)*len(p:=list(primerange(n+1)))-sum(p) # Chai Wah Wu, Jan 01 2024
a(n) = pi(n) - pi(floor(n/2)), where pi is A000720.
+20
26
0, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 2, 2, 2, 3, 3, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 4, 4, 5, 5, 5, 4, 4, 4, 5, 4, 4, 4, 5, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 6, 7, 7, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 9, 9, 9, 9, 9, 10, 10, 10, 9, 10, 10, 10, 9, 9, 9, 10, 10, 10, 10, 10, 9, 9, 9, 10, 10
COMMENTS
Also, the number of unitary prime divisors of n!. A prime divisor of n is unitary iff its exponent is 1 in the prime power factorization of n. In general, gcd(p, n/p) = 1 or p. Here we count the cases when gcd(p, n/p) = 1.
A unitary prime divisor of n! is >= n/2, hence their number is pi(n) - pi(n/2). - Peter Luschny, Mar 13 2011
First occurrence of k is at n = A080359(k).
The last occurrence of k is at n = A080360(k).
The number of times k appears is A080362(k). (End)
Lev Schnirelmann proved that for every n, a(n) > (1/log_2(n))*(n/3 - 4*sqrt(n)) - 1 - (3/2)*log_2(n). - Arkadiusz Wesolowski, Nov 03 2017
EXAMPLE
10! = 2^8 * 3^2 * 5^2 * 7. The only unitary prime divisor is 7, so a(10) = 1.
MAPLE
numtheory[pi](x)-numtheory[pi](floor(x/2)) ;
end proc:
A056171 := n -> nops(select(isprime, [$iquo(n, 2)+1..n])):
MATHEMATICA
s=0; Table[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; s, {k, 100}]
Table[PrimePi[n]-PrimePi[Floor[n/2]], {n, 100}] (* Harvey P. Dale, Sep 01 2015 *)
PROG
(Python)
from sympy import primepi
[primepi(n) - primepi(n//2) for n in range(1, 151)] # Indranil Ghosh, Mar 22 2017
a(n) is smallest number m such that m = n*pi(m), where pi(k) = number of primes <= k ( A000720).
+20
22
2, 27, 96, 330, 1008, 3059, 8408, 23526, 64540, 175197, 480852, 1304498, 3523884, 9557955, 25874752, 70115412, 189961182, 514272411, 1394193580, 3779849598, 10246935644, 27788566029, 75370121160, 204475052375, 554805820452, 1505578023621, 4086199301996, 11091501630949
COMMENTS
Golomb shows that solutions exist for each n>1.
Equivalently, for n > 1, least m such that m >= n*pi(m). - Eric M. Schmidt, Aug 05 2014
The values a(26),...,a(50) were calculated with the Eratosthenes sieve making use of strong bounds for pi(x), which follow from partial knowledge of the Riemann hypothesis, and the analytic method for calculating initial values of pi(x). - Jan Büthe, Jan 16 2015
EXAMPLE
pi(3059) = 437 and 3059/437 = 7, so a(7)=3059.
MAPLE
with(numtheory); f:=proc(n) local i; for i from 2 to 10000 do if i mod pi(i) = 0 and i/pi(i) = n then RETURN(i); fi; od: RETURN(-1); end; # N. J. A. Sloane, Sep 01 2008
MATHEMATICA
t = {}; k = 2; Do[While[n*PrimePi[k] != k, k++]; AppendTo[t, k], {n, 2, 15}]; t (* Jayanta Basu, Jul 10 2013 *)
PROG
(PARI)
a(n)=my(k=1); while(k!=n*primepi(k), k++); k;
for (n=2, 20, print1(a(n), ", ")); \\ Derek Orr, Aug 13 2014
(Python)
from math import exp
from sympy import primepi
def a(n):
m = 2 if n == 2 else int(exp(n)) # pi(m) > m/log(m) for m >= 17
while m != n*primepi(m): m += 1
return m
EXTENSIONS
24 terms added and entry a(26) corrected by Jan Büthe, Jan 07 2015
a(n) = pi(n) + n, where pi(n) = A000720(n) is the number of primes <= n.
+20
18
0, 1, 3, 5, 6, 8, 9, 11, 12, 13, 14, 16, 17, 19, 20, 21, 22, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 54, 55, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 76, 77, 79, 80, 81, 82, 83, 84, 86, 87, 88, 89, 91
COMMENTS
There exists at least one prime number p such that n < p <= a(n) for n >= 2. For example, 2 is in (2, 3], 5 in (3, 5], 5 in (4, 6], ..., and primes 73, 79, 83 and 89 are in (71, 91] (see Corollary 1 in the paper by Ya-Ping Lu attached in the links section). - Ya-Ping Lu, Feb 21 2021
PROG
(Haskell)
(Python)
from sympy import primepi
def a(n): return primepi(n) + n
2, 3, 4, 8, 10, 14, 20, 90
COMMENTS
Leo Moser proved in 1951 that these are the only terms, but he missed the term 10. - Amiram Eldar, May 15 2017
phi(n) >= pi(n) for n >= 61, and phi(n) > pi(n) for n > 90. - Jonathan Sondow, Dec 02 2017
REFERENCES
P. Birch and D. Singmaster, An elementary number theory result, Math. Soc. Newsl., 12 (1984), 10-13.
D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, p. 11.
EXAMPLE
phi(10)=4, pi(10)=4.
a(1)=2 since k=2 is the lowest index for which A000720(n) = A000010(n), i.e., EulerPhi(n) = PrimePi(n). - M. F. Hasler, Mar 30 2007
MAPLE
select(x->numtheory[phi](x)=numtheory[pi](x), [$1..999]); # M. F. Hasler, Mar 30 2007
PROG
(PARI) for(n=1, 1e5, if(primepi(n)==eulerphi(n), print(n))) /* M. F. Hasler, Mar 30 2007 */
Number of primes p < n with pi(n-p) prime, where pi(.) is given by A000720.
+20
14
0, 0, 0, 0, 1, 2, 2, 3, 2, 2, 2, 1, 2, 3, 2, 3, 3, 2, 3, 3, 2, 4, 4, 3, 3, 1, 1, 3, 3, 2, 2, 1, 2, 6, 6, 5, 5, 4, 3, 5, 5, 4, 5, 5, 4, 6, 6, 6, 6, 3, 3, 5, 5, 5, 5, 2, 2, 5, 5, 3, 4, 5, 4, 8, 8, 3, 3, 1, 2, 8
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 4, and a(n) = 1 only for n = 5, 12, 26, 27, 32, 68.
(ii) For any integer n > 5, there is a prime p <= n with pi(n+p) prime.
(iii) If n > 32, then pi((n-p)^2) is prime for some prime p < n. Also, for each n > 6 there is an odd prime p < 2*n with pi((n - (p-1)/2)^2) prime.
(iv) Any integer n > 11 can be written as p + q with p and pi(q^2 + q + 1) both prime.
(v) Each integer n > 34 can be written as k + m with k and m positive integers such that pi(k^2) and pi(2*m^2) are both prime.
EXAMPLE
a(5) = 1 since 2 and pi(5-2) = pi(3) = 2 are both prime.
a(12) = 1 since 7 and pi(12-7) = pi(5) = 3 are both prime.
a(15) = 2 since 3 and pi(15-3) = pi(12) = 5 are both prime, and 11 and pi(15-11) = pi(4) = 2 are both prime.
a(26) = 1 since 23 and pi(26-23) = 2 are both prime.
a(27) = 1 since 23 and pi(27-23) = 2 are both prime.
a(32) = 1 since 29 and pi(32-29) = 2 are both prime.
a(68) = 1 since 37 and pi(68-37) = pi(31) = 11 are both prime.
MATHEMATICA
q[n_]:=PrimeQ[PrimePi[n]]
a[n_]:=Sum[If[q[n-Prime[k]], 1, 0], {k, 1, PrimePi[n-1]}]
Table[a[n], {n, 1, 70}]
The second Fibonacci based variant of arithmetic derivative: a(p) = A000045(2+ A000720(p)) for prime p, a(u*v) = a(u)*v + u*a(v), with a(0) = a(1) = 0. Also called PrimePi-Fibonacci variant of the arithmetic derivative.
+20
14
0, 0, 2, 3, 8, 5, 12, 8, 24, 18, 20, 13, 36, 21, 30, 30, 64, 34, 54, 55, 60, 45, 48, 89, 96, 50, 68, 81, 88, 144, 90, 233, 160, 72, 102, 75, 144, 377, 148, 102, 160, 610, 132, 987, 140, 135, 224, 1597, 240, 112, 150, 153, 188, 2584, 216, 120, 232, 222, 346, 4181, 240, 6765, 528, 198, 384, 170, 210, 10946, 272, 336, 220, 17711, 360
FORMULA
a(n) = n * Sum e_j * A000045(2+ A000720(p_j))/p_j for n = Product p_j^e_j.
PROG
(PARI) A328846(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]*fibonacci(2+primepi(f[i, 1]))/f[i, 1]));
a(n) = |{0 < k < prime(n): pi(k*n) is a square}|, where pi(.) is given by A000720.
+20
13
1, 1, 1, 2, 2, 2, 4, 3, 5, 2, 3, 5, 3, 6, 1, 2, 3, 3, 5, 3, 5, 2, 6, 4, 4, 5, 3, 6, 4, 3, 2, 5, 3, 4, 3, 4, 4, 3, 6, 4, 3, 4, 2, 1, 2, 9, 3, 4, 4, 4, 5, 7, 4, 7, 3, 6, 7, 3, 7, 7, 5, 1, 4, 5, 3, 3, 10, 5, 4, 7
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 0.
(ii) For each n > 9, there is a positive integer k < prime(n)/2 such that pi(k*n) is a triangular number.
See also A237612 for the least k > 0 with pi(k*n) a square.
EXAMPLE
a(3) = 1 since pi(3*3) = 2^2 with 3 < prime(3) = 5.
a(6) = 2 since pi(4*6) = 3^2 with 4 < prime(6) = 13, and pi(9*6) = 4^2 with 9 < prime(6) = 13.
a(15) = 1 since pi(28*15) = 9^2 with 28 < prime(15) = 47.
a(62) = 1 since pi(68*62) = 24^2 with 68 < prime(62) = 293.
a(459) = 1 since pi(2544*459) = 301^2 with 2544 < prime(459) = 3253.
MATHEMATICA
sq[n_]:=IntegerQ[Sqrt[PrimePi[n]]]
a[n_]:=Sum[If[sq[k*n], 1, 0], {k, 1, Prime[n]-1}]
Table[a[n], {n, 1, 70}]
Search completed in 0.754 seconds
|