cp's OEIS Frontend

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.

A250623 a(n) = floor(n*log(prime(n))) + ceiling(n*log(n)) - 2*prime(n).

This page as a plain text file.
%I A250623 #29 Mar 29 2015 10:55:42
%S A250623 -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,
%T A250623 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,
%U A250623 11,18,18,22,29,22,8,12,19,23,8,8,2,9,13,13,11,11,11
%N A250623 a(n) = floor(n*log(prime(n))) + ceiling(n*log(n)) - 2*prime(n).
%C A250623 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).
%H A250623 Freimut Marschner, <a href="/A250623/b250623.txt">Table of n, a(n) for n = 1..10000</a>
%F A250623 a(n) = A250621(n) + A050502(n) - 2*A000040(n).
%e A250623 a(4) = floor(4*log(7)) + ceiling(4*log(4)) - 2*7 = floor(7.78...) + ceiling(5.54...) - 14 = 7 + 6 - 14 = -1;
%e A250623 a(6) = floor(6*log(13)) + ceiling(6*log(6)) - 2*13 = floor(15.38...) + ceiling(10.75..) - 26 = 15 + 11 - 26 = 0.
%t A250623 a250623[n_] :=
%t A250623 Floor[#*Log[Prime[#]]] + Ceiling[#*Log[#]] - 2*Prime[#] & /@ Range[n]; a250623[137] (* _Michael De Vlieger_, Dec 26 2014 *)
%o A250623 (PARI) vector(100,n,floor(n*log(prime(n)))+ceil(n*log(n))-2*prime(n)) \\ _Derek Orr_, Dec 30 2014
%K A250623 sign,easy
%O A250623 1,1
%A A250623 _Freimut Marschner_, Dec 02 2014