OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..100000 (using b-file in A229037)
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Block[{z = 1}, While[Catch[Do[If[z == 2*a[n - k] - a[n - 2*k], Throw@ True], {k, Floor[(n - 1)/2]}]; False], z++]; z]; Accumulate@ Array[a, 120] (* Michael De Vlieger, Sep 12 2023, after Giovanni Resta at A229037 *)
PROG
(Python)
from itertools import count, islice
def A362942_gen(): # generator of terms
blist, c = [], 0
for n in count(0):
i, j, b = 1, 1, set()
while n-(i<<1) >= 0:
b.add((blist[n-i]<<1)-blist[n-2*i])
i += 1
while j in b:
j += 1
blist.append(j)
yield (c:=c+j)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 12 2023
STATUS
approved