login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A379675
a(0) = 0, and for any n > 0, a(n) is the least integer (in absolute value) not yet in the sequence such that the absolute difference of a(n-1) and a(n) is a square and a(n) is positive iff n is odd.
1
0, 1, -3, 6, -10, 15, -1, 3, -6, 10, -15, 21, -4, 5, -11, 14, -2, 2, -7, 9, -16, 20, -5, 4, -12, 13, -23, 26, -38, 11, -14, 22, -27, 37, -44, 56, -8, 8, -17, 19, -30, 34, -47, 17, -19, 30, -34, 47, -53, 28, -21, 43, -57, 7, -9, 16, -20, 29, -35, 46, -18, 18
OFFSET
0,3
COMMENTS
This sequence is a variant of A377091 where, beyond the initial term a(0) = 0, the sign of the terms alternates.
Will every integer appear in the sequence?
LINKS
Rémy Sigrist, Colored scatterplot of the sequence for n = 0..10000 (where the color is function of Sum_{k = 0..n-1} sign(a(k+1)-a(k)) * sqrt(abs(a(k+1)-a(k))))
Rémy Sigrist, PARI program
EXAMPLE
The first terms are:
n a(n) |a(n)-a(n-1)|
-- ---- -------------
0 0 N/A
1 1 1^2
2 -3 2^2
3 6 3^2
4 -10 4^2
5 15 5^2
6 -1 4^2
7 3 2^2
8 -6 3^2
9 10 4^2
10 -15 5^2
11 21 6^2
12 -4 5^2
13 5 3^2
14 -11 4^2
PROG
(PARI) \\ See Links section.
CROSSREFS
Sequence in context: A049989 A330258 A197056 * A104619 A194037 A194101
KEYWORD
sign
AUTHOR
Rémy Sigrist, Dec 29 2024
STATUS
approved