%I #9 Sep 08 2018 15:39:35
%S 0,1,0,3,1,1,0,1,3,3,15,0,0,1,7,1,7,7,1,3,0,7,1,2,8,2,11,3,3,12,63,1,
%T 0,1,0,3,3,1,3,1,5,1,31,16,4,19,5,31,25,6,6,31,28,31,0,3,1,7,0,2,3,0,
%U 5,7,6,7,1,0,3,3,8,11,15,3,15,63,8,9,8,10,9,2,15,12,15,15,48,12
%N Apply Lenormand's transformation k -> A318921(k) to the primes.
%H Alois P. Heinz, <a href="/A318923/b318923.txt">Table of n, a(n) for n = 1..20000</a>
%p a:= proc(n) local d, i, l, m, r;
%p i, r, l, m:= 0$2, 2, ithprime(n);
%p while m>0 do d:= irem(m, 2, 'm');
%p if d=l then r:= r+d*2^i; i:=i+1 fi; l:= d
%p od; r
%p end:
%p seq(a(n), n=1..100); # _Alois P. Heinz_, Sep 08 2018
%Y Cf. A000040, A318921.
%K nonn,base
%O 1,4
%A _N. J. A. Sloane_, Sep 08 2018