login
A078589
a(1)=0, a(2)=1, a(n) = abs(abs(a(n-1)) - a(n-2) - n + 1).
1
0, 1, 1, 3, 2, 6, 2, 11, 1, 19, 8, 22, 2, 33, 17, 31, 2, 46, 26, 39, 7, 53, 24, 52, 4, 73, 43, 57, 14, 72, 28, 75, 15, 93, 44, 84, 4, 117, 75, 81, 34, 88, 12, 119, 63, 101, 8, 140, 84, 105, 29, 127, 46, 134, 34, 155, 65, 147, 24, 182, 98, 145, 15, 193, 114, 144, 36, 175
OFFSET
1,4
COMMENTS
It seems that lim_{n -> oo} M(n)/n = 3.4... where M(n) = Max(a(k), 1<=k<=n). Does a(n)=1 for a finite number of values? The first ones are 2, 3, 9, 177, 3891, ...
The next one (where a(n)=1) is 205653 and there are no further instances up to a(5 million). - Harvey P. Dale, Dec 13 2025
LINKS
MATHEMATICA
nxt[{n_, a_, b_}]:={n+1, b, Abs[Abs[b]-a-n]}; NestList[nxt, {2, 0, 1}, 70][[;; , 2]] (* Harvey P. Dale, Dec 13 2025 *)
PROG
(Python)
def A078589_list(max_n):
A = [0, 1]
for n in range(3, max_n + 1):
A.append(abs(A[-1] - A[-2] - n + 1))
return(A) # John Tyler Rascoe, Oct 25 2022
CROSSREFS
Sequence in context: A180240 A065228 A092843 * A077880 A198930 A389793
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Dec 06 2002
STATUS
approved