A002160 Nearest integer to Pi^n.
1, 3, 10, 31, 97, 306, 961, 3020, 9489, 29809, 93648, 294204, 924269, 2903677, 9122171, 28658146, 90032221, 282844564, 888582403, 2791563950, 8769956796, 27551631843, 86556004192, 271923706894, 854273519914, 2683779414318, 8431341691876, 26487841119104, 83214007069230
Offset: 0
Examples
a(0) = 1 because Pi^0 = 1; a(2) = 10 because Pi^2 = 9.8696...; a(10) = 93648 because Pi^10 = 93648.047476...
References
- A. Fletcher, J. C. P. Miller, L. Rosenhead, and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 122.
- J. T. Peters, Ten-Place Logarithm Table. Vols. 1 and 2, rev. ed. Ungar, NY, 1957, Vol. 1 (Appendix), p. 1.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Programs
-
Maple
a := []: Digits := 1000: for n from 0 to 50 do: a := [op(a),round(Pi^n)]: od: seq(a[i+1],i=0..50);
-
Mathematica
Round[Pi^Range[0,40]] (* Harvey P. Dale, Jun 10 2024 *)
-
PARI
apply( A002160(n)=Pi^n\/1, [0..50]) \\ An error message will say so if default(realprecision) must be increased. - M. F. Hasler, May 27 2018
-
Sage
[round(pi^n) for n in range(0,29)] # Stefano Spezia, Jan 15 2025
Extensions
More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 29 2003
Edited by M. F. Hasler, May 27 2018