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!)
A118828 Numerators of the convergents of the 2-adic continued fraction of zero given by A118827. 5

%I #17 Dec 14 2023 05:25:02

%S 1,-1,0,-1,-1,1,0,1,1,-1,0,-1,-1,1,0,1,1,-1,0,-1,-1,1,0,1,1,-1,0,-1,

%T -1,1,0,1,1,-1,0,-1,-1,1,0,1,1,-1,0,-1,-1,1,0,1,1,-1,0,-1,-1,1,0,1,1,

%U -1,0,-1,-1,1,0,1,1,-1,0,-1,-1,1,0,1,1,-1,0,-1,-1,1,0,1,1,-1,0,-1,-1,1,0,1,1,-1,0,-1,-1,1,0,1,1,-1,0,-1,-1,1,0,1,1,-1,0,-1

%N Numerators of the convergents of the 2-adic continued fraction of zero given by A118827.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,-1).

%F Period 8 sequence: [1, -1, 0, -1, -1, 1, 0, 1].

%F G.f.: (1 - x - x^3)/(1 + x^4).

%F Assuming offset 0 with a(0) = 1, then a has the g.f. (1 + x - x^2)/(1 + x^4) and a(n) = signum(mods(n+1, 4)*mods(n+1, 8)), where mods(a, b) is the symmetric modulo function. - _Peter Luschny_, Oct 13 2020

%e For n>=1, convergents A118828(k)/A118829(k) are:

%e at k = 4*n: -1/(2*A080277(n));

%e at k = 4*n+1: -1/(2*A080277(n)-1);

%e at k = 4*n+2: -1/(2*A080277(n)-2);

%e at k = 4*n-1: 0/(-1)^n.

%e Convergents begin:

%e 1/1, -1/-2, 0/-1, -1/2, -1/1, 1/0, 0/1, 1/-8,

%e 1/-7, -1/6, 0/-1, -1/10, -1/9, 1/-8, 0/1, 1/-24,

%e 1/-23, -1/22, 0/-1, -1/26, -1/25, 1/-24, 0/1, 1/-32,

%e 1/-31, -1/30, 0/-1, -1/34, -1/33, 1/-32, 0/1, 1/-64, ...

%p seq(signum(mods(n+1, 4)*mods(n+1, 8)), n=1..100); # _Peter Luschny_, Oct 13 2020

%o (PARI) {a(n)=local(p=+1,q=-2,v=vector(n,i,if(i%2==1,p,q*2^valuation(i/2,2)))); contfracpnqn(v)[1,1]}

%Y Cf. A118827 (partial quotients), A118829 (denominators).

%K frac,sign,easy

%O 1,1

%A _Paul D. Hanna_, May 01 2006

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 April 16 17:08 EDT 2024. Contains 371749 sequences. (Running on oeis4.)