login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A376023
a(1) = 1, for n >= 2, a(n) = abs(a(n - 1) + A376022(n)).
1
1, 0, 3, 10, 17, 19, 19, 18, 15, 9, 6, 65, 74, 78, 80, 80, 79, 76, 71, 63, 49, 9, 62, 77, 85, 90, 93, 94, 93, 90, 85, 78, 68, 52, 21, 204, 247, 266, 277, 284, 288, 290, 290, 289, 286, 281, 274, 264, 250, 229, 192, 62, 150, 182, 201, 214, 223, 229, 233, 235, 235, 234, 231
OFFSET
1,3
LINKS
EXAMPLE
a(1) = 1.
a(2) = abs(a(1) + A376022(2)) = abs(1+(-1)) = 0.
a(3) = abs(0 + A376022(3)) = abs(0 + (-3)) = 3.
a(4) = abs(3 + A376022(4)) = abs(3 + (-13)) = 10.
and so on.
MATHEMATICA
s[1] = 1; s[n_] := s[n] = -1 + Floor[n*s[n-1]/(n + s[n-1])]; a[1] = 1; a[n_] := a[n] = Abs[a[n-1] + s[n]]; Array[a, 100] (* Amiram Eldar, Sep 06 2024 *)
PROG
(Python)
from itertools import count, islice
def a_gen():
a, c = 1, 1
for n in count(2):
yield c
b = -1+(n*a)//(n+a)
d = abs(c + b)
a = b
c = d
A376023_list = list(islice(a_gen(), 100)) # John Tyler Rascoe, Sep 17 2024
(PARI) lista(nn)= my(a=-2, b=0); vector(nn, n, a=floor(n*a/(n+a))-1; b=abs(a+b)); \\ Ruud H.G. van Tol, Nov 28 2024
CROSSREFS
Cf. A376022.
Sequence in context: A059911 A160375 A300017 * A176760 A188396 A356090
KEYWORD
nonn,look
AUTHOR
Ctibor O. Zizka, Sep 06 2024
STATUS
approved