OFFSET
0,3
COMMENTS
A variant of A377091 based on cubes instead of squares.
Conjecture: Every integer (positive or negative) appears in this sequence.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, PARI program
EXAMPLE
The initial terms are:
n a(n) |a(n)-a(n-1)|
-- ---- -------------
0 0 N/A
1 1 1^3
2 2 1^3
3 3 1^3
4 4 1^3
5 -4 2^3
6 -3 1^3
7 -2 1^3
8 -1 1^3
9 7 2^3
10 6 1^3
11 5 1^3
12 13 2^3
13 12 1^3
14 11 1^3
PROG
(PARI) \\ See Links section.
(Python)
from sympy import integer_nthroot
from itertools import count, islice
def cond(n): return integer_nthroot(n, 3)[1]
def agen(): # generator of terms
an, aset, m = 0, {0}, 1
for n in count(0):
yield an
an = next(s for k in count(m) for s in [k, -k] if s not in aset and cond(abs(an-s)))
aset.add(an)
while m in aset and -m in aset: m += 1
print(list(islice(agen(), 62))) # Michael S. Branicky, Jan 04 2025
CROSSREFS
KEYWORD
sign,new
AUTHOR
Rémy Sigrist, Jan 04 2025
STATUS
approved