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 14 results. Next

A000265 Remove all factors of 2 from n; or largest odd divisor of n; or odd part of n.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 17, 9, 19, 5, 21, 11, 23, 3, 25, 13, 27, 7, 29, 15, 31, 1, 33, 17, 35, 9, 37, 19, 39, 5, 41, 21, 43, 11, 45, 23, 47, 3, 49, 25, 51, 13, 53, 27, 55, 7, 57, 29, 59, 15, 61, 31, 63, 1, 65, 33, 67, 17, 69, 35, 71, 9, 73, 37, 75, 19, 77
Offset: 1

Views

Author

Keywords

Comments

When n > 0 is written as k*2^j with k odd then k = A000265(n) and j = A007814(n), so: when n is written as k*2^j - 1 with k odd then k = A000265(n+1) and j = A007814(n+1), when n > 1 is written as k*2^j + 1 with k odd then k = A000265(n-1) and j = A007814(n-1).
Also denominator of 2^n/n (numerator is A075101(n)). - Reinhard Zumkeller, Sep 01 2002
Slope of line connecting (o, a(o)) where o = (2^k)(n-1) + 1 is 2^k and (by design) starts at (1, 1). - Josh Locker (joshlocker(AT)macfora.com), Apr 17 2004
Numerator of n/2^(n-1). - Alexander Adamchuk, Feb 11 2005
From Marco Matosic, Jun 29 2005: (Start)
"The sequence can be arranged in a table:
1
1 3 1
1 5 3 7 1
1 9 5 11 3 13 7 15 1
1 17 9 19 5 21 11 23 3 25 13 27 7 29 15 31 1
Every new row is the previous row interspaced with the continuation of the odd numbers.
Except for the ones; the terms (t) in each column are t+t+/-s = t_+1. Starting from the center column of threes and working to the left the values of s are given by A000265 and working to the right by A000265." (End)
This is a fractal sequence. The odd-numbered elements give the odd natural numbers. If these elements are removed, the original sequence is recovered. - Kerry Mitchell, Dec 07 2005
2k + 1 is the k-th and largest of the subsequence of k terms separating two successive equal entries in a(n). - Lekraj Beedassy, Dec 30 2005
It's not difficult to show that the sum of the first 2^n terms is (4^n + 2)/3. - Nick Hobson, Jan 14 2005
In the table, for each row, (sum of terms between 3 and 1) - (sum of terms between 1 and 3) = A020988. - Eric Desbiaux, May 27 2009
This sequence appears in the analysis of A160469 and A156769, which resemble the numerator and denominator of the Taylor series for tan(x). - Johannes W. Meijer, May 24 2009
Indices n such that a(n) divides 2^n - 1 are listed in A068563. - Max Alekseyev, Aug 25 2013
From Alexander R. Povolotsky, Dec 17 2014: (Start)
With regard to the tabular presentation described in the comment by Marco Matosic: in his drawing, starting with the 3rd row, the first term in the row, which is equal to 1 (or, alternatively the last term in the row, which is also equal to 1), is not in the actual sequence and is added to the drawing as a fictitious term (for the sake of symmetry); an actual A000265(n) could be considered to be a(j,k) (where j >= 1 is the row number and k>=1 is the column subscript), such that a(j,1) = 1:
1
1 3
1 5 3 7
1 9 5 11 3 13 7 15
1 17 9 19 5 21 11 23 3 25 13 27 7 29 15 31
and so on ... .
The relationship between k and j for each row is 1 <= k <= 2^(j-1). In this corrected tabular representation, Marco's notion that "every new row is the previous row interspaced with the continuation of the odd numbers" remains true. (End)
Partitions natural numbers to the same equivalence classes as A064989. That is, for all i, j: a(i) = a(j) <=> A064989(i) = A064989(j). There are dozens of other such sequences (like A003602) for which this also holds: In general, all sequences for which a(2n) = a(n) and the odd bisection is injective. - Antti Karttunen, Apr 15 2017
From Paul Curtz, Feb 19 2019: (Start)
This sequence is the truncated triangle:
1, 1;
3, 1, 5;
3, 7, 1, 9;
5, 11, 3, 13, 7;
15, 1, 17, 9, 19, 5;
21, 11, 23, 3, 25, 13, 27;
7, 29, 15, 31, 1, 33, 17, 35;
...
The first column is A069834. The second column is A213671. The main diagonal is A236999. The first upper diagonal is A125650 without 0.
c(n) = ((n*(n+1)/2))/A069834 = 1, 1, 2, 2, 1, 1, 4, 4, 1, 1, 2, 2, 1, 1, 8, 8, 1, 1, ... for n > 0. n*(n+1)/2 is the rank of A069834. (End)
As well as being multiplicative, a(n) is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for n, m >= 1. In particular, a(n) is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Feb 27 2019
a(n) is also the map n -> A026741(n) applied at least A007814(n) times. - Federico Provvedi, Dec 14 2021

