OFFSET
1,2
COMMENTS
The alternation of ratios above and below is chosen to match the behavior of ratios of the Fibonacci numbers with respect to the golden ratio.
LINKS
Eric M. Schmidt, Table of n, a(n) for n = 1..2000
EXAMPLE
a(2) = 3 since 3/1 < Pi, while 4/1 > Pi. a(3) = 10 since 10/3 > Pi, while 9/3 < Pi.
MATHEMATICA
PiApprox = Table[1, {i, 1, 40}]; For[i = 2, i < 41, i++, If[Mod[i, 2] == 0, PiApprox[[i]] = Floor[PiApprox[[i - 1]]*Pi], PiApprox[[i]] = Ceiling[PiApprox[[i - 1]]*Pi]]]
PROG
(Sage)
def A214839(numterms) :
res = [1]
for i in range(1, numterms) :
res.append(floor(pi*res[i-1]) if is_odd(i) else ceil(pi*res[i-1]))
return res
# Eric M. Schmidt, Mar 26 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
William J. Keith, Mar 08 2013
STATUS
approved