|
|
A325931
|
|
Signs of first differences of A076042.
|
|
1
|
|
|
1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
COMMENTS
|
The sequence of first differences of A076042 is this sequence times n^2. After the first five entries, the sequence consists mostly of alternating 1 and -1, with an increasingly rare extra 1.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
A076042(10) - A076072(9) = 7 - 107 = -100 = (-1)*(11^2), so a(10) = -1.
|
|
MAPLE
|
b:= proc(n) option remember; `if`(n=0, 0, (t->
t+`if`(t<n^2, 1, -1)*n^2)(b(n-1)))
end:
a:= n-> signum(b(n)-b(n-1)):
|
|
MATHEMATICA
|
b[n_] := b[n] = If[n==0, 0, b[n-1] + If[b[n-1] < n^2, n^2, -n^2]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|