The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A250623 a(n) = floor(n*log(prime(n))) + ceiling(n*log(n)) - 2*prime(n). 1
-4, -2, -2, -1, -2, 0, -1, 2, 2, -1, 2, -1, 0, 3, 4, 2, 0, 4, 1, 3, 8, 7, 8, 6, 1, 2, 8, 10, 16, 18, 3, 5, 4, 9, 2, 8, 7, 6, 8, 8, 7, 13, 5, 12, 15, 22, 10, -1, 2, 9, 13, 12, 19, 12, 12, 12, 11, 18, 18, 22, 29, 22, 8, 12, 19, 23, 8, 8, 2, 9, 13, 13, 11, 11, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
It is known that n*log(n) < prime(n) < n*prime(n), n >= 4. The arithmetic mean of the limits of this inequality is f(n) = (floor((n*log(n)) + ceiling(n*prime(n))))/2. So a(n) is the difference between twice this quantity and 2*prime(n).
LINKS
FORMULA
a(n) = A250621(n) + A050502(n) - 2*A000040(n).
EXAMPLE
a(4) = floor(4*log(7)) + ceiling(4*log(4)) - 2*7 = floor(7.78...) + ceiling(5.54...) - 14 = 7 + 6 - 14 = -1;
a(6) = floor(6*log(13)) + ceiling(6*log(6)) - 2*13 = floor(15.38...) + ceiling(10.75..) - 26 = 15 + 11 - 26 = 0.
MATHEMATICA
a250623[n_] :=
Floor[#*Log[Prime[#]]] + Ceiling[#*Log[#]] - 2*Prime[#] & /@ Range[n]; a250623[137] (* Michael De Vlieger, Dec 26 2014 *)
PROG
(PARI) vector(100, n, floor(n*log(prime(n)))+ceil(n*log(n))-2*prime(n)) \\ Derek Orr, Dec 30 2014
CROSSREFS
Sequence in context: A284398 A285001 A016511 * A123402 A205032 A368203
KEYWORD
sign,easy
AUTHOR
Freimut Marschner, Dec 02 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 11 23:47 EDT 2024. Contains 373319 sequences. (Running on oeis4.)