OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
FORMULA
From G. C. Greubel, Jan 12 2023: (Start)
a(n) = Sum_{k=0..n} A168030(n, k).
a(n) = Sum_{k=0..n} (A118340(n, k) mod 2). (End)
MATHEMATICA
t[n_, k_]:= t[n, k]= If[k<0 || k>n, 0, If[k==0, 1, If[n<=2*k, t[n, n-k -1] + t[n-1, k], t[n, n-k] + t[n-1, k]]]]; (* A118340 *)
Table[Sum[Mod[t[n, k], 2], {k, 0, n}], {n, 0, 80}] (* G. C. Greubel, Jan 12 2023 *)
PROG
(SageMath)
@CachedFunction
def t(n, k): # t = A118340
if (k<0 or k>n): return 0
elif (k==0): return 1
elif (n>2*k): return t(n, n-k) + t(n-1, k)
else: return t(n, n-k-1) + t(n-1, k)
def A168148(n): return sum( t(n, k)%2 for k in range(n+1))
[A168148(n) for n in range(81)] # G. C. Greubel, Jan 12 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Philippe Deléham, Nov 19 2009
EXTENSIONS
Terms a(16) onward added by G. C. Greubel, Jan 12 2023
STATUS
approved