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.

Previous Showing 11-20 of 32 results. Next

A082907 A modified Pascal's triangle, read by rows, and modified as follows: binomial(n,j) is replaced by gcd(2^n, binomial(n,j)), i.e., the largest power of 2 dividing binomial(n,j).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 2, 4, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 4, 8, 2, 8, 4, 8, 1, 1, 1, 4, 4, 2, 2, 4, 4, 1, 1, 1, 2, 1, 8, 2, 4, 2, 8, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 4, 2, 4, 1, 8, 4, 8, 1, 4, 2, 4, 1, 1, 1, 2, 2, 1, 1, 4, 4, 1, 1, 2, 2, 1, 1
Offset: 0

Views

Author

Labos Elemer, Apr 23 2003

Keywords

Comments

If N is a power of 2, then the first N rows are invariant under all 6 symmetries of an equilateral triangle. - Paul Boddington, Dec 17 2003

Examples

			Triangle read by rows:
            1,
           1,1,
          1,2,1,
         1,1,1,1,
        1,4,2,4,1,
       1,1,2,2,1,1,
      1,2,1,4,1,2,1,
     1,1,1,1,1,1,1,1,
    1,8,4,8,2,8,4,8,1,
   1,1,4,4,2,2,4,4,1,1,
  ...
For n = -1 + 2^k, such rows consist of all 1's since all binomial coefficients C(n,j) are odd.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Table[GCD[2^n, Binomial[n, j]], {j, 0, n}], {n, 0, 25}], 1]
    f[n_] := Denominator[CatalanNumber[n - 1]/2^(n - 1)]; T[n_, k_] := f[n]/(f[k]*f[n - k]); Table[T[n, k], {n, 0, 7}, {k, 0, n}]//Flatten (* G. C. Greubel, Dec 24 2016 *)

Formula

