OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
Z:= proc(n) option remember;
I*procname(floor(n/2))+(n mod 2)
end proc:
Z(0):= 0:
select(Re@Z=0, [$0..1000]); # Robert Israel, Dec 18 2017
MATHEMATICA
z[0] = 0; z[n_] := z[n] = z[Floor[n/2]]*I + Mod[n, 2]; Select[Range[0, 200], Re[z[#]] == 0&] (* Jean-François Alcover, Jan 31 2018 *)
PROG
(PARI) isok(n) = {d = Vecrev(binary(n)); real(sum(k=1, #d, d[k]*I^(k-1))) == 0; } \\ Michel Marcus, Jan 31 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 22 2007
STATUS
approved