cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 17 results. Next

A075101 Numerator of 2^n/n.

Original entry on oeis.org

2, 2, 8, 4, 32, 32, 128, 32, 512, 512, 2048, 1024, 8192, 8192, 32768, 4096, 131072, 131072, 524288, 262144, 2097152, 2097152, 8388608, 2097152, 33554432, 33554432, 134217728, 67108864, 536870912, 536870912, 2147483648, 134217728, 8589934592, 8589934592, 34359738368, 17179869184, 137438953472
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 01 2002

Keywords

Crossrefs

Denominator is A000265(n).

Programs

  • Magma
    [Numerator(2^n/n): n in [1..50]]; // G. C. Greubel, Feb 28 2019
    
  • Maple
    [seq(numer(2^n/n),n=1..50)];
  • Mathematica
    f[n_]:=Numerator[2^n/n]; Array[f,50] (* Vladimir Joseph Stephan Orlovsky, Feb 16 2011 *)
  • PARI
    a(n) = numerator(2^n/n); \\ Michel Marcus, Mar 25 2018
    
  • PARI
    a(n) = 2^(n - valuation(n, 2)) \\ Jianing Song, Oct 24 2018
    
  • Python
    from fractions import Fraction
    def A075101(n):
        return (Fraction(2**n)/n).numerator # Chai Wah Wu, Mar 25 2018
    
  • Sage
    [numerator(2^n/n) for n in (1..50)] # G. C. Greubel, Feb 28 2019

Formula

a(n) = 2^(n - A007814(n)).
a(n) = 2*A084623(n). - Paul Curtz, Jan 28 2013
a(n) = 2^A093048(n). - Paul Curtz, Jun 10 2016
From Peter Bala, Feb 25 2019: (Start)
a(n) = 2^n/gcd(n,2^n).
O.g.f.: F(2*x) - (1/2)*F((2*x)^2) - (1/4)*F((2*x)^4) - (1/8)*F((2*x)^8) - ..., where F(x) = x/(1 - x). Cf. A000265.
O.g.f. for reciprocals: Sum_{n >= 1} x^n/a(n) = F((x/2)) + F((x/2)^2) + 2*F((x/2)^4) + 4*F((x/2)^8) + 8*F((x/2)^16) + 16*F((x/2)^32) + .... (End)
Sum_{n>=1} 1/a(n) = Sum_{n>=1} 2^(2^(n-1)+n-1)/(2^(2^n) - 1) = Sum_{n>=1} A073113(n-1)/A051179(n) = 1.48247501707... - Amiram Eldar, Aug 14 2022

A247281 a(n) = 4^n -(-1)^n.

Original entry on oeis.org

0, 5, 15, 65, 255, 1025, 4095, 16385, 65535, 262145, 1048575, 4194305, 16777215, 67108865, 268435455, 1073741825, 4294967295, 17179869185, 68719476735, 274877906945, 1099511627775, 4398046511105, 17592186044415
Offset: 0

Views

Author

Paul Curtz, Sep 11 2014

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, 4}, {0, 5}, 23] (* Jean-François Alcover, May 22 2016 *)
  • PARI
    concat(0, Vec(-5*x / ((x+1)*(4*x-1)) + O(x^100))) \\ Colin Barker, Sep 11 2014
    
  • PARI
    vector(100,n,4^(n-1)+(-1)^n) \\ Derek Orr, Sep 11 2014
    
  • Python
    def A247281(n): return (1<<(n<<1))+(1 if n&1 else -1) # Chai Wah Wu, Jun 28 2023

Formula

a(n) = 5*A015521(n).
a(n+1) = 10*A037481(n) + 5.
a(n+1) = 4*a(n) + 5*(-1)^n.
a(n) = 3*a(n-1) + 4*a(n-2). - Colin Barker, Sep 11 2014
G.f.: -5*x / ((x+1)*(4*x-1)). - Colin Barker, Sep 11 2014

Extensions

Typos in data fixed by Colin Barker, Sep 11 2014

A093048 a(n) = n minus exponent of 2 in n, with a(0) = 0.

