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!)
A130860 Number of decimal places of Pi given by integer approximations of the form a^(1/n). 0
0, 0, 2, 2, 4, 2, 3, 4, 5, 5, 6, 6, 6, 6, 9, 9, 9, 10, 10, 11, 11, 13, 12, 13, 13, 14, 14, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Approximations are rounded, not truncated; see the example for n=2. Note that this can produce anomalous results; e.g., 0.148 does not match 0.152 to 1-place accuracy, but does match it to 2-place accuracy. - Franklin T. Adams-Watters, Mar 29 2014
LINKS
FORMULA
a(n) is the number of decimal_places in (round(Pi^n))^1/n w.r.t. Pi.
Note that round(Pi^n) is the sequence A002160 (Nearest integer to Pi^n).
EXAMPLE
a(8)=4 because 9489^(1/8) = 3.1416... is Pi accurate to 4 decimal places.
a(2)=0. 10^(1/2) = 3.16... rounded to one place is 3.2, while Pi to one place is 3.1.
PROG
(Python)
from math import pi, floor, ceil
def round(x):
return math.floor(x + 0.5)
def decimal_places(x, y):
dp = -1
# Compare integer part, shift 1 dp
while floor(x + 0.5) == floor(y + 0.5) and x and y:
x = (x - floor(x)) * 10
y = (y - floor(y)) * 10
dp = dp + 1
return dp
for n in range(1, 30):
pi_to_the_n = pow(pi, n)
pi_to_the_n_rnd = round(pi_to_the_n)
pi_approx = pow(pi_to_the_n_rnd, 1.0 / n)
dps = decimal_places(pi_approx, pi)
print(dps)
CROSSREFS
Cf. A002160.
Sequence in context: A046820 A356878 A043262 * A161535 A138785 A131817
KEYWORD
nonn,base,more
AUTHOR
Stephen McInerney (spmcinerney(AT)hotmail.com), Jul 22 2007
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 4 14:25 EDT 2024. Contains 373099 sequences. (Running on oeis4.)