login
a(n) = floor(n*frac(prime(n)/pi(n))), where frac denotes the fractional part.
1

%I #24 Oct 05 2020 01:14:01

%S 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,

%T 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,

%U 24,46,54,17,31,44,17,3,17

%N a(n) = floor(n*frac(prime(n)/pi(n))), where frac denotes the fractional part.

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

%H Andres Cicuttin, <a href="/A336404/a336404.pdf">Graph of first 100000 terms</a>

%H Andres Cicuttin, <a href="/A336404/a336404_1.pdf">Graphs of the fractional part of prime(n)/pi(n) and its first differences of the first 2^16 terms</a>

%t a[n_] := Floor[n*FractionalPart[Prime[n]/PrimePi[n]]]; Table[a[n], {n, 2, 2^6}]

%o (PARI) a(n) = floor(n*frac(prime(n)/primepi(n))); \\ _Michel Marcus_, Jul 21 2020

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

%Y Cf. A111114 (floor(prime(n)/pi(n))), A004648 (prime(n) mod n).

%K nonn

%O 2,3

%A _Andres Cicuttin_, Jul 20 2020