Examples

			G.f. = x + x^2 + 3*x^3 + x^4 + 5*x^5 + 3*x^6 + 7*x^7 + x^8 + 9*x^9 + 5*x^10 + 11*x^11 + ...
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A049606 (partial products), A135013 (partial sums), A099545 (mod 4), A326937 (Dirichlet inverse).
Cf. A026741 (map), A001511 (converging steps), A038550 (prime index).
Cf. A195056 (Dgf at s=3).

Programs

  • Haskell
    a000265 = until odd (`div` 2)
    -- Reinhard Zumkeller, Jan 08 2013, Apr 08 2011, Oct 14 2010
    
  • Java
    int A000265(n){
        while(n%2==0) n>>=1;
        return n;
    }
    /* Aidan Simmons, Feb 24 2019 */
    
  • Julia
    using IntegerSequences
    [OddPart(n) for n in 1:77] |> println  # Peter Luschny, Sep 25 2021
    
  • Magma
    A000265:= func< n | n/2^Valuation(n,2) >;
    [A000265(n): n in [1..120]]; // G. C. Greubel, Jul 31 2024
    
  • Maple
    A000265:=proc(n) local t1,d; t1:=1; for d from 1 by 2 to n do if n mod d = 0 then t1:=d; fi; od; t1; end: seq(A000265(n), n=1..77);
    A000265 := n -> n/2^padic[ordp](n,2): seq(A000265(n), n=1..77); # Peter Luschny, Nov 26 2010
  • Mathematica
    a[n_Integer /; n > 0] := n/2^IntegerExponent[n, 2]; Array[a, 77] (* Josh Locker *)
    a[ n_] := If[ n == 0, 0, n / 2^IntegerExponent[ n, 2]]; (* Michael Somos, Dec 17 2014 *)
  • PARI
    {a(n) = n >> valuation(n, 2)}; /* Michael Somos, Aug 09 2006, edited by M. F. Hasler, Dec 18 2014 */
    
  • Python
    from _future_ import division
    def A000265(n):
        while not n % 2:
            n //= 2
        return n # Chai Wah Wu, Mar 25 2018
    
  • Python
    def a(n):
        while not n&1: n >>= 1
        return n
    print([a(n) for n in range(1, 78)]) # Michael S. Branicky, Jun 26 2025
    
  • SageMath
    def A000265(n): return n//2^valuation(n,2)
    [A000265(n) for n in (1..121)] # G. C. Greubel, Jul 31 2024
  • Scheme
    (define (A000265 n) (let loop ((n n)) (if (odd? n) n (loop (/ n 2))))) ;; Antti Karttunen, Apr 15 2017
    

Formula