Original entry on oeis.org

0, 1, 1, 3, 2, 5, 5, 7, 5, 9, 9, 11, 10, 13, 13, 15, 12, 17, 17, 19, 18, 21, 21, 23, 21, 25, 25, 27, 26, 29, 29, 31, 27, 33, 33, 35, 34, 37, 37, 39, 37, 41, 41, 43, 42, 45, 45, 47, 44, 49, 49, 51, 50, 53, 53, 55, 53, 57, 57, 59, 58, 61, 61, 63, 58, 65, 65, 67, 66, 69
Offset: 0

Views

Author

Ralf Stephan, Mar 16 2004

Keywords

Examples

			G.f. = x + x^2 + 3*x^3 + 2*x^4 +  5*x^5 + 5*x^6 + 7*x^7 + 5*x^8 + 9*x^9 + ... - _Michael Somos_, Jan 25 2020
		

Crossrefs

a(n) = n - A007814(n) = A093049(n) + 1, n > 0.
a(n) is the exponent of 2 in A002689(n-1), A014070(n), A060690(n), A075101(n).
See also A084623.

Programs

  • Maple
    A093048 := proc(n)
        n-A007814(n) ;
    end proc: # R. J. Mathar, Jul 24 2014
  • Mathematica
    a[ n_] := If[ n == 0, n - IntegerExponent[n, 2]]; (* Michael Somos, Jan 25 2020 *)
  • PARI
    a(n) = if(n<1, 0, if(n%2==0, a(n/2) + n/2 - 1, n))
    
  • PARI
    a(n) = n - valuation(n, 2) \\ Jianing Song, Oct 24 2018
    
  • Python
    def A093048(n): return n-(~n& n-1).bit_length() if n else 0 # Chai Wah Wu, Jul 07 2022

Formula

Recurrence: a(2n) = a(n) + n - 1, a(2n+1) = 2n + 1.
G.f.: Sum_{k>=0} (t*(t^3 + t^2 + 1)/(1 - t^2)^2), with t = x^2^k.
a(n) = Sum_{k=1..n} sign(n mod 2^k). - Wesley Ivan Hurt, May 09 2021

A093049 n-1 minus exponent of 2 in n, a(0) = 0.

Original entry on oeis.org

0, 0, 0, 2, 1, 4, 4, 6, 4, 8, 8, 10, 9, 12, 12, 14, 11, 16, 16, 18, 17, 20, 20, 22, 20, 24, 24, 26, 25, 28, 28, 30, 26, 32, 32, 34, 33, 36, 36, 38, 36, 40, 40, 42, 41, 44, 44, 46, 43, 48, 48, 50, 49, 52, 52, 54, 52, 56, 56, 58, 57, 60, 60, 62, 57, 64, 64, 66, 65, 68
Offset: 0

Views

Author

Ralf Stephan, Mar 16 2004

Keywords

Examples

			G.f. = 2*x^3 + x^4 + 4*x^5 + 4*x^6 + 6*x^7 + 4*x^8 + 8*x^9 + 8*x^10 + ... - _Michael Somos_, Jan 25 2020
		

Crossrefs

a(n) = n - A007814(n) - 1 = A093048(n) - 1, n>0.
a(n) is the exponent of 2 in A001761(n+1), A002105(n), A002682(n-1), A006963(n), A036770(n-1), A059837(n), A084623(n), |A003707(n)|, |A011859(n)|.

Programs

  • Mathematica
    a[ n_] := If[ n == 0, 0, n - 1 - IntegerExponent[n, 2]]; (* Michael Somos, Jan 25 2020 *)
  • PARI
    a(n)=if(n<1,0,if(n%2==0,a(n/2)+n/2-1,n-1))
    
  • PARI
    {a(n) = if( n, n - 1 - valuation(n, 2))}; /* Michael Somos, Jan 25 2020 */
    
  • Python
    def A093049(n): return n-1-(~n& n-1).bit_length() if n else 0 # Chai Wah Wu, Jul 07 2022

Formula

