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-5 of 5 results.

A187059 The exponent of highest power of 2 dividing the product of the elements of the n-th row of Pascal's triangle (A001142).

Original entry on oeis.org

0, 0, 1, 0, 5, 2, 4, 0, 17, 10, 12, 4, 18, 8, 11, 0, 49, 34, 36, 20, 42, 24, 27, 8, 58, 36, 39, 16, 47, 22, 26, 0, 129, 98, 100, 68, 106, 72, 75, 40, 122, 84, 87, 48, 95, 54, 58, 16, 162, 116, 119, 72, 127, 78, 82, 32, 147, 94, 98, 44, 108, 52, 57, 0, 321, 258, 260, 196, 266, 200, 203, 136, 282, 212, 215, 144, 223, 150, 154, 80, 322, 244, 247, 168, 255, 174, 178, 96, 275, 190, 194, 108, 204, 116, 121, 32, 418, 324, 327, 232, 335
Offset: 0

Views

Author

Bruce Reznick, Mar 05 2011

Keywords

Comments

The exponent of the highest power of 2 which divides Product_{k=0..n} binomial(n, k). This can be computed using de Polignac's formula.
This is the function ord_2(Ḡ_n) extensively studied in Lagarias-Mehta (2014), and plotted in Fig. 1.1. - Antti Karttunen, Oct 22 2014

Examples

			For example, if n = 4, the power of 2 that divides 1*4*6*4*1 is 5.
		

References

  • I. Niven, H. S. Zuckerman, H. L. Montgomery, An Introduction to the Theory of Numbers, Wiley, 1991, pages 182, 183, 187 (Ex. 34).

Crossrefs

Row sums of triangular table A065040.
Row 1 of array A249421.
Cf. A000295 (a(2^k-2)), A000337 (a(2^k)), A005803 (a(2^k-3)), A036799 (a(2^k+1)), A109363 (a(2^k-4)).

