A102613 Numerator of the reduced fractions of the ratios of the number of primes less than n over the number of composites less than n.
0, 1, 2, 1, 3, 1, 4, 1, 4, 2, 5, 5, 6, 3, 2, 3, 7, 7, 8, 2, 8, 4, 9, 3, 9, 9, 1, 9, 10, 1, 11, 11, 1, 11, 11, 11, 12, 6, 4, 3, 13, 13, 14, 7, 14, 7, 15, 5, 15, 3, 5, 15, 16, 8, 16, 2, 16, 8, 17, 17, 18, 9, 2, 9, 18, 3, 19, 19, 19, 19, 20, 5, 21, 21, 7, 21, 3, 7, 22, 11, 22, 11, 23, 23, 23, 23
Offset: 1
Programs
-
PARI
pixovcmpx(n) = for(x=1,n,print1(numerator(pi(x)/(x-pi(x)))",")) pi(n) = \Number of primes less than or equal to n. { local(c,x); c=0;forprime(x=1,n,c++);return(c) }
-
PARI
a(n)=numerator(primepi(n)/(n-primepi(n))) \\ Jason Yuen, Aug 31 2024
Comments