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

A242849 Triangle read by rows: T(n,k) = A060828(n)/(A060828(k) * A060828(n-k)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 3, 9, 9, 3, 9, 9, 1, 1, 1, 9, 3, 3, 9, 3, 3, 9, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 1, 9, 9, 3, 9, 9, 1
Offset: 0

Views

Author

Tom Edgar, May 23 2014

Keywords

Comments

This triangle can be obtained by replacing each entry of Pascal's Triangle by the largest power of 3 dividing that entry.
The exponent of T(n,k) is the number of 'carries' that occur when adding k and n-k in base 3 using the traditional addition algorithm.
If T(n,k) != 0 mod 3, then n dominates k in base 3.

Examples

			The triangle begins
1
1 1
1 1 1
1 3 3 1
1 1 3 1 1
1 1 1 1 1 1
1 3 3 1 3 3 1.
		

Crossrefs

Programs

  • Mathematica
    s3[n_] := 3^IntegerExponent[n!, 3];
    T[n_, k_] := s3[n]/(s3[k] s3[n-k]);
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 06 2018 *)
  • Sage
    m=50
    T=[0]+[3^valuation(i,3) for i in [1..m]]
    Table=[[prod(T[1:i+1])/(prod(T[1:j+1])*prod(T[1:i-j+1])) for j in [0..i]] for i in [0..m-1]]
    [x for sublist in Table for x in sublist]

Formula

T(n,k) = A060828(n)/(A060828(k) * A060828(n-k)).
T(n,k) = Product_{i=1..n} A038500(i)/(Product_{i=1..k} A038500(i)*Product_{i=1..n-k} A038500(i)).
T(n,k) = A038500(n)/n*(k/A038500(k)*T(n-1,k-1)+(n-k)/A038500(n-k)*T(n-1,k)).

A136690 Final nonzero digit of n! in base 3.

Original entry on oeis.org

1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2
Offset: 0

Views

Author

Carl R. White, Jan 16 2008

Keywords

