login
A120112
Row sums of number triangle A120111.
5
1, -1, -2, -1, -4, 0, -6, -1, -2, 0, -10, 0, -12, 0, 0, -1, -16, 0, -18, 0, 0, 0, -22, 0, -4, 0, -2, 0, -28, 0, -30, -1, 0, 0, 0, 0, -36, 0, 0, 0, -40, 0, -42, 0, 0, 0, -46, 0, -6, 0, 0, 0, -52, 0, 0, 0, 0, 0, -58, 0, -60, 0, 0, -1, 0, 0, -66, 0, 0, 0, -70, 0, -72
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
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