1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 7, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1
Offset: 1
A123725
Numerators of fractional partial quotients appearing in a continued fraction for the power series Sum_{n>=0} x^(2^n - 1)/(n+1)^s.
Original entry on oeis.org
1, 2, -3, -2, -4, 2, 3, -2, -5, 2, -3, -2, 4, 2, 3, -2, -6, 2, -3, -2, -4, 2, 3, -2, 5, 2, -3, -2, 4, 2, 3, -2, -7, 2, -3, -2, -4, 2, 3, -2, -5, 2, -3, -2, 4, 2, 3, -2, 6, 2, -3, -2, -4, 2, 3, -2, 5, 2, -3, -2, 4, 2, 3, -2, -8, 2, -3, -2, -4, 2, 3, -2, -5, 2, -3, -2, 4, 2, 3, -2, -6, 2, -3, -2, -4, 2, 3, -2, 5, 2, -3, -2, 4, 2, 3, -2, 7, 2, -3, -2, -4, 2
Offset: 0
Surprisingly, the following analog of the Riemann zeta function:
Z(x,s) = Sum_{n>=0} x^(2^n-1)/(n+1)^s = 1 + x/2^s + x^3/3^s +x^7/4^s+..
may be expressed by the continued fraction:
Z(x,s) = [1; f(1)^s/x, -f(2)^s/x, -f(3)^s/x,...,f(n)^s*(-1)^e(n)/x,...]
such that the (2^n-1)-th convergent = Sum_{k=0..n} x^(2^k-1)/(k+1)^s,
where f(n) = (b(n)+2)/(b(n)+1)^2 and e(n) = A073089(n+1) for n>=1,
and b(n) = A007814(n) the exponent of highest power of 2 dividing n.
Thus a(n) = (A007814(n) + 2)*(-1)^A073089(n+1) are numerators and
A123726(n) = (A007814(n) + 1)^2 are denominators of partial quotients.
Case s=1.
Sum_{n>=0} x^(2^n-1)/(n+1) = [1; 2/x, -(3/4)/x, -2/x, -(4/9)/x, 2/x,
(3/4)/x, -2/x, -(5/16)/x, 2/x, -(3/4)/x, -2/x, (4/9)/x, 2/x, (3/4)/x,
-2/x, -(6/25)/x, 2/x, -(3/4)/x, -2/x, -(4/9)/x, 2/x, (3/4)/x, -2/x,...].
Note that (2^n-1)-th convergents exactly equal n-th partial sums:
[1;2/x] = 1 + x/2;
[1;2/x,-(3/4)/x,-2/x] = 1 + x/2 + x^3/3;
[1;2/x,-(3/4)/x,-2/x,-(4/9)/x,2/x,(3/4)/x,-2/x] = 1 +x/2 +x^3/3 +x^7/4.
Case s=2.
Sum_{n>=0} x^(2^n-1)/(n+1)^2 = [1; 4/x, -(9/16)/x, -4/x, -(16/81)/x,
4/x, (9/16)/x, -4/x, -(25/256)/x, 4/x, -(9/16)/x, -4/x, (16/81)/x, 4/x,
(9/16)/x, -4/x, -(36/625)/x, 4/x, -(9/16)/x, -4/x, (16/81)/x, 4/x ...].
Note that (2^n-1)-th convergents exactly equal n-th partial sums:
[1;4/x] = 1 + x/4;
[1;4/x,-(9/16)/x,-4/x] = 1 + x/4 + x^3/9;
[1;4/x,-(9/16)/x,-4/x,-(16/81)/x,4/x,(9/16)/x,-4/x]=1+x/4+x^3/9+x^7/16.
Case s=3.
Sum_{n>=0} x^(2^n-1)/(n+1)^3 = [1; 8/x,-(27/64)/x,-8/x,-(64/729)/x,8/x,
(27/64)/x,-8/x,-(125/4096)/x, 8/x,-(27/64)/x,-8/x, (64/729)/x, 8/x,
(27/64)/x,-8/x,-(216/15625)/x, 8/x, -(27/64)/x, -8/x, (64/729)/x ...].
Likewise, the (2^n-1)-th convergents exactly equal n-th partial sums.
It is conjectured that these patterns continue for all s.
-
{a(n)=numerator(subst(contfrac(sum(m=0,#binary(n),1/x^(2^m-1)/(m+1)),n+3)[n+1],x,1))}
-
A007814(n) = valuation(n,2);
A073089(n) = { if(n<=1, return(0)); n-=1; my(v=2^valuation(n, 2)); return((0==bitand(n, v<<1)) != (v%2)); }; \\ From A073089
A123725(n) = if(!n,1,(A007814(n) + 2) * (-1)^A073089(n+1)); \\ Antti Karttunen, Nov 01 2018
A371402
a(n) = gcd(2*n, 4^n)^(2*n + 1) mod (2^(2*n + 1) - 1)^2.
Original entry on oeis.org
0, 8, 63, 128, 1534, 2048, 16383, 32768, 524285, 524288, 4194303, 8388608, 100663294, 134217728, 1073741823, 2147483648, 42949672956, 34359738368, 274877906943, 549755813888, 6597069766654, 8796093022208, 70368744177663, 140737488355328, 2251799813685245
Offset: 0
-
a := n -> modp(igcd(2*n, 4^n)^(2*n + 1), (2^(2*n + 1) - 1)^2):
seq(a(n), n = 0..19);
-
a(n) = lift(Mod(gcd(2*n, 4^n),(2^(2*n + 1) - 1)^2)^(2*n + 1)); \\ Michel Marcus, Mar 27 2024
-
def A371402(n): return ((~n & n-1).bit_length()+2<<(n<<1) if n&1 else ((m:=(~n & n-1).bit_length())+1<<(n<<1)+1)-m) if n else 0 # Chai Wah Wu, Mar 27 2024
-
def v2(n): return valuation(2*n, 2)
def a(n):
if n == 0: return 0
return 4^n*(v2(n) + 1) if n % 2 else 2*4^n*v2(n) - v2(n//2)
print([a(n) for n in range(0, 25)])
Comments
Examples
References
Links
Crossrefs
Programs
Haskell
Haskell
MATLAB
Magma
Maple
Mathematica
PARI
PARI
PARI
PARI
Python
Python
Python
Sage
Scheme
Formula
Extensions