Examples

			6! = 720 decimal = 222200 ternary, so a(6) = 2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Mod[6 Times @@ (Rest[ FoldList[{1 + #1[[1]], #2! 2^(#1[[1]] #2)} &, {0, 0}, Reverse[ IntegerDigits[n, 3]]]]), 10][[2]]; # /. {0 -> 1} & /@ Mod[Table[f@n, {n, 0, 104}], 3] (* Robert G. Wilson v, Apr 17 2010 *)
    fnzd[n_]:=Module[{sidn3=Split[IntegerDigits[n!,3]]},If[MemberQ[ Last[ sidn3],0], sidn3[[-2,1]], sidn3[[-1,1]]]]; Array[fnzd,110,0] (* Harvey P. Dale, May 03 2018 *)
  • PARI
    a(n) = vecsum([bittest(220,b) |b<-digits(n,9)])%2 + 1; \\ Kevin Ryde, Dec 03 2022

Formula

From David Radcliffe, Sep 03 2021: (Start)
a(n) = (n! / A060828(n)) mod 3;
a(n) = 1 + (A189672(n) mod 2);
a(6*n) = a(6*n+1) = a(2*n);
a(6*n+2) = 3 - a(2*n);
a(6*n+3) = a(6*n+4) = 3 - a(2*n+1);
a(6*n+5) = a(2*n+1).
(End)
a(n) = A008904(A127110(n)). - Michel Marcus, Sep 04 2021
From Kevin Ryde, Dec 03 2022: (Start)
a(n) = 1 if n written in base 9 has an even number of digits {2,3,4,6,7}; and otherwise a(n) = 2.
Fixed point of the morphism 1 -> 1,1,2,2,2,1,2,2,1; 2 -> 2,2,1,1,1,2,1,1,2; starting from 1.
(End)
a(n) = A212307(n) mod 3. - Ridouane Oudra, Sep 25 2024

Extensions

More terms from Robert G. Wilson v, Apr 17 2010

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

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)).

A243758 a(n) = Product_{i=1..n} A234959(i).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 36, 36, 36, 36, 36, 36, 216, 216, 216, 216, 216, 216, 1296, 1296, 1296, 1296, 1296, 1296, 7776, 7776, 7776, 7776, 7776, 7776, 279936, 279936, 279936, 279936, 279936, 279936, 1679616, 1679616, 1679616, 1679616, 1679616, 1679616, 10077696
Offset: 0

Views

Author

Tom Edgar, Jun 10 2014

Keywords

Comments

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

Crossrefs

Programs

  • Haskell
    a243758 n = a243758_list !! n
    a243758_list = scanl (*) 1 a234959_list
    -- Reinhard Zumkeller, Feb 09 2015
    
  • Mathematica
    Table[Product[6^IntegerExponent[k, 6], {k, 1, n}], {n, 0, 20}] (* G. C. Greubel, Dec 24 2016 *)
  • PARI
    valp(n,p)=my(s); while(n\=p, s+=n); s
    a(n)=6^valp(n,6) \\ Charles R Greathouse IV, Oct 03 2016
  • Sage
    S=[0]+[6^valuation(i,6) for i in [1..100]]
    [prod(S[1:i+1]) for i in [0..99]]
    

Formula

a(n) = Product_{i=1..n} A234959(i).
a(n) = 6^(A054895(n)).

A243759 Triangle T(m,k): exponent of the highest power of 3 dividing the binomial coefficient binomial(m,k).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 2, 1, 2, 2, 0, 0, 0, 2, 1, 1, 2, 1, 1, 2, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 2, 2, 1, 2, 2
Offset: 0

Views

Author

Tom Edgar, Jun 10 2014

Keywords

Comments

T(m,k) is the number of 'carries' that occur when adding k and n-k in base 3 using the traditional addition algorithm.

Examples

			The triangle begins:
0,
0, 0,
0, 0, 0,
0, 1, 1, 0;
0, 0, 1, 0, 0;
0, 0, 0, 0, 0, 0;
0, 1, 1, 0, 1, 1, 0;
0, 0, 1, 0, 0, 1, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 2, 2, 1, 2, 2, 1, 2, 2, 0;
		

Crossrefs

Programs

  • Maple
    A243759:= (m,k) -> padic[ordp](binomial(m,k),3);
    for m from 0 to 50 do
      seq(A243759(m,k),k=0..m)
    od;   # Robert Israel, Jun 15 2014
  • Mathematica
    T[m_, k_] := IntegerExponent[Binomial[m, k], 3];
    Table[T[m, k], {m, 0, 12}, {k, 0, m}] // Flatten (* Jean-François Alcover, Jun 05 2022 *)
  • Sage
    m=50
    T=[0]+[3^valuation(i, 3) for i in [1..m]]
    Table=[[prod(T[1:i+1])/(prod(T[1:j+1])*prod(T[1:i-j+1])) for j in [0..i]] for i in [0..m-1]]
    [log(Integer(x),base=3) for sublist in Table for x in sublist]
    
  • Scheme
    (define (A243759 n) (A007949 (A007318 n))) ;; Antti Karttunen, Oct 28 2014

Formula

T(m,k) = log_3(A242849(m,k)).
From Antti Karttunen, Oct 28 2014: (Start)
a(n) = A007949(A007318(n)).
a(n) * A083093(n) = 0 and a(n) + A083093(n) > 0 for all n.
(End)

Extensions

Name clarified by Antti Karttunen, Oct 28 2014

A118381 Largest 3-smooth number dividing n!.

Original entry on oeis.org

1, 2, 6, 24, 24, 144, 144, 1152, 10368, 20736, 20736, 248832, 248832, 497664, 1492992, 23887872, 23887872, 429981696, 429981696, 1719926784, 5159780352, 10319560704, 10319560704, 247669456896, 247669456896, 495338913792, 13374150672384, 53496602689536, 53496602689536
Offset: 1

Views

Author

Reinhard Zumkeller, May 16 2006

Keywords

Crossrefs

Programs

  • Mathematica
    s[n_, b_] := Sum[IntegerExponent[k, b], {k, 1, n}]; a[n_] := 2^s[n, 2] * 3^s[n, 3]; Array[a, 30] (* Amiram Eldar, Jan 29 2020 *)

Formula

a(n) = A060818(n) * A060828(n).

Extensions

More terms from Amiram Eldar, Jan 29 2020

A212307 Numerator of n!/3^n.

Original entry on oeis.org

1, 1, 2, 2, 8, 40, 80, 560, 4480, 4480, 44800, 492800, 1971200, 25625600, 358758400, 1793792000, 28700672000, 487911424000, 975822848000, 18540634112000, 370812682240000, 2595688775680000, 57105153064960000, 1313418520494080000, 10507348163952640000
Offset: 0

Views

Author

Keywords

Comments

Also the 3rd column of A152656 (or of A216919).

Crossrefs

Cf. A001316, A049606, A125824 (denominators), A152656, A216919.

Programs

  • Mathematica
    Table[Numerator[n!/3^n], {n, 0, 32}]
    (* or *) CoefficientList[Series[Exp[3x], {x, 0, 32}], x] // Denominator
  • PARI
    a(n) = numerator(n!/3^n); \\ Michel Marcus, Oct 30 2013

Formula

a(n) = Product_{i=1..n} A038502(i). - Tom Edgar, Mar 22 2014
a(n) = A000142(n)/A060828(n). - Ridouane Oudra, Sep 23 2024
Showing 1-10 of 11 results. Next