Recurrence: a(2n) = a(n) + n - 1, a(2n+1) = 2n.
G.f.: sum(k>=0, t^3(t+2)/(1-t^2)^2, t=x^2^k).

A206771 0 followed by the numerators of the reduced (A001803(n) + A001790(n)) / (2*A046161(n)).

Original entry on oeis.org

0, 1, 1, 9, 5, 175, 189, 1617, 429, 57915, 60775, 508079, 264537, 8788507, 9100525, 75218625, 9694845, 5109183315, 5250613995, 43106892675, 22090789875, 723694276305, 740104577355, 6049284520695, 1543768261425, 201547523019375
Offset: 0

Views

Author

Paul Curtz, Jan 10 2013

Keywords

Comments

We write the fractions a(n)/b(n) and higher order differences as a matrix:
0, 1, 1, 9/8, 5/4,...
1, 0, 1/8, 1/8, 15/128,... = (A001790(n)/A046161(n) +Lorbeta(n)) /2
-1, 1/8, 0, -1/128, -1/128,... = (Lorbeta(n+1) +A161200(n+1)/A046161(n+1)) / 2
9/8, -1/8, -1/128, 0, 1/1024,...
-5/4, 15/128, 1/128, 1/1024, 0,...
Here, Lorbeta(0)=1 and Lorbeta(n) = -A098597(n-1)/A046161(n) for n>0 is the inverse of the Lorentz factor.
The first line with numerators a(n) and denominators b(n) is 0, 1, 1, 9/8, 5/4, 175/128, 189/128, 1617/1024, 429/256, 57915/32768, 60775/32768,... It is an autosequence: Its inverse binomial transform is the signed sequence.
a(n+1)/(2*n-1)= 1, 3, 1, 25, 21, 147, 33, 3861, 3575, 26741,... .
a(n+1)/A146535(n) = 9, 5, 35, 27, 539, 39, 4455,... .
A001790(n)/A046161(n) yields the coefficients of the Lorentz factor (or Lorentz gamma factor). With b for beta and g for gamma:
g = (1-b^2)^-1 = 1 + (b^2)/2 + 3*(b^4)/8 + 5*(b^6)/16 + ... .
b = (1-g^-2)^-1 = 1 - (g^-2)/2 - (g^-4)/8 - (g^-6)/16 - ... .
Are the denominators of the first subdiagonal 1, 1/8, -1/128, 1/1024,... A061549(n) ?
a(n+1)/(A000108(n)*b(n)) = 1, 1, 9/16, 1/4, 25/256, 9/256, 49/4096, 1/256, 81/65536, 25/65536, 121/1048576,... = A191871(n+1)/ A084623(n+1)^2 ?

Examples

			From the first formula: a(1)=1*1, a(2)=1*1, a(3)=3*3, a(4)=1*5, a(5)=5*35, a(6)=3*63.
		

Crossrefs

Programs

  • Magma
    /* By definition: */ m:=25; R:=PowerSeriesRing(Rationals(), m); p:=Coefficients(R!(1/(1-x)^(1/2))); q:=Coefficients(R!((1-x)^(-3/2))); A001790:=[Numerator(p[i]): i in [1..m]]; A001803:=[Numerator(q[i]): i in [1..m]]; A046161:=[Denominator(Binomial(2*n,n)/4^n): n in [0..m-1]]; [0] cat [Numerator((A001803[n]+A001790[n])/(2*A046161[n])): n in [1..m]]; // Bruno Berselli, Mar 11 2013
  • Maple
    A206771 := proc(n)
            A001790(n)+A001803(n) ;
            %/2/A046161(n) ;
            numer(%) ;
    end proc: # R. J. Mathar, Jan 18 2013
  • Mathematica
    max = 25; A001803 = CoefficientList[Series[(1 - x)^(-3/2), {x, 0, max}], x] // Numerator; A001790 = CoefficientList[Series[1/Sqrt[(1 - x)], {x, 0, max}], x] // Numerator; A046161 = Table[Binomial[2n, n]/4^n, {n, 0, max}] // Denominator; a[n_] := (A001803[[n]] + A001790[[n]])/(2*A046161[[n]]) // Numerator; a[0] = 0; Table[a[n], {n, 0, max}]
    (* or (from 1st formula) : *) Table[ n*Numerator[4^(1-n)*Binomial[2n-2, n-1]]/2^IntegerExponent[n, 2], {n, 0, max}]
    (* or (from 2nd formula) : *) Table[ Numerator[ CatalanNumber[n-1]/2^(2n-1)]*Numerator[n^2/2^n], {n, 0, max}] (* Jean-François Alcover, Jan 31 2013 *)

