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!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
LINKS
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 * A303825 A043280 A030379
KEYWORD
nonn,easy
AUTHOR
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 March 28 08:22 EDT 2024. Contains 371236 sequences. (Running on oeis4.)