OFFSET
1,3
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 1..10000
EXAMPLE
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
KEYWORD
nonn,look
AUTHOR
Ctibor O. Zizka, Sep 06 2024
STATUS
approved