login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A022931
Number of e^m between Pi^n and Pi^(n+1).
0
1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1
OFFSET
0,7
FORMULA
a(n) = floor((n + 1) log Pi) - floor(n log Pi). - Alonso del Arte, Dec 20 2018
EXAMPLE
Pi^5 = 306.01968478528145326274131... and Pi^6 = 961.389193575304437...; in between them we find e^6 = 403.4287934927351226... and no other powers of e with integer exponents. Hence a(5) = 1.
Pi^6 = 961.389193575304437... and Pi^7 = 3020.2932277767920675142...; in between them we find e^7 = 1096.63315842845859926372... and e^8 = 2980.957987041728274743592... Hence a(6) = 2.
MAPLE
Digits:= 30:
log_Pi:= evalf(log(Pi));
a:= n-> floor((n+1)*log_Pi) -floor(n*log_Pi):
seq(a(n), n=0..80); # Alois P. Heinz, Dec 21 2018
MATHEMATICA
Table[Floor[(n + 1)Log[Pi]] - Floor[n Log[Pi]], {n, 0, 99}] (* Alonso del Arte, Dec 21 2018 *)
PROG
(Scala) val logPi = Math.log(Math.PI); for (n <- 0 to 99) yield (Math.floor(logPi * (n + 1)) - Math.floor(logPi * n)).toInt // Alonso del Arte, Dec 21 2018
CROSSREFS
Cf. A000796 (Pi), A001113 (e), A053510 (log(Pi)), A059561 (floor(n*log(Pi))).
Sequence in context: A026492 A182284 A139551 * A373217 A303825 A043280
KEYWORD
nonn,easy
STATUS
approved