login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A110483 Continued fraction for seventh root of 2. 0
1, 9, 1, 1, 1, 1, 5, 46, 1, 3, 2, 1, 1, 3, 1, 1, 2, 1, 22, 48, 1, 1, 5, 4, 1, 1, 1, 1, 1, 1, 2, 8, 1, 6, 1, 21, 1, 1, 1, 1, 1, 6, 1, 1, 3, 3, 1, 1, 2, 2, 2, 3, 1, 26, 1, 16, 1, 4, 21, 1, 2, 1, 1, 1, 5, 3, 7, 21, 3, 1, 1, 1, 8, 1, 8, 1, 4, 1, 24, 1, 3, 1, 6, 1, 2, 1, 5, 5, 6, 1, 12, 1, 8, 2, 2, 1, 3, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Table of n, a(n) for n=0..99.

PROG

(Haskell) import Ratio

floorRoot :: Integer -> Integer -> Integer

floorRoot k n | k>=1 && n>=1 = h n where h x = let y=((k-1)*x+n`div`x^(k-1))`div`k in if y<x then h y else x

intFrac :: Rational -> (Integer, Rational)

intFrac x = let ((a, b), ~(q, r)) = ((numerator x, denominator x), divMod a b) in (q, r%b)

cf :: Rational -> Rational -> [Integer]

cf x y = let ((xi, xf), (yi, yf)) = (intFrac x, intFrac y) in if xi==yi then xi : cf (recip xf) (recip yf) else []

y = 2^512 -- increase to get more terms, decrease to get a quick answer

(k, n) = (7, 2) -- compute continued fraction for k-th root of n

main = print (let x = floorRoot k (n*y^k) in cf (x%y) ((x+1)%y))

CROSSREFS

Cf. A002945 A002950.

Sequence in context: A176410 A087966 A087968 * A010164 A006084 A059928

Adjacent sequences:  A110480 A110481 A110482 * A110484 A110485 A110486

KEYWORD

cofr,nonn

AUTHOR

Paul Stoeber (pstoeber(AT)uni-potsdam.de), Sep 09 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified November 26 13:30 EST 2014. Contains 250079 sequences.