login
Numbers m such that A131851(m) = 0.
8

%I #15 Jun 05 2024 14:03:23

%S 0,2,5,7,8,10,13,15,20,22,28,30,32,34,37,39,40,42,45,47,52,54,60,62,

%T 65,67,73,75,80,82,85,87,88,90,93,95,97,99,105,107,112,114,117,119,

%U 120,122,125,127,128,130,133,135,136,138,141,143,148,150,156,158,160,162,165

%N Numbers m such that A131851(m) = 0.

%H Robert Israel, <a href="/A131854/b131854.txt">Table of n, a(n) for n = 1..10000</a>

%p Z:= proc(n) option remember;

%p I*procname(floor(n/2))+(n mod 2)

%p end proc:

%p Z(0):= 0:

%p select(Re@Z=0, [$0..1000]); # _Robert Israel_, Dec 18 2017

%t 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 *)

%o (PARI) isok(n) = {d = Vecrev(binary(n)); real(sum(k=1, #d, d[k]*I^(k-1))) == 0;} \\ _Michel Marcus_, Jan 31 2018

%Y Cf. A131853, A131855, A131859, A131861, A131863.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Jul 22 2007