From Paul Boddington, Dec 17 2003: (Start)
T(n, j) = c(n)/(c(j)*c(n-j)) where c(n)=A060818(n).
T(n, j) = (b(j)*b(n-j))/b(n) where b(n)=A001316(n) (Gould's sequence). (End)

Extensions

Edited by Jon E. Schoenfield, Dec 24 2016

A220002 Numerators of the coefficients of an asymptotic expansion in even powers of the Catalan numbers.

Original entry on oeis.org

1, 5, 21, 715, -162877, 19840275, -7176079695, 1829885835675, -5009184735027165, 2216222559226679575, -2463196751104762933637, 1679951011110471133453965, -5519118103058048675551057049, 5373485053345792589762994345215, -12239617587594386225052760043303511
Offset: 0

Views

Author

Peter Luschny, Dec 27 2012

Keywords

Comments

Let N = 4*n+3 and A = sum_{k>=0} a(k)/(A123854(k)*N^(2*k)) then
C(n) ~ 8*4^n*A/(N*sqrt(N*Pi)), C(n) = (4^n/sqrt(Pi))*(Gamma(n+1/2)/ Gamma(n+2)) the Catalan numbers A000108.
The asymptotic expansion of the Catalan numbers considered here is based on the Taylor expansion of square root of the sine cardinal. This asymptotic series involves only even powers of N, making it more efficient than the asymptotic series based on Stirling's approximation to the central binomial which involves all powers (see for example: D. E. Knuth, 7.2.1.6 formula (16)). The series is discussed by Kessler and Schiff but is included as a special case in the asymptotic expansion given by J. L. Fields for quotients Gamma(x+a)/Gamma(x+b) and discussed by Y. L. Luke (p. 34-35), apparently overlooked by Kessler and Schiff.

Examples

			With N = 4*n+3 the first few terms of A are A = 1 + 5/(4*N^2) + 21/(32*N^4) + 715/(128*N^6) - 162877/(2048*N^8) + 19840275/(8192*N^10). With this A C(n) = round(8*4^n*A/(N*sqrt(N*Pi))) for n = 0..39 (if computed with sufficient numerical precision).
		

References

  • Donald E. Knuth, The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees—History of Combinatorial Generation, 2006.
  • Y. L. Luke, The Special Functions and their Approximations, Vol. 1. Academic Press, 1969.

Crossrefs

The logarithmic version is A220422. Appears in A193365 and A220466.
Cf. A220412.

Programs

  • Maple
    A220002 := proc(n) local s; s := n -> `if`(n > 0, s(iquo(n,2))+n, 0);
    (-1)^n*mul(4*i+2, i = 1..2*n)*2^s(iquo(n,2))*coeff(taylor(sqrt(sin(x)/x), x,2*n+2), x, 2*n) end: seq(A220002(n), n = 0..14);
    # Second program illustrating J. L. Fields expansion of gamma quotients.
    A220002 := proc(n) local recF, binSum, swing;
    binSum := n -> add(i,i=convert(n,base,2));
    swing := n -> n!/iquo(n, 2)!^2;
    recF := proc(n, x) option remember; `if`(n=0, 1, -2*x*add(binomial(n-1,2*k+1)*bernoulli(2*k+2)/(2*k+2)*recF(n-2*k-2,x),k=0..n/2-1)) end: recF(2*n,-1/4)*2^(3*n-binSum(n))*swing(4*n+1) end:
  • Mathematica
    max = 14; CoefficientList[ Series[ Sqrt[ Sinc[x]], {x, 0, 2*max+1}], x^2][[1 ;; max+1]]*Table[ (-1)^n*Product[ (2*k+1), {k, 1, 2*n}], {n, 0, max}] // Numerator (* Jean-François Alcover, Jun 26 2013 *)
  • Sage
    length = 15; T = taylor(sqrt(sin(x)/x),x,0,2*length+2)
    def A005187(n): return A005187(n//2) + n if n > 0 else 0
    def A220002(n):
        P = mul(4*i+2 for i in (1..2*n)) << A005187(n//2)
        return (-1)^n*P*T.coefficient(x, 2*n)
    [A220002(n) for n in range(length)]
    
  • Sage
    # Second program illustrating the connection with the Euler numbers.
    def A220002_list(n):
        S = lambda n: sum((4-euler_number(2*k))/(4*k*x^(2*k)) for k in (1..n))
        T = taylor(exp(S(2*n+1)),x,infinity,2*n-1).coefficients()
        return [t[0].numerator() for t in T][::-1]
    A220002_list(15)

Formula

Let [x^n]T(f(x)) denote the coefficient of x^n in the Taylor expansion of f(x) then r(n) = (-1)^n*prod_{i=1..2n}(2i+1)*[x^(2*n)]T(sqrt(sin(x)/x)) is the rational coefficient of the asymptotic expansion (in N=4*n+3) and a(n) = numerator(r(n)) = r(n)*2^(3*n-bs(n)), where bs(n) is the binary sum of n (A000120).
Also a(n) = numerator([x^(2*n)]T(exp(S))) where S = sum_{k>=1}((4-E(2*k))/ (4*k)*x^(2*k)) and E(n) the Euler numbers A122045.
Also a(n) = sf(4*n+1)*2^(3*n-bs(n))*F_{2*n}(-1/4) where sf(n) is the swinging factorial A056040, bs(n) the binary sum of n and F_{n}(x) J. L. Fields' generalized Bernoulli polynomials A220412.
In terms of sequences this means
r(n) = (-1)^n*A103639(n)*A008991(n)/A008992(n),
a(n) = (-1)^n*A220371(n)*A008991(n)/A008992(n).
Note that a(n) = r(n)*A123854(n) and A123854(n) = 2^A004134(n) = 8^n/2^A000120(n).
Formula from Johannes W. Meijer:
a(n) = d(n+1)*A098597(2*n+1)*(A008991(n)/A008992(n)) with d(1) = 1 and
d(n+1) = -4*(2*n+1)*A161151(n)*d(n),
d(n+1) = (-1)^n*2^(-1)*(2*(n+1))!*A060818(n)*A048896(n).

A163590 Odd part of the swinging factorial A056040.

Original entry on oeis.org

1, 1, 1, 3, 3, 15, 5, 35, 35, 315, 63, 693, 231, 3003, 429, 6435, 6435, 109395, 12155, 230945, 46189, 969969, 88179, 2028117, 676039, 16900975, 1300075, 35102025, 5014575, 145422675, 9694845, 300540195, 300540195, 9917826435, 583401555, 20419054425, 2268783825
Offset: 0

Views

Author

Peter Luschny, Aug 01 2009

Keywords

Comments

Let n$ denote the swinging factorial. a(n) = n$ / 2^sigma(n) where sigma(n) is the exponent of 2 in the prime-factorization of n$. sigma(n) can be computed as the number of '1's in the base 2 representation of floor(n/2).
If n is even then a(n) is the numerator of the reduced ratio (n-1)!!/n!! = A001147(n-1)/A000165(n), and if n is odd then a(n) is the numerator of the reduced ratio n!!/(n-1)!! = A001147(n)/A000165(n-1). The denominators for each ratio should be compared to A060818. Here all ratios are reduced. - Anthony Hernandez, Feb 05 2020 [See the Mathematica program for a more compact form of the formula. Peter Luschny, Mar 01 2020 ]

Examples

			11$ = 2772 = 2^2*3^2*7*11. Therefore a(11) = 3^2*7*11 = 2772/4 = 693.
From _Anthony Hernandez_, Feb 04 2019: (Start)
a(7) = numerator((1*3*5*7)/(2*4*6)) = 35;
a(8) = numerator((1*3*5*7)/(2*4*6*8)) = 35;
a(9) = numerator((1*3*5*7*9)/(2*4*6*8)) = 315;
a(10) = numerator((1*3*5*7*9)/(2*4*6*8*10)) = 63. (End)
		

Crossrefs

Programs

  • Maple
    swing := proc(n) option remember; if n = 0 then 1 elif irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:
    sigma := n -> 2^(add(i,i= convert(iquo(n,2),base,2))):
    a := n -> swing(n)/sigma(n);
  • Mathematica
    sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/ f!]; a[n_] := With[{s = sf[n]}, s/2^IntegerExponent[s, 2]]; Table[a[n], {n, 0, 31}] (* Jean-François Alcover, Jul 26 2013 *)
    r[n_] := (n - Mod[n - 1, 2])!! /(n - 1 + Mod[n - 1, 2])!! ;
    Table[r[n], {n, 0, 36}] // Numerator (* Peter Luschny, Mar 01 2020 *)
  • PARI
    A163590(n) = {
        my(a = vector(n+1)); a[1] = 1;
        for(n = 1, n,
            a[n+1] = a[n]*n^((-1)^(n+1))*2^valuation(n, 2));
    a } \\ Peter Luschny, Sep 29 2019
  • Sage
    # uses[A000120]
    @CachedFunction
    def swing(n):
        if n == 0: return 1
        return swing(n-1)*n if is_odd(n) else 4*swing(n-1)/n
    A163590 = lambda n: swing(n)/2^A000120(n//2)
    [A163590(n) for n in (0..31)]  # Peter Luschny, Nov 19 2012
    # Alternatively:
    
  • Sage
    @cached_function
    def A163590(n):
        if n == 0: return 1
        return A163590(n - 1) * n^((-1)^(n + 1)) * 2^valuation(n, 2)
    print([A163590(n) for n in (0..31)]) # Peter Luschny, Sep 29 2019
    

Formula

a(2*n) = A001790(n).
a(2*n+1) = A001803(n).
a(n) = a(n-1)*n^((-1)^(n+1))*2^valuation(n, 2) for n > 0. - Peter Luschny, Sep 29 2019

A090630 Greatest divisor d of n! such that d=m^k with k>1.

Original entry on oeis.org

1, 1, 1, 1, 8, 8, 144, 144, 576, 5184, 518400, 518400, 2073600, 2073600, 101606400, 914457600, 14631321600, 14631321600, 526727577600, 526727577600, 52672757760000, 221225582592000, 6373403688960000, 6373403688960000, 917770131210240000, 22944253280256000000, 3877578804363264000000
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 13 2003

Keywords

Comments

a(n) is a square for all n except n = 4, 5 and 21 (Wilke, 1981). - Amiram Eldar, Jun 09 2022

Crossrefs

Programs

  • Maple
    f:= proc(n)
      local F,  k, d,r,s;
      F:= ifactors(n!)[2];
      r:= 1;
      for k from 2 to F[1][2] do
        r:= max(r, mul(f[1]^(k*floor(f[2]/k)),f=F))
      od:
    r
    end proc:
    1,1,seq(f(n), n=2..100); # Robert Israel, Dec 08 2014
  • Mathematica
    IsPower[n_] := If[n==1, True, GCD@@(Transpose[FactorInteger[n]][[2]])>1]; Table[Select[Divisors[n! ], IsPower][[ -1]], {n, 0, 25}]
  • PARI
    a(n)=my(f=factor(n!),m=1); for(i=2,if(#f~,f[1,2]), m=max(factorback(concat(Mat(f[,1]), f[,2]\i*i)),m)); m \\ Charles R Greathouse IV, Dec 09 2014

Formula

a(n)= n!/A251753(n). - Robert G. Wilson v, Dec 08 2014

Extensions

More terms from T. D. Noe, Oct 04 2004

A334907 Comtet's expansion of the e.g.f. (sqrt(1 + sqrt(8*s)) - sqrt(1 - sqrt(8*s)))/ sqrt(8*s * (1 - 8*s)).

Original entry on oeis.org

1, 5, 63, 1287, 36465, 1322685, 58503375, 3053876175, 183771489825, 12525477859125, 953725671273375, 80237355387564375, 7391465178302430225, 739967791738943292525, 79993069900054731795375, 9286937373235386442953375, 1152424501315118408602850625
Offset: 0

Views

Author

Petros Hadjicostas, May 15 2020

Keywords

Comments

A special case of an integral in Comtet (1967, pp. 85-86) yields
Integral_{t=-oo..oo} dx/(x^2 + t^2)^(2*n) = Pi * a(n-1)/((n-1)! * 2^(3*n - 2) * t^(4*n-1)) for n >= 1 and t > 0. This integral also follows from a theorem in Moll (2002, p. 312, set a=1), but it requires the summation formula for a(n) shown below.

Crossrefs

Formula

a(n) = binomial(4*n+2, 2*n+1)*n!/2^(n+1).
a(n) = n!*A063079(n+1)/A060818(n) = n!*A001790(2*n+1)/A060818(n) (see the link for a proof).
a(n) = n!*Sum_{j=0..n} 2^(n-2*j)*binomial(2*n+1,2*j)*binomial(2*j,j).
a(n) = 2^n*n!*Sum_{k=0..n} A223549(n,k)/A223550(n,k).
E.g.f.: 2/(sqrt(1 - 8*s) * (sqrt(1 + sqrt(8*s)) + sqrt(1 - sqrt(8*s)))).
E.g.f.: sqrt(2/(1 + sqrt(1 - 8*s))/(1 - 8*s)).
D-finite with recurrence (2*n+1)*a(n) -(4*n-1)*(4*n+1)*a(n-1)=0. - R. J. Mathar, May 25 2020

A063079 Bisection of A001790.

Original entry on oeis.org

1, 5, 63, 429, 12155, 88179, 1300075, 9694845, 583401555, 4418157975, 67282234305, 514589420475, 15801325804719, 121683714103007, 1879204156221315, 14544636039226909, 1804857108504066435
Offset: 1

Views

Author

N. J. A. Sloane, Aug 07 2001

Keywords

Crossrefs

Cf. A001790, A060818, A334907. Other bisection gives A061548.

Programs

  • Maple
    seq(numer(binomial(2*n-3/2,-1/2)), n=1..20);
  • Mathematica
    Numerator[Binomial[2Range[20]-3/2,-(1/2)]] (* Harvey P. Dale, Feb 27 2012 *)

Formula

Numerators of binomial(2*n-3/2, -1/2).
Because A334907(n)/n! = a(n+1)/A060818(n) for n >= 0, the o.g.f. of a(n+1)/A060818(n), for n >= 0, is (sqrt(1 + sqrt(8*s)) - sqrt(1 - sqrt(8*s)))/sqrt(8*s * (1 - 8*s)), which is the e.g.f. of A334907 (see the link above for a proof). - Petros Hadjicostas, May 16 2020

Extensions

More terms from Vladeta Jovovic, Aug 07 2001

A232097 a(n) = least k such that 1+2+3+...+k (k-th triangular number) is a multiple of n!; a(n) = least k such that A232096(k) >= n.

Original entry on oeis.org

1, 3, 3, 15, 15, 224, 224, 4095, 76544, 512000, 9511424, 20916224, 410572799, 672358400, 2985984000, 1004293914624, 1004293914624, 78942076928000, 610877575397375, 83179139563520000, 490473044848410624, 6878928869130239999, 185974097225789210624, 1708887984313466880000, 68817755280574852890624
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2013

Keywords

Comments

a(n) = least k such that A232096(k) >= n.
Each A000217(a(n)) is divisible by A118381(n).
Each a(n) or a(n)+1 is divisible by 2*A060818(n) = A086117(n+1).
Each a(n) or a(n)+1 is divisible by A060828(n), and similarly for all the higher bases.
If we were instead searching for the first occurrence where A232096 gets a new distinct value, then we would have another sequence, b, which would start as: 1, 3, 4, 15, 32, 224, 575, 4095, ... as those distinct values do not appear in monotone order, being for n>=1, A232096(b(n)) = 1, 3, 2, 5, 4, 7, 6, 8, 9, 10, ...

Examples

			a(5) = 15 as binomial(15 + 1, 2) = 120 is the smallest binomial that is divisible by 5! = 120. - _David A. Corneth_, Mar 29 2021
		

Crossrefs

Cf. A000217, A232096. A232101 gives the ratio A000217(a(n)) / n!

Programs

  • PARI
    a(n) = { my(p = 2*n!, f = factor(p), res = oo); for(i = 2^(#f~-1), 2^#f~-1, b = binary(i); pr = prod(j = 1, #f~, f[j,1]^(b[j]*f[j, 2])); ipr = p/pr; for(j = -1, 0, c = lift(chinese(Mod(-1-j, ipr), Mod(j, pr))); if(c > 0, res = min(res, c)))); res } \\ David A. Corneth, Mar 29 2021
  • Scheme
    (define (A232097 n) (let ((increment (* 2 (A060818 n)))) (let loop ((k increment)) (cond ((>= (A232096 (- k 1)) n) (- k 1)) ((>= (A232096 k) n) k) (else (loop (+ k increment)))))))
    ;; Alternative, very naive and slow version:
    (define (A232097v2 n) (let loop ((k 1)) (if (>= (A232096 k) n) k (loop (+ 1 k)))))
    

A242954 a(n) = Product_{i=1..n} A234957(i).

Original entry on oeis.org

1, 1, 1, 1, 4, 4, 4, 4, 16, 16, 16, 16, 64, 64, 64, 64, 1024, 1024, 1024, 1024, 4096, 4096, 4096, 4096, 16384, 16384, 16384, 16384, 65536, 65536, 65536, 65536, 1048576, 1048576, 1048576, 1048576, 4194304, 4194304, 4194304, 4194304, 16777216, 16777216, 16777216
Offset: 0

Views

Author

Tom Edgar, May 27 2014

Keywords

Comments

This is the generalized factorial for A234957.
a(0) = 1 as it represents the empty product.

Crossrefs

Programs

  • Sage
    S=[0]+[4^valuation(i,4) for i in [1..100]]
    [prod(S[1:i+1]) for i in [0..99]]

Formula

a(n) = Product_{i=1..n} A234957(i).
a(n) = 4^(A054893(n)). - Vaclav Kotesovec, May 28 2014

A243757 a(n) = Product_{i=1..n} A060904(i).

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 25, 25, 25, 25, 25, 125, 125, 125, 125, 125, 625, 625, 625, 625, 625, 15625, 15625, 15625, 15625, 15625, 78125, 78125, 78125, 78125, 78125, 390625, 390625, 390625, 390625, 390625, 1953125, 1953125, 1953125, 1953125, 1953125, 9765625
Offset: 0

Views

Author

Tom Edgar, Jun 10 2014

Keywords

Comments

This is the generalized factorial for A060904.
a(0) = 1 as it represents the empty product.
a(n) is the largest power of 5 that divides n!, or the order of a 5-Sylow subgroup of the symmetric group of degree n. - David Radcliffe, Sep 03 2021

Crossrefs

Programs

  • Haskell
    a243757 n = a243757_list !! n
    a243757_list = scanl (*) 1 a060904_list
    -- Reinhard Zumkeller, Feb 04 2015
    
  • Mathematica
    Table[Product[5^IntegerExponent[k, 5], {k, 1, n}], {n, 0, 20}] (* G. C. Greubel, Dec 24 2016 *)
  • PARI
    a(n) = prod(k=1,n, 5^valuation(k,5)); \\ G. C. Greubel, Dec 24 2016
  • Sage
    S=[0]+[5^valuation(i, 5) for i in [1..100]]
    [prod(S[1:i+1]) for i in [0..99]]
    

Formula

a(n) = Product_{i=1..n} A060904(i).
a(n) = 5^(A027868(n)).

A348676 Triangle read by rows, T(n, k) = 2^(n - HammingWeight(k)), for 0 <= k <= n.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Oct 29 2021

Keywords

Examples

			Triangle starts:
[0] 1;
[1] 2,   1;
[2] 4,   2,   2;
[3] 8,   4,   4,   2;
[4] 16,  8,   8,   4,   8;
[5] 32,  16,  16,  8,   16,  8;
[6] 64,  32,  32,  16,  32,  16,  16;
[7] 128, 64,  64,  32,  64,  32,  32,  16;
[8] 256, 128, 128, 64,  128, 64,  64,  32, 128;
[9] 512, 256, 256, 128, 256, 128, 128, 64, 256, 128;
		

Crossrefs

Programs

  • Maple
    HammingWeight := n -> add(i, i = convert(n, base, 2)):
    A348676 := (n, k) -> 2^(n - HammingWeight(k)):
    seq(seq(A348676(n, k), k = 0..n), n = 0..10);
  • Mathematica
    Table[2^(n - DigitCount[k, 2, 1]), {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Oct 30 2021 *)
Previous Showing 11-20 of 32 results. Next