Formula

a(n) = A000265(n) * A001790(n-1).
a(n) = A098597(n-1) * A191871(n). See also A181318
a(n) = numerator of n*binomial(2n-2,n-1)/4^(n-1). - Nathaniel Johnston, Dec 16 2022

Extensions

a(11)-a(25) from Jean-François Alcover, Jan 13 2013

A213268 Denominators of the Inverse semi-binomial transform of A001477(n) read downwards antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 4, 4, 1, 2, 2, 8, 2, 1, 1, 4, 1, 16, 16, 1, 2, 1, 8, 8, 32, 16, 1, 1, 4, 4, 16, 8, 64, 64, 1, 2, 2, 8, 4, 32, 32, 128, 16, 1, 1, 4, 2, 16, 16, 64, 8, 256, 256, 1, 2, 1, 8, 8, 32, 4, 128, 128, 512, 256, 1, 1, 4, 4, 16, 2, 64, 64, 256, 128, 1024, 1024
Offset: 0

Views

Author

Paul Curtz, Jun 08 2012

Keywords

Comments

Starting from any sequence a(k) in the first row, define the array T(n,k) of the inverse semi-binomial transform by T(0,k) = a(k), T(n,k) = T(n-1,k+1) -T(n-1,k)/2, n>=1.
Here, where the first row is the nonnegative integers, the array is
0 1 2 3 4 5 6 7 8 =A001477(n)
1 3/2 2 5/2 3 7/2 4 9/2 5 =A026741(n+2)/A000034(n)
1 5/4 3/2 7/4 2 9/4 5/2 11/4 3 =A060819(n+4)/A176895(n)
3/4 7/8 1 9/8 5/4 11/8 3/2 13/8 7/4 =A106609(n+6)/A205383(n+6)
1/2 9/16 5/8 11/16 3/4 13/16 7/8 15/16 1 =A106617(n+8)/TBD
5/16 11/32 3/8 13/32 7/16 15/32 1/2 17/32 9/16
3/16 13/64 7/32 15/64 1/4 17/64 9/32 19/64 5/16
7/64 15/128 1/8 17/128 9/64 19/128 5/32 21/128 11/64
1/16 17/256 9/128 19/256 5/64 21/256 11/128 23/256 3/32.
The first column contains 0, followed by fractions A000265/A084623, that is Oresme numbers n/2^n multiplied by 2 (see A209308).

Examples

			The array of denominators starts:
  1   1   1   1   1   1   1   1   1   1   1 ...
  1   2   1   2   1   2   1   2   1   2   1 ...
  1   4   2   4   1   4   2   4   1   4   2 ...
  4   8   1   8   4   8   2   8   4   8   1 ...
  2  16   8  16   4  16   8  16   1  16   8 ...
16  32   8  32  16  32   2  32  16  32   8 ...
16  64  32  64   4  64  32  64  16  64  32 ...
64 128   8 128  64 128  32 128  64 128  16 ...
16 256 128 256  64 256 128 256  32 256 128 ...
256 512 128 512 256 512  64 512 256 512 128 ...
All entries are powers of 2.
		

