OFFSET
1,1
COMMENTS
Unlike equivalent sequence for primes, A008347, there are repeated terms.
FORMULA
a(n) = A002808(n) - a(n-1), for n>1.
EXAMPLE
a(4) = 9 - 8 + 6 - 4 = 3.
MATHEMATICA
Join[{4}, a[1]=4; a[n_]:=ResourceFunction["Composite"][n] - a[n-1]; Table[a[n], {n, 2, 70}]] (* or with signs *) R=70; a[1]=4; a[n_]:=a[n-1]-ResourceFunction["Composite"][n] *(-1)^n; Table[a[n], {n, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
James C. McMahon, Mar 02 2024
STATUS
approved