login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A248912 a(n) = floor( prime(n)-(n+1)*(log(n)+log(log(n))+ n ) for n>1. 1
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, 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, 8, 6, 14, 14, 18, 14, 12, 12, 14, 14, 14, 12, 12, 14, 12, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

The function log gives the natural logarithm (to base e).

a(30) = -1 is the unique negative value.

See A059112 for floor( p(n) - n*log(n) - n*log(log(n)) + n ) where p(n) is n-th prime.

LINKS

Michel Lagneau, Table of n, a(n) for n = 2..20000

EXAMPLE

a(8) = 1 because floor(prime(8)-(8+1)*(log(8)+log(log(8))+ 8) = floor(19-9*(2.0794415...+.7320993...)+ 8) = floor(1.6961318...) = 1.

MAPLE

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:

MATHEMATICA

Table[Floor[Prime[n]-(n+1)*(Log[n]+Log[Log[n]])+n], {n, 2, 100}]

PROG

(MAGMA) [Floor((NthPrime(n)-(n+1)*(Log(n)+Log(Log(n)))+n)): n in [2..80]]; // Vincenzo Librandi, Oct 16 2014

CROSSREFS

Cf. A000040, A059111, A059112, A248911.

Sequence in context: A010307 A001178 A016501 * A152062 A084255 A247847

Adjacent sequences:  A248909 A248910 A248911 * A248913 A248914 A248915

KEYWORD

sign

AUTHOR

Michel Lagneau, Oct 16 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 02:50 EDT 2020. Contains 337289 sequences. (Running on oeis4.)