login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A336404
a(n) = floor(n*frac(prime(n)/pi(n))), where frac denotes the fractional part.
1
0, 1, 2, 3, 2, 1, 6, 6, 2, 2, 4, 10, 2, 12, 13, 7, 12, 7, 17, 2, 19, 5, 21, 19, 5, 12, 24, 26, 9, 16, 29, 15, 21, 19, 26, 3, 22, 35, 16, 31, 38, 27, 34, 3, 9, 3, 41, 6, 13, 27, 48, 3, 37, 3, 24, 46, 54, 17, 31, 44, 17, 3, 17
OFFSET
2,3
COMMENTS
Conjecture: For any m >= 0 there is a k such that a(k) = m. Also for any reals x and epsilon such that 0 < x < 1 and epsilon > 0, there is a k such that abs(x - frac(prime(k)/pi(k))) < epsilon.
MATHEMATICA
a[n_] := Floor[n*FractionalPart[Prime[n]/PrimePi[n]]]; Table[a[n], {n, 2, 2^6}]
PROG
(PARI) a(n) = floor(n*frac(prime(n)/primepi(n))); \\ Michel Marcus, Jul 21 2020
(PARI) first(n) = {my(t = 2, res = vector(n), pit = 0); forprime(p = 3, oo, if(isprime(t), pit++); res[t-1] = floor(t * frac(p/pit)); t++; if(t-1 > n, return(res)))} \\ David A. Corneth, Aug 22 2020
CROSSREFS
Cf. A111114 (floor(prime(n)/pi(n))), A004648 (prime(n) mod n).
Sequence in context: A113908 A355624 A065369 * A370182 A167772 A077870
KEYWORD
nonn
AUTHOR
Andres Cicuttin, Jul 20 2020
STATUS
approved