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.

A135354 a(0)=1, a(n) = largest divisor of n! that is coprime to a(n-1).

Original entry on oeis.org

1, 1, 2, 3, 8, 15, 16, 315, 128, 2835, 256, 155925, 1024, 6081075, 2048, 638512875, 32768, 10854718875, 65536, 1856156927625, 262144, 194896477400625, 524288, 49308808782358125, 4194304, 3698160658676859375, 8388608, 1298054391195577640625, 33554432, 263505041412702261046875, 67108864
Offset: 0

Views

Author

Leroy Quet, Dec 07 2007

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n,a)
      local P,R,i;
      P:= select(t -> isprime(t) and igcd(t,a)=1, [2,seq(i,i=3..n,2)]);
      R:= map(proc(p) local k; add(floor(n/p^k), k=1 ..ilog[p](n)) end proc, P);
      mul(P[i]^R[i],i=1..nops(P));
    end proc:
    R:= 1: r:= 1: for i from 1 to 50 do r:= f(i,r); R:= R,r od:
    R; # Robert Israel, Jul 21 2024
  • Mathematica
    a = {1}; For[n = 1, n < 25, n++, AppendTo[a, Select[Divisors[n! ], GCD[a[[ -1]], # ] == 1 &][[ -1]]]]; a (* Stefan Steinerberger, Dec 10 2007 *)
    ldnf[{n_,a_}]:={n+1,Max[Select[Divisors[(n+1)!],CoprimeQ[#,a]&]]}; Transpose[ NestList[ldnf,{0,1},30]][[2]] (* Harvey P. Dale, Jan 21 2016 *)

Formula

a(2n) = the largest power of 2 that divides (2n)!. a(2n+1) = the largest odd divisor of (2n+1)! = (2n+1)!/a(2n).

Extensions

More terms from Stefan Steinerberger, Dec 10 2007
More terms from Robert Israel, Jul 21 2024