Programs

  • Maple
    A213268frac := proc(n,k)
            if n = 0 then
                    return k ;
            else
                    return procname(n-1,k+1)-procname(n-1,k)/2 ;
            end if;
    end proc:
    A213268 := proc(n,k)
            denom(A213268frac(n,k)) ;
    end proc: # R. J. Mathar, Jun 30 2012
  • Mathematica
    T[0, k_] := k; T[n_, k_] := T[n, k] = T[n-1, k+1] - T[n-1, k]/2; Table[T[n-k, k] // Denominator, {n, 0, 11}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Sep 12 2014 *)

A301278 Numerator of variance of n-th row of Pascal's triangle.

Original entry on oeis.org

0, 0, 1, 4, 47, 244, 1186, 1384, 25147, 112028, 98374, 1067720, 1531401, 39249768, 166656772, 88008656, 2961699667, 12412521388, 51854046982, 108006842264, 448816369361, 3721813363288, 15401045060572, 15904199160592, 131178778841711, 1080387930269464, 4443100381114156, 9124976352166288
Offset: 0

Views

Author

N. J. A. Sloane, Mar 18 2018

Keywords

Comments

Variance here is the sample variance unbiased estimator. For population variance, see A301631.

Examples

			The first few variances are 0, 0, 1/3, 4/3, 47/10, 244/15, 1186/21, 1384/7, 25147/36, 112028/45, 98374/11, 1067720/33, 1531401/13, 39249768/91, 166656772/105, 88008656/15, 2961699667/136, 12412521388/153, 51854046982/171, 108006842264/95, 448816369361/105, ...
		

Crossrefs

Mean and variance of n-th row of Pascal's triangle: A084623/A000265, A301278/A301279, A054650, A301280.

Programs

  • Maple
    M:=70;
    m := n -> 2^n/(n+1);
    m1:=[seq(m(n),n=0..M)]; # A084623/A000265
    v := n -> (1/n) * add((binomial(n,i) - m(n))^2, i=0..n );
    v1:= [0, 0, seq(v(n),n=2..60)]; # A301278/A301279
  • PARI
    a(n) = if(n==0, 0, numerator(binomial(2*n,n)/n - 4^n/(n*(n+1)))); \\ Altug Alkan, Mar 25 2018
  • Python
    from fractions import Fraction
    from sympy import binomial
    def A301278(n):
        return (Fraction(int(binomial(2*n,n)))/n - Fraction(4**n)/(n*(n+1))).numerator if n > 0 else 0 # Chai Wah Wu, Mar 23 2018
    

Formula

a(0) = 0; a(n) = numerator of binomial(2n,n)/n - 4^n/(n*(n+1)) for n >= 1. - Chai Wah Wu, Mar 23 2018

A301279 Denominator of variance of n-th row of Pascal's triangle.

Original entry on oeis.org

1, 1, 3, 3, 10, 15, 21, 7, 36, 45, 11, 33, 13, 91, 105, 15, 136, 153, 171, 95, 105, 231, 253, 69, 150, 325, 351, 189, 203, 435, 155, 31, 528, 51, 595, 315, 111, 703, 741, 195, 410, 861, 903, 473, 495, 1035, 1081, 141, 588, 1225, 255, 663, 689, 1431, 1485
Offset: 0

Views

Author

N. J. A. Sloane, Mar 18 2018

Keywords

Comments

Variance here is sample variance unbiased estimator. For population variance, the denominator is A191871(n+1) = A000265(n+1)^2. - Chai Wah Wu, Mar 25 2018

Examples

			The first few variances are 0, 0, 1/3, 4/3, 47/10, 244/15, 1186/21, 1384/7, 25147/36, 112028/45, 98374/11, 1067720/33, 1531401/13, 39249768/91, 166656772/105, 88008656/15, 2961699667/136, 12412521388/153, 51854046982/171, 108006842264/95, 448816369361/105, ...
		

Crossrefs

Mean and variance of n-th row of Pascal's triangle: A084623/A000265, A301278/A301279, A054650, A301280.

Programs

  • Maple
    M:=70;
    m := n -> 2^n/(n+1);
    m1:=[seq(m(n),n=0..M)]; # A084623/A000265
    v := n -> (1/n) * add((binomial(n,i) - m(n))^2, i=0..n );
    v1:= [0, 0, seq(v(n),n=2..60)]; # A301278/A301279
  • PARI
    a(n) = if(n==0, 1, denominator(binomial(2*n,n)/n - 4^n/(n*(n+1)))); \\ Altug Alkan, Mar 25 2018
  • Python
    from fractions import Fraction
    from sympy import binomial
    def A301279(n):
        return (Fraction(int(binomial(2*n,n)))/n - Fraction(4**n)/(n*(n+1))).denominator if n > 0 else 1 # Chai Wah Wu, Mar 23 2018
    

Formula

a(0) = 1; a(n) = denominator of binomial(2n,n)/n - 4^n/(n*(n+1)) for n >= 1. - Chai Wah Wu, Mar 23 2018

A301280 Nearest integer to variance of n-th row of Pascal's triangle.

Original entry on oeis.org

0, 0, 0, 1, 5, 16, 56, 198, 699, 2490, 8943, 32355, 117800, 431316, 1587207, 5867244, 21777203, 81127591, 303240041, 1136914129, 4274441613, 16111746161, 60873695892, 230495640009, 874525192278, 3324270554675, 12658405644200, 48280298159610
Offset: 0

Views

Author

N. J. A. Sloane, Mar 18 2018

Keywords

Examples

			The first few variances are 0, 0, 1/3, 4/3, 47/10, 244/15, 1186/21, 1384/7, 25147/36, 112028/45, 98374/11, 1067720/33, 1531401/13, 39249768/91, 166656772/105, 88008656/15, 2961699667/136, 12412521388/153, 51854046982/171, 108006842264/95, 448816369361/105, ...
		

Crossrefs

Mean and variance of n-th row of Pascal's triangle: A084623/A000265, A301278/A301279, A054650.

Programs

  • Maple
    M:=70;
    m := n -> 2^n/(n+1);
    m1:=[seq(m(n),n=0..M)]; # A084623/A000265
    v := n -> (1/n) * add((binomial(n,i) - m(n))^2, i=0..n );
    v1:= [0, 0, seq(v(n),n=2..60)]; # A301278/A301279 and A301280
    # Alternative:
    f:= n -> round((binomial(2*n,n)-4^n/(n+1))/n): f(0):=0:
    map(f, [$0..60]); # Robert Israel, Jul 18 2019

Formula

From Robert Israel, Jul 18 2019: (Start)
The variance is binomial(2*n,n)/n - 4^n/(n*(n+1)).
a(n) ~ 4^n/(sqrt(Pi)*n^(3/2)). (End)

A339392 Numerators of the probability that when a stick is broken up at n-1 points independently and uniformly chosen at random along its length there exist 3 of the n pieces that can form a triangle.

Original entry on oeis.org

0, 0, 1, 4, 23, 53, 87, 593, 5807, 415267, 8758459, 274431867, 12856077691, 905435186299, 481691519113703, 77763074616922439, 3824113551749834107, 1437016892446437662971, 165559472503434318118655, 146602912901791088694069887, 200050146291129782743679367167
Offset: 1

Views

Author

Amiram Eldar, Dec 04 2020

Keywords

Comments

For the corresponding probability that any triple of pieces can form a triangle, see A001791. The probabilities for these two cases were found by Kong et al. (2013).

Examples

			Fractions begin with 0, 0, 1/4, 4/7, 23/28, 53/56, 87/88, 593/594, 5807/5808, 415267/415272, 8758459/8758464, 274431867/274431872, ...
For n = 1 or 2 the number of pieces is less than 3, so the probability is 0.
For n = 3, the stick is being broken into 3 pieces and the probability that they can form a triangle is 1/4, the solution to the classical broken stick problem (see, e.g., Gardner, 2001).
		

Crossrefs

Cf. A000045, A001791, A084623, A234951, A243398, A339393 (denominators).

Programs

  • Mathematica
    f = Table[k/(Fibonacci[k + 2] - 1), {k, 2, 20}]; Numerator[1 - FoldList[Times, 1, f]]

Formula

a(n) = numerator(1 - Product_{k=2..n} k/(Fibonacci(k+2)-1)).
Lim_{n->oo} a(n)/A339393(n) = 1.
Showing 1-10 of 17 results. Next