OFFSET
0,3
COMMENTS
The last row of the columns in tables A133232 and A133233 are given by this sequence via the formula: if n < k + k*abs(a(n)) then k, otherwise 1 (1 <= k <= n). - Mats Granvik, Jan 22 2008
LINKS
Muniru A Asiru, Table of n, a(n) for n = 0..5000
FORMULA
a(n) = 1 - lcm(1,...,n+1)/lcm(1,...,n) for n > 0.
a(n) = 1 - A014963(n+1). - Joerg Arndt, Sep 12 2016
MATHEMATICA
Table[If[n==0, 1, 1-LCM@@Range[n+1]/(LCM@@Range[n])], {n, 0, 100}] (* G. C. Greubel, May 05 2023 *)
PROG
(PARI) a(n) = if (n==0, 1, 1 - lcm(vector(n+1, k, k))/lcm(vector(n, k, k))); \\ Michel Marcus, Sep 11 2016
(GAP) Concatenation([1], List([1..70], n->1-Lcm(List([1..n+1], i->i))/Lcm(List([1..n], i->i)))); # Muniru A Asiru, Mar 04 2019
(Magma)
A120112:= func< n | n eq 0 select 1 else 1-Lcm([1..n+1])/Lcm([1..n]) >;
[A120112(n): n in [0..100]]; // G. C. Greubel, May 05 2023
(SageMath)
def A120112(n):
return 1 if n == 0 else 1 - lcm(range(1, n+2)) // lcm(range(1, n+1))
[A120112(n) for n in range(101)] # G. C. Greubel, May 05 2023
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Jun 09 2006
STATUS
approved