This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A248912 #19 Mar 05 2022 14:16:54 %S A248912 4,3,2,3,2,3,1,2,4,2,4,4,2,2,4,6,3,5,5,2,3,3,4,7,7,4,3,0,-1,8,7,8,5, %T A248912 10,7,7,8,7,8,8,5,10,6,5,1,8,14,13,9,8,8,5,9,9,10,10,6,7,5,1,5,13,12, %U A248912 8,6,14,14,18,14,12,12,14,14,14,12,12,14,12,14 %N A248912 a(n) = floor(prime(n) - (n+1)*(log(n) + log(log(n))) + n) for n > 1. %C A248912 The function log gives the natural logarithm (to base e). %C A248912 a(30) = -1 is the unique negative value. %C A248912 See A059112 for floor( prime(n) - n*log(n) - n*log(log(n)) + n ) where prime(n) is the n-th prime. %H A248912 Michel Lagneau, <a href="/A248912/b248912.txt">Table of n, a(n) for n = 2..20000</a> %e A248912 a(8) = 1 because floor(prime(8)-(8+1)*(log(8)+log(log(8))) + 8) = floor(19-9*(2.0794415...+0.7320993...) + 8) = floor(1.6961318...) = 1. %p A248912 with(numtheory):for n from 1 to 200 do:p:=floor(evalf(ithprime(n)-(n+1)*ln(n)- (n+1)*ln(ln(n)) + n)): printf(`%d, `,p):od: %t A248912 Table[Floor[Prime[n]-(n+1)*(Log[n]+Log[Log[n]])+n], {n,2, 100}] %o A248912 (Magma) [Floor(NthPrime(n)-(n+1)*(Log(n)+Log(Log(n)))+n): n in [2..80]]; // _Vincenzo Librandi_, Oct 16 2014 %o A248912 (PARI) a(n) = floor(prime(n)-(n+1)*(log(n)+log(log(n))) + n); \\ _Michel Marcus_, Mar 05 2022 %Y A248912 Cf. A000040, A059111, A059112, A248911. %K A248912 sign %O A248912 2,1 %A A248912 _Michel Lagneau_, Oct 16 2014