OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = Sum_{k=0..floor(n/2)} ( 2^(n-2*k) mod (k+2) ).
MATHEMATICA
Table[Sum[Mod[2^(n-2*k), k+2], {k, 0, Floor[n/2]}], {n, 0, 80}] (* G. C. Greubel, Jan 10 2023 *)
PROG
(Magma) [(&+[2^(n-2*k) mod (k+2): k in [0..Floor(n/2)]]): n in [0..80]]; // G. C. Greubel, Jan 10 2023
(SageMath)
def A106264(n): return sum( (2^(n-2*k)%(k+2)) for k in range(n//2+1) )
[A106264(n) for n in range(81)] # G. C. Greubel, Jan 10 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 28 2005
STATUS
approved