A128501 a(n) = lcm{1 <= k <= n, gcd(k, 3) = 1}.
1, 1, 2, 2, 4, 20, 20, 140, 280, 280, 280, 3080, 3080, 40040, 40040, 40040, 80080, 1361360, 1361360, 25865840, 25865840, 25865840, 25865840, 594914320, 594914320, 2974571600, 2974571600, 2974571600, 2974571600, 86262576400
Offset: 0
Programs
-
Maple
A128501 := n -> ilcm(op(select(j->igcd(j,3) = 1,[$1..n]))): seq(A128501(i),i=0..28); # Peter Luschny, Oct 15 2012
-
Mathematica
a[n_] := If[n == 0, 1, LCM @@ Select[Range[n], GCD[#, 3] == 1&]]; Array[a, 30, 0] (* Jean-François Alcover, Jun 14 2019, from Maple *)
-
Sage
def A128501(n): return lcm([j for j in (1..n) if gcd(j,3) == 1]) [A128501(n) for n in (0..28)] # Peter Luschny, Oct 15 2012
Formula
a(n+1) = denominator(r(n)) with the rationals r(n):=Sum_{k=0..n} ((-1)^k)*S(k,1)/(k+1) with Chebyshev's S-Polynomials S(n,1)=[1,1,0,-1,-1,0] periodic sequence with period 6. See A010892.
Extensions
New name and 1 prepended by Peter Luschny, Oct 15 2012
Comments