Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #9 Sep 02 2018 13:34:37
%S 0,1,1,2,4,1,5,2,4,5,1,2,8,5,5,2,16,25,17,26,4,9,5,10,20,29,17,26,8,
%T 13,5,10,16,17,25,26,20,17,29,26,4,5,9,10,8,5,13,10,32,41,41,50,20,25,
%U 29,34,20,29,25,34,8,13,13,18,64,49,65,50,100,81,101
%N For any n >= 0 with binary expansion Sum_{k=0..w} b_k * 2^k, let f(n) = Sum_{k=0..w} b_k * i^k * 2^floor(k/2) (where i denotes the imaginary unit); a(n) is the square of the modulus of f(n).
%C See A318702 for the real part of f and additional comments.
%H Rémy Sigrist, <a href="/A318704/b318704.txt">Table of n, a(n) for n = 0..16383</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F a(n) = A318702(n)^2 + A318703(n)^2.
%F a(4 * k) = 4 * a(k) for any k >= 0.
%o (PARI) a(n) = my (b=Vecrev(binary(n))); norm(sum(k=1, #b, b[k] * I^(k-1) * 2^floor((k-1)/2)))
%Y Cf. A318702.
%K nonn,base,look
%O 0,4
%A _Rémy Sigrist_, Sep 01 2018