a(n) = if n is odd then n, otherwise a(n/2). - Reinhard Zumkeller, Sep 01 2002
a(n) = n/A006519(n) = 2*A025480(n-1) + 1.
Multiplicative with a(p^e) = 1 if p = 2, p^e if p > 2. - David W. Wilson, Aug 01 2001
a(n) = Sum_{d divides n and d is odd} phi(d). - Vladeta Jovovic, Dec 04 2002
G.f.: -x/(1 - x) + Sum_{k>=0} (2*x^(2^k)/(1 - 2*x^(2^(k+1)) + x^(2^(k+2)))). - Ralf Stephan, Sep 05 2003
(a(k), a(2k), a(3k), ...) = a(k)*(a(1), a(2), a(3), ...) In general, a(n*m) = a(n)*a(m). - Josh Locker (jlocker(AT)mail.rochester.edu), Oct 04 2005
a(n) = Sum_{k=0..n} A127793(n,k)*floor((k+2)/2) (conjecture). - Paul Barry, Jan 29 2007
Dirichlet g.f.: zeta(s-1)*(2^s - 2)/(2^s - 1). - Ralf Stephan, Jun 18 2007
a(A132739(n)) = A132739(a(n)) = A132740(n). - Reinhard Zumkeller, Aug 27 2007
a(n) = 2*A003602(n) - 1. - Franklin T. Adams-Watters, Jul 02 2009
a(n) = n/gcd(2^n,n). (This also shows that the true offset is 0 and a(0) = 0.) - Peter Luschny, Nov 14 2009
a(-n) = -a(n) for all n in Z. - Michael Somos, Sep 19 2011
From Reinhard Zumkeller, May 01 2012: (Start)
A182469(n, k) = A027750(a(n), k), k = 1..A001227(n).
a(n) = A182469(n, A001227(n)). (End)
a((2*n-1)*2^p) = 2*n - 1, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 05 2013
G.f.: G(0)/(1 - 2*x^2 + x^4) - 1/(1 - x), where G(k) = 1 + 1/(1 - x^(2^k)*(1 - 2*x^(2^(k+1)) + x^(2^(k+2)))/(x^(2^k)*(1 - 2*x^(2^(k+1)) + x^(2^(k+2))) + (1 - 2*x^(2^(k+2)) + x^(2^(k+3)))/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Aug 06 2013
a(n) = A003961(A064989(n)). - Antti Karttunen, Apr 15 2017
Completely multiplicative with a(2) = 1 and a(p) = p for prime p > 2, i.e., the sequence b(n) = a(n) * A008683(n) for n > 0 is the Dirichlet inverse of a(n). - Werner Schulte, Jul 08 2018
From Peter Bala, Feb 27 2019: (Start)
O.g.f.: F(x) - F(x^2) - F(x^4) - F(x^8) - ..., where F(x) = x/(1 - x)^2 is the generating function for the positive integers.
O.g.f. for reciprocals: Sum_{n >= 1} x^n/a(n) = L(x) + (1/2)*L(x^2) + (1/2)*L(x^4) + (1/2)*L(x^8) + ..., where L(x) = log(1/(1 - x)).
Sum_{n >= 1} x^n/a(n) = 1/2*log(G(x)), where G(x) = 1 + 2*x + 4*x^2 + 6*x^3 + 10*x^4 + ... is the o.g.f. of A000123. (End)
O.g.f.: Sum_{n >= 1} phi(2*n-1)*x^(2*n-1)/(1 - x^(2*n-1)), where phi(n) is the Euler totient function A000010. - Peter Bala, Mar 22 2019
a(n) = A049606(n) / A049606(n-1). - Flávio V. Fernandes, Dec 08 2020
a(n) = numerator of n/2^(floor(n/2)). - Federico Provvedi, Dec 14 2021
a(n) = Sum_{d divides n} (-1)^(d+1)*phi(2*n/d). - Peter Bala, Jan 14 2024
a(n) = A030101(A030101(n)). - Darío Clavijo, Sep 19 2024

Extensions

Additional comments from Henry Bottomley, Mar 02 2000
More terms from Larry Reeves (larryr(AT)acm.org), Mar 14 2000
Name clarified by David A. Corneth, Apr 15 2017

A084623 Numerator of 2^(n-1)/n.

Original entry on oeis.org

1, 1, 4, 2, 16, 16, 64, 16, 256, 256, 1024, 512, 4096, 4096, 16384, 2048, 65536, 65536, 262144, 131072, 1048576, 1048576, 4194304, 1048576, 16777216, 16777216, 67108864, 33554432, 268435456, 268435456, 1073741824, 67108864
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

n/2^(n-1) is the probability that when a stick is broken up at n-1 points independently and uniformly chosen at random along its length the n pieces cannot form an n-gon (D'Andrea and Gómez, 2006). - Amiram Eldar, Dec 04 2020

Examples

			The first few fractions are 1, 1, 4/3, 2, 16/5, 16/3, 64/7, 16, 256/9, 256/5, 1024/11, 512/3, 4096/13, 4096/7, 16384/15, 2048, 65536/17, 65536/9, 262144/19, 131072/5, 1048576/21, 1048576/11, 4194304/23, 1048576/3, ... - _N. J. A. Sloane_, Mar 18 2018
		

Crossrefs

Cf. A000265 (denominators), A007814, A075101.

Programs

  • Magma
    [Numerator(2^(n-1)/n): n in [1..40]]; // Vincenzo Librandi, Jul 30 2015
    
  • Maple
    # Assuming offset 0:
    seq(2^(n - padic[ordp](n + 1, 2)), n = 0..31); # Peter Luschny, May 31 2023
  • Mathematica
    Table[Numerator[2^(n - 1)/n], {n, 40}] (* Vincenzo Librandi, Jul 30 2015 *)
  • PARI
    vector(50, n, numerator(2^(n-1)/n)) \\ Michel Marcus, Jul 30 2015

Formula

a(n) = 2^(n - A007814(n) - 1).
a(n) = A075101(n)/2.

A209308 Denominators of the Akiyama-Tanigawa algorithm applied to 2^(-n), written by antidiagonals.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jan 18 2013

Keywords

Comments

1/2^n and successive rows are
1, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256,...
1/2, 1/2, 3/8, 1/4, 5/32, 3/32, 7/128, 1/32,... = A000265/A075101, the Oresme numbers n/2^n. Paul Curtz, Jan 18 2013 and May 11 2016
0, 1/4, 3/8, 3/8, 5/16, 15/64, 21/128,... = (0 before A069834)/new,
-1/4, -1/4, 0, 1/4, 25/64, 27/64,...
0, -1/2, -3/4, -9/16, -5/32,...
1/2, 1/2, -9/16, -13/8,...
0, 17/8, 51/16,...
-17/8, -17/8,...
0
The first column is A198631/(A006519?), essentially the fractional Euler numbers 1, -1/2, 0, 1/4, 0,... in A060096.
Numerators b(n): 1, 1, 1, 0, 1, 1, -1, 1, 3, 1, ... .
Coll(n+1) - 2*Coll(n) = -1/2, -5/8, -1/2, -11/32, -7/32, -17/128, -5/64, -23/512, ... = -A075677/new, from Collatz problem.
There are three different Bernoulli numbers:
The first Bernoulli numbers are 1, -1/2, 1/6, 0,... = A027641(n)/A027642(n).
The second Bernoulli numbers are 1, 1/2, 1/6, 0,... = A164555(n)/A027642(n). These are the binomial transform of the first one.
The third Bernoulli numbers are 1, 0, 1/6, 0,... = A176327(n)/A027642(n), the half sum. Via A177427(n) and A191567(n), they yield the Balmer series A061037/A061038.
There are three different fractional Euler numbers:
1) The first are 1, -1/2, 0, 1/4, 0, -1/2,... in A060096(n).
Also Akiyama-Tanigawa algorithm for ( 1, 3/2, 7/4, 15/8, 31/16, 63/32,... = A000225(n+1)/A000079(n) ).
2) The second are 1, 1/2, 0, -1/4, 0, 1/2,... , mentioned by Wolfdieter Lang in A198631(n).
3) The third are 0, 1/2, 0, -1/4, 0, 1/2,... , half difference of 2) and 1).
Also Akiyama-Tanigawa algorithm for ( 0, -1/2, -3/4, -7/8, -15/16, -31/32,... = A000225(n)/A000079(n) ). See A097110(n).

