OFFSET
1,1
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(Im@Z=1, [$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, 250], Im[z[#]] == 1&] (* Jean-François Alcover, Jan 31 2018 *)
PROG
(PARI) isok(n) = {d = Vecrev(binary(n)); imag(sum(k=1, #d, d[k]*I^(k-1))) == 1; } \\ Michel Marcus, Jan 31 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 22 2007
STATUS
approved