|
|
A096433
|
|
a(1) = 1; for n > 1, choose a(n) so that Sum_{1 <= k <= n, gcd(k,n+1)=1} a(k) = 0.
|
|
2
|
|
|
1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 3, -3, -1, 1, -3, 3, 1, -1, 1, -1, -1, -1, 5, -1, -1, -1, -1, 1, -1, 1, -3, 5, -3, 1, 7, -5, -1, -1, -9, 9, 5, 3, 3, -11, -3, 7, 7, 9, -1, -19, -7, 17, 11, 9, -7, -23, 1, -1, -1, 37, 1, -33, -1, -3, -3, 15, 27, -39, -7, 7, -9, 47, -13, -37, 11, 1, -5, 51, -9, -37, 19, 17, -5, -1, 13, -43, -5, -3, 13
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,13
|
|
LINKS
|
|
|
FORMULA
|
a(n) = -Sum_{1 <= k <= n-1, gcd(k, n+1) = 1} a(k).
|
|
EXAMPLE
|
a(7) = 1 since the positive integers < 8 and coprime to 8 are 1, 3, 5, 7, and thus a(1) + a(3) + a(5) + a(7) = 1 - 1 - 1 + 1 = 0.
|
|
MAPLE
|
A:= Vector(100):
A[1]:= 1:
for n from 2 to 100 do
A[n]:= -convert(A[select(t -> igcd(t, n+1)=1, [$1..n-1])], `+`)
od:
|
|
MATHEMATICA
|
a[1] = 1; a[n_] := a[n] = Block[{k = Select[ Range[n - 1], GCD[ #, n + 1] == 1 &]}, -Plus @@ (a /@ k)]; Table[ a[n], {n, 94}] (* Robert G. Wilson v, Aug 24 2004 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|