Examples

			Triangle begins:
  1,
  2, 2,
  1, 2,  4,
  4, 4,  8,  8,
  1, 4,  8,  4, 16,
  2, 2,  1,  8, 32, 32,
  1, 2,  4,  4, 16, 32,  64,
  8, 8, 16, 16, 64, 64, 128, 128,
  ...
		

Crossrefs

Cf. Second Bernoulli numbers A164555(n)/A027642(n) via Akiyama-Tanigawa algorithm for 1/(n+1), A272263.

Programs

  • Mathematica
    max = 10; t[0, k_] := 1/2^k; t[n_, k_] := t[n, k] = (k + 1)*(t[n - 1, k] - t[n - 1, k + 1]); denoms = Table[t[n, k] // Denominator, {n, 0, max}, {k, 0, max - n}]; Table[denoms[[n - k + 1, k]], {n, 1, max}, {k, 1, n}] // Flatten (* Jean-François Alcover, Feb 05 2013 *)

A067745 Numerator of ((3*n - 2)/(n^(2*n - 1)*(2*n - 1)*4^(n - 1))).

Original entry on oeis.org

1, 1, 7, 5, 13, 1, 19, 11, 25, 7, 31, 17, 37, 5, 43, 23, 49, 13, 55, 29, 61, 1, 67, 35, 73, 19, 79, 41, 85, 11, 91, 47, 97, 25, 103, 53, 109, 7, 115, 59, 121, 31, 127, 65, 133, 17, 139, 71, 145, 37, 151, 77, 157, 5, 163, 83, 169, 43, 175, 89, 181, 23, 187, 95, 193, 49, 199
Offset: 1

Views

Author

Marc LeBrun, Jan 29 2002

Keywords

Comments

Conjecture: Odd part of 3n-2. - Ralf Stephan, Nov 18 2010
Conjecture is true. Note that gcd(3n-2,2n-1)=1 (because 2(3n-2)-3(2n-1) = -1) and gcd(3n-2,n) = 1 or 2. If 2^k | (3n-2), then k <= log_2(3n-2) < (n-1)/2 for n >= 11. So only the cases n <= 10 need to be checked individually. - Robert Israel, May 16 2017
This sequence is equivalent to A165355 where each element is reduced by the highest possible power of two. - Joe Slater, Nov 30 2016
Selecting each odd term gives b(n) = 6n+1 (A016921). A075677 is the even bisection of this sequence, while this sequence is the odd bisection of A075677. - Cory Kalm, Apr 29 2021
Numerator of n/2^n + (n-1)/2^(n-1), two Oresme numbers. - Paul Curtz, Dec 07 2021

Crossrefs

Programs

  • Magma
    [Numerator(((3*n - 2)/(n^(2*n - 1)*(2*n - 1)*4^(n - 1)))): n in [1..80]]; // Vincenzo Librandi, Feb 16 2015
  • Maple
    f:= n -> (3*n-2)/2^padic:-ordp(3*n-2,2):
    map(f, [$1..100]); # Robert Israel, May 16 2017
  • Mathematica
    (* Assuming the above conjecture: *)
    a067745[n_] := (3*n - 2)/2^IntegerExponent[3*n - 2, 2]; Table[a067745[n], {n, 67}] (* L. Edson Jeffery, Feb 15 2015 *)
  • PARI
    vector(80, n, numerator(((3*n - 2)/(n^(2*n - 1)*(2*n - 1)*4^(n - 1))))) \\ Michel Marcus, Feb 16 2015
    

Formula

Assuming the above conjecture, a(n) = a((8+(3*n-2)*4^k)/12), for all k >= 1. - L. Edson Jeffery, Feb 15 2015
a(n) = A000265(A165355(n-1)). - Joe Slater, Nov 30 2016
a(n) = A000265(3*n-2). - R. J. Mathar, Aug 23 2020
a(n) = A075677(2*n-1). a(2*n) = A075677(n); a(2*n-1) = A016921(n). - Cory Kalm, May 03 2021
Sum_{k=1..n} a(k) ~ n^2. - Amiram Eldar, Aug 26 2024
G.f.: Sum_{k>=1} ((3 + 2*(-1)^(k + 1))*x^(3*2^(k - 1) - (2*(-2)^(k - 1))/3 - 1/3) + (3 - 2*(-1)^(k + 1))*x^(2^(k - 1)*(3 + 2*(-1)^k)/3 - 1/3))/(x^(2^(k + 1)) - 2*x^(2^k) + 1). - Miles Wilson, Jan 12 2025

A075102 Number of steps to reach the first integer starting with 2^n/n and iterating the map x->x*ceiling(x), or -1 if no integer is ever reached.

Original entry on oeis.org

0, 0, 1, 0, 2, 5, 5, 0, 2, 4, 1, 1, 13, 12, 3, 0, 19, 3, 4, 8, 10, 11, 20, 1, 7, 1, 3, 8, 12, 1, 2, 0, 20, 6, 4, 7, 8, 23, 39, 1, 21, 8, 13, 16, 4, 1, 9, 7, 1, 6, 23, 30, 73, 6, 3, 14, 7, 7, 20, 12, 228, 16, 3, 0, 10, 5, 96, 3, 4, 13, 28, 3, 72, 57, 7, 9, 6, 6
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 02 2002

Keywords

Comments

The starting value is A075101(n)/A000265(n).

Examples

			a(5)=2 since (2^5)/5 = 32/5 -> 224/5 -> 2016 = A075103(5).
		

Crossrefs

Extensions

More terms from Jinyuan Wang, Jan 15 2022

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

A319862 Triangle read by rows, 0 <= k <= n: T(n,k) is the denominator of the k-th Bernstein basis polynomial of degree n evaluated at the interval midpoint t = 1/2; numerator is A319861.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			Triangle begins:
    1;
    2,   2;
    4,   2,   4;
    8,   8,   8,   8;
   16,   4,   8,   4,  16;
   32,  32,  16,  16,  32,  32;
   64,  32,  64,  16,  64,  32,  64;
  128, 128, 128, 128, 128, 128, 128, 128;
  256,  32,  64,  32, 128,  32,  64,  32, 256;
  512, 512, 128, 128, 256, 256, 128, 128, 512, 512;
  ...
		

Crossrefs

Programs

  • GAP
    Flat(List([0..11],n->List([0..n],k->2^n/Gcd(Binomial(n,k),2^n)))); # Muniru A Asiru, Sep 30 2018
    
  • Maple
    a:=(n,k)->2^n/gcd(binomial(n,k),2^n): seq(seq(a(n,k),k=0..n),n=0..11); # Muniru A Asiru, Sep 30 2018
  • Mathematica
    T[n_, k_] = 2^n/GCD[Binomial[n, k], 2^n];
    tabl[nn_] = TableForm[Table[T[n, k], {n, 0, nn}, {k, 0, n}]];
  • Maxima
    T(n, k) := 2^n/gcd(binomial(n, k), 2^n)$
    tabl(nn) := for n:0 thru nn do print(makelist(T(n, k), k, 0, n))$
    
  • Sage
    def A319862(n,k): return denominator(binomial(n,k)/2^n)
    flatten([[A319862(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jul 20 2021

Formula

T(n, k) = denominator of binomial(n,k)/2^n.
T(n, k) = 2^n/A082907(n,k).
A319862(n, k)/T(n, k) = binomial(n,k)/2^n.
T(n, n-k) = T(n, k).
T(n, 0) = 2^n.
T(n, 1) = A075101(n).

A271573 Numerator of (0 followed by A005126(n)= 2, 4, 7, ...)/2^n.

Original entry on oeis.org

0, 1, 1, 7, 3, 21, 19, 71, 17, 265, 261, 1035, 515, 4109, 4103, 16399, 2049, 65553, 65545, 262163, 131077, 1048597, 1048587, 4194327, 1048579, 16777241, 16777229, 67108891, 33554439, 268435485, 268435471, 1073741855, 67108865, 4294967329, 4294967313
Offset: 0

Views

Author

Paul Curtz, Apr 10 2016

Keywords

Comments

Reduced fractions: f(n) = 0, 1, 1, 7/8, 3/4, 21/32, 19/32, 71/128, 17/32, 265/512, 261/512, ... .
f(n) is an autosequence of the first kind.

Examples

			a(0), a(1), a(2), a(3), a(4), are the numerators of reduced fractions 0/1, 2/2, 4/4, 7/8, 12/16, ... .
		

Crossrefs

Cf. A000004, A000079, A005126, A006519, A060576(n+1), A075101, A198631, A279635 (denominator).

Programs

  • Magma
    [0] cat [Numerator((2^(n-1)+n)/2^n): n in [1..40]]; // Vincenzo Librandi, Oct 13 2017
  • Mathematica
    Prepend[Table[Numerator[(2^n + n + 1)/2^(n + 1)], {n, 0, 100}], 0] (* Robert Price, Apr 10 2016 *)
    (* Computation from Oresme numbers n/2^n: *) a[n_] := Numerator[n/2^n + If[n < 2, 0, 1]/2]; (* Jean-François Alcover, Apr 28 2016, after Paul Curtz *)
  • PARI
    a(n) = if(n==0, 0, numerator((2^(n-1)+n)/2^n)); \\ Altug Alkan, Apr 10 2016
    

Formula

a(n) = numerator(n/2^n + (if n<2 0 else 1)/2), a formula using Oresme numbers n/2^n. - Jean-François Alcover, Apr 28 2016 after Paul Curtz

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

Original entry on oeis.org

0, 0, 2, 1, 94, 122, 2372, 173, 50294, 56014, 983740, 266930, 18376812, 19624884, 333313544, 5500541, 5923399334, 6206260694, 103708093964, 27001710566, 1795265477444, 1860906681644, 30802090121144, 1988024895074, 524715115366844, 540193965134732, 8886200762228312
Offset: 0

Views

Author

N. J. A. Sloane and Chai Wah Wu, Mar 24 2018

Keywords

Comments

Denominator of population variance of n-th row of Pascal's triangle is A191871(n+1) = A000265(n+1)^2.

Examples

			The first few population variances are 0, 0, 2/9, 1, 94/25, 122/9, 2372/49, 173, 50294/81, 56014/25, 983740/121, 266930/9, 18376812/169, 19624884/49, 333313544/225, 5500541, 5923399334/289, ...
		

Crossrefs

Programs

  • PARI
    a(n) = numerator(binomial(2*n,n)/(n+1) - 4^n/(n+1)^2); \\ Altug Alkan, Mar 25 2018
  • Python
    from fractions import Fraction
    from sympy import binomial
    def A301631(n):
        return (Fraction(int(binomial(2*n,n)))/(n+1) - Fraction(4**n)/(n+1)**2).numerator
    

Formula

a(n) = numerator of binomial(2n,n)/(n+1) - 4^n/(n+1)^2.
a(n) = A000108(n)*A000265(n+1)^2 - A075101(n+1)^2/4.

A254522 Numerators of (2^n - 1 + (-1)^n)/(2*n), n > 0.

Original entry on oeis.org

0, 1, 1, 2, 3, 16, 9, 16, 85, 256, 93, 512, 315, 4096, 5461, 2048, 3855, 65536, 13797, 131072, 349525, 1048576, 182361, 1048576, 3355443, 16777216, 22369621, 33554432, 9256395, 268435456, 34636833, 67108864, 1431655765, 4294967296, 17179869183, 8589934592, 1857283155, 68719476736, 91625968981
Offset: 1

Views

Author

Paul Curtz, Jan 31 2015

Keywords

Comments

An autosequence of the first kind is a sequence which main diagonal is A000004.
Difference table of a(n)/A093803(n):
0, 1, 1, 2, 3, 16/3, ...
1, 0, 1, 1, 7/3, 11/3, ...
-1, 1, 0, 4/3, 4/3, 10/3, ...
2, -1, 4/3, 0, 2, 2, ...
-3, 7/3, -4/3, 2, 0, 16/5, ...
16/3, -11/3, 10/3, -2, 16/5, 0, ...
etc.
This is an autosequence of the first kind.
Its first (or second) upper diagonal is A075101(n)/(2*A000265(n)).
From Robert Israel, Apr 03 2017: (Start)
If p is a prime == 5 (mod 8), then a(5*p) = (2^(5*p-1)-1)/5 and a(5*p+3) = 2^(5*p) = 10*a(5*p)+2. This explains pairs such as
a(25) = 3355443
a(28) = 33554432
and
a(65) = 3689348814741910323
a(68) = 36893488147419103232. (End)

Crossrefs

Programs

  • Maple
    seq(numer((2^n-1+(-1)^n)/(2*n)), n=1..50); # Robert Israel, Feb 01 2015
  • Mathematica
    Table[Numerator[(2^n - 1 + (-1)^n)/(2*n)], {n, 39}] (* Michael De Vlieger, Feb 01 2015 *)

Extensions

a(25) corrected by Robert Israel, Apr 03 2017
Showing 1-10 of 14 results. Next