Programs

  • Haskell
    a187059 = a007814 . a001142  -- Reinhard Zumkeller, Mar 16 2015
    
  • Mathematica
    a[n_] := Sum[IntegerExponent[Binomial[n, k], 2], {k, 0, n}]; Array[a, 100, 0]
    A187059[n_] := Sum[#*((#+1)*2^k - n - 1) & [Floor[n/2^k]], {k, Floor[Log2[n]]}];
    Array[A187059, 100, 0] (* Paolo Xausa, Feb 11 2025 *)
    2*Accumulate[#] - Range[Length[#]]*# & [DigitCount[Range[0, 99], 2, 1]] (* Paolo Xausa, Feb 11 2025 *)
  • PARI
    a(n)=sum(k=0,n,valuation(binomial(n,k),2))
    
  • PARI
    \\ Much faster version, based on code for A065040 by Charles R Greathouse IV which if reduced even further gives the formula a(n) = 2*A000788(n) - A249154(n):
    A065040(m,k) = (hammingweight(k)+hammingweight(m-k)-hammingweight(m));
    A187059(n) = sum(k=0, n, A065040(n, k));
    for(n=0, 4095, write("b187059.txt", n, " ", A187059(n)));
    \\ Antti Karttunen, Oct 25 2014
    
  • Python
    def A187059(n): return (n+1)*n.bit_count()+sum((m:=1<>j)-(r if n<<1>=m*(r:=k<<1|1) else 0)) for j in range(1,n.bit_length()+1)) # Chai Wah Wu, Nov 11 2024

Formula

a(2^k-1) = 0 (19th century); a(2^k) = (k-1)*2^k+1 for k >= 1. (Use de Polignac.)
a(n) = Sum_{i=0..n} A065040(n,i) [where the entries of triangular table A065040(m,k) give the exponent of the maximal power of 2 dividing binomial coefficient A007318(m,k)].
a(n) = A007814(A001142(n)). - Jason Kimberley, Nov 02 2011
a(n) = A249152(n) - A174605(n). [Exponent of 2 in the n-th hyperfactorial minus exponent of 2 in the n-th superfactorial. Cf. for example Lagarias & Mehta paper or Peter Luschny's formula for A001142.] - Antti Karttunen, Oct 25 2014
a(n) = 2*A000788(n) - A249154(n). - Antti Karttunen, Nov 02 2014
a(n) = Sum_{i=1..n} (2*i-n-1)*v_2(i), where v_2(i) = A007814(i) is the exponent of the highest power of 2 dividing i. - Ridouane Oudra, Jun 02 2022
a(n) = Sum_{k=1..floor(log_2(n))} t*((t+1)*2^k - n - 1), where t = floor(n/(2^k)). - Paolo Xausa, Feb 11 2025, derived from Ridouane Oudra's formula above.

Extensions

Name clarified by Antti Karttunen, Oct 22 2014

A336496 Products of superfactorials (A000178).

Original entry on oeis.org

1, 2, 4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 144, 192, 256, 288, 384, 512, 576, 768, 1024, 1152, 1536, 1728, 2048, 2304, 3072, 3456, 4096, 4608, 6144, 6912, 8192, 9216, 12288, 13824, 16384, 18432, 20736, 24576, 27648, 32768, 34560, 36864, 41472, 49152, 55296
Offset: 1

Views

Author

Gus Wiseman, Aug 03 2020

Keywords

Comments

First differs from A317804 in having 34560, which is the first term with more than two distinct prime factors.

Examples

			The sequence of terms together with their prime indices begins:
    1: {}
    2: {1}
    4: {1,1}
    8: {1,1,1}
   12: {1,1,2}
   16: {1,1,1,1}
   24: {1,1,1,2}
   32: {1,1,1,1,1}
   48: {1,1,1,1,2}
   64: {1,1,1,1,1,1}
   96: {1,1,1,1,1,2}
  128: {1,1,1,1,1,1,1}
  144: {1,1,1,1,2,2}
  192: {1,1,1,1,1,1,2}
  256: {1,1,1,1,1,1,1,1}
  288: {1,1,1,1,1,2,2}
  384: {1,1,1,1,1,1,1,2}
  512: {1,1,1,1,1,1,1,1,1}
		

Crossrefs

A001013 is the version for factorials, with complement A093373.
A181818 is the version for superprimorials, with complement A336426.
A336497 is the complement.
A000178 lists superfactorials.
A001055 counts factorizations.
A006939 lists superprimorials or Chernoff numbers.
A049711 is the minimum prime multiplicity in A000178.
A174605 is the maximum prime multiplicity in A000178.
A303279 counts prime factors of superfactorials.
A317829 counts factorizations of superprimorials.
A322583 counts factorizations into factorials.
A325509 counts factorizations of factorials into factorials.

Programs

  • Mathematica
    supfac[n_]:=Product[k!,{k,n}];
    facsusing[s_,n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsusing[Select[s,Divisible[n/d,#]&],n/d],Min@@#>=d&]],{d,Select[s,Divisible[n,#]&]}]];
    Select[Range[1000],facsusing[Rest[Array[supfac,30]],#]!={}&]

A249152 Exponent of 2 in the hyperfactorials: a(n) = A007814(A002109(n)).

Original entry on oeis.org

0, 0, 2, 2, 10, 10, 16, 16, 40, 40, 50, 50, 74, 74, 88, 88, 152, 152, 170, 170, 210, 210, 232, 232, 304, 304, 330, 330, 386, 386, 416, 416, 576, 576, 610, 610, 682, 682, 720, 720, 840, 840, 882, 882, 970, 970, 1016, 1016, 1208, 1208, 1258, 1258, 1362, 1362, 1416, 1416, 1584, 1584, 1642, 1642
Offset: 0

Views

Author

Antti Karttunen, Oct 25 2014

Keywords

Comments

This is the function ord_2(D*_n) listed in the leftmost column of Table 7.1 in Lagarias & Mehta 2014 paper (on page 19).

Crossrefs

Bisection: A249153.
Cf. A133457 (binary exponents).

Programs

  • Magma
    [0] cat [&+[i*Valuation(i, 2):i in [1..n]]:n in [1..60]]; // Marius A. Burtea, Oct 18 2019
    
  • Maple
    with(padic): seq(add(i*ordp(i, 2), i=1..n), n=0..60); # Ridouane Oudra, Oct 17 2019
  • Mathematica
    Table[i=0;Hyperfactorial@n//.x_/;EvenQ@x:>(i++;x/2);i,{n,0,60}] (* Giorgos Kalogeropoulos, Oct 28 2021 *)
  • PARI
    a(n) = sum(i=1, n, i*valuation(i, 2)); \\ Michel Marcus, Sep 14 2021
    
  • PARI
    a(n) = my(v=binary(n),t=0); forstep(j=#v,1,-1, if(v[j],v[j]=t--,t++)); (n^2 + fromdigits(v,2))>>1; \\ Kevin Ryde, Nov 03 2021
    
  • Python
    def A249152(n): return sum(i*(~i&i-1).bit_length() for i in range(2,n+1,2)) # Chai Wah Wu, Jul 11 2022

Formula

a(n) = 2 * A143157(floor(n/2)).
a(n) = A174605(n) + A187059(n). [Lagarias and Mehta theorem 4.1 for p=2]
a(n) = Sum_{i=1..n} i*v_2(i), where v_2(i) = A007814(i) is the exponent of the highest power of 2 dividing i. - Ridouane Oudra, Oct 17 2019
a(n) ~ (n^2+2n)/2 as n -> infinity. - Luca Onnis, Oct 17 2021
a(n) ~ ((A011371(n))^2)/2 as n -> infinity. - Luca Onnis, Nov 02 2021
From Kevin Ryde, Nov 03 2021: (Start)
a(2n) = a(2n+1) = 2*a(n) + n*(n+1).
a(n) = ( n^2 + Sum_{j=1..k} (e[j]-2*j+1) * 2^e[j] )/2, where binary expansion n = 2^e[1] + ... + 2^e[k] with ascending exponents e[1] < e[2] < ... < e[k] (A133457).
(End)
a(n) = Sum_{j=1..floor(log_2(n))} j*2^j*round(n/2^(j+1))^2, for n>=1. - Ridouane Oudra, Oct 01 2022

A336497 Numbers that cannot be written as a product of superfactorials A000178.

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76
Offset: 1

Views

Author

Gus Wiseman, Aug 03 2020

Keywords

Comments

First differs from A336426 in having 360.

Examples

			The sequence of terms together with their prime indices begins:
     3: {2}        22: {1,5}        39: {2,6}
     5: {3}        23: {9}          40: {1,1,1,3}
     6: {1,2}      25: {3,3}        41: {13}
     7: {4}        26: {1,6}        42: {1,2,4}
     9: {2,2}      27: {2,2,2}      43: {14}
    10: {1,3}      28: {1,1,4}      44: {1,1,5}
    11: {5}        29: {10}         45: {2,2,3}
    13: {6}        30: {1,2,3}      46: {1,9}
    14: {1,4}      31: {11}         47: {15}
    15: {2,3}      33: {2,5}        49: {4,4}
    17: {7}        34: {1,7}        50: {1,3,3}
    18: {1,2,2}    35: {3,4}        51: {2,7}
    19: {8}        36: {1,1,2,2}    52: {1,1,6}
    20: {1,1,3}    37: {12}         53: {16}
    21: {2,4}      38: {1,8}        54: {1,2,2,2}
		

Crossrefs

A093373 is the version for factorials, with complement A001013.
A336426 is the version for superprimorials, with complement A181818.
A336496 is the complement.
A000178 lists superfactorials.
A001055 counts factorizations.
A006939 lists superprimorials or Chernoff numbers.
A049711 is the minimum prime multiplicity in A000178(n).
A174605 is the maximum prime multiplicity in A000178(n).
A303279 counts prime factors (with multiplicity) of superprimorials.
A317829 counts factorizations of superprimorials.
A322583 counts factorizations into factorials.
A325509 counts factorizations of factorials into factorials.

Programs

  • Mathematica
    supfac[n_]:=Product[k!,{k,n}];
    facsusing[s_,n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsusing[Select[s,Divisible[n/d,#]&],n/d],Min@@#>=d&]],{d,Select[s,Divisible[n,#]&]}]];
    Select[Range[100],facsusing[Rest[Array[supfac,30]],#]=={}&]

A235062 Odd part of n-th superfactorial (A000178).

Original entry on oeis.org

1, 1, 3, 9, 135, 6075, 1913625, 602791875, 1708914965625, 24223869637734375, 3777106873263732421875, 1766836167640942433642578125, 10744263248137144009663040771484375, 457356694421659081059931729616180419921875
Offset: 1

Views

Author

Ralf Stephan, Jan 03 2014

Keywords

Comments

Partial products of A049606(n). Denominator of 2^(2n)/A000178(n).

Examples

			6!5!4!3!2!1! = 24883200 = 2^12 * 6075, so a(6) = 6075.
		

Crossrefs

Programs

  • Mathematica
    #/2^IntegerExponent[#,2]&/@Rest[FoldList[Times,1,Range[15]!]] (* Harvey P. Dale, Mar 04 2014 *)
  • PARI
    a(n)=p=prod(k=1,n,k!);p/2^valuation(p,2)
    
  • Python
    from math import prod
    from operator import mul
    from itertools import accumulate
    def A235062(n): return prod(map(lambda n:n>>(~n&n-1).bit_length(),accumulate(range(1,n+1),mul))) # Chai Wah Wu, Jul 08 2022

Formula

a(n) = A000265(A000178(n)) = A000178(n)/2^A174605(n) = A000178(n)/2^A007814(A000178(n)).
Showing 1-5 of 5 results.