login
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
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.
FORMULA
A076042(n) = A076042(n-1) + a(n)*(n^2).
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)):
seq(a(n), n=1..105); # Alois P. Heinz, Sep 08 2019
MATHEMATICA
b[n_] := b[n] = If[n==0, 0, b[n-1] + If[b[n-1] < n^2, n^2, -n^2]];
b /@ Range[0, 100] // Differences // Sign (* Jean-François Alcover, Nov 26 2020 *)
CROSSREFS
Cf. A076042.
Sequence in context: A359738 A360710 A269529 * A156734 A119664 A257075
KEYWORD
easy,sign
AUTHOR
Allan C. Wechsler, Sep 08 2019
STATUS
approved