login

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”).

(n^2 - A000695(n))/4.
3

%I #34 Aug 22 2013 15:58:30

%S 0,0,0,1,0,2,4,7,0,4,8,13,16,22,28,35,0,8,16,25,32,42,52,63,64,76,88,

%T 101,112,126,140,155,0,16,32,49,64,82,100,119,128,148,168,189,208,230,

%U 252,275,256,280,304,329,352,378,404,431,448,476,504

%N (n^2 - A000695(n))/4.

%C A000695 is a 'pseudo-square function' that takes the binary expansion of n and moves bit k to bit 2k (that is, towards the most significant bits).

%C a(n) = 0 if and only if n is 0 or a power of 2.

%H R. J. Mathar, <a href="/A213673/b213673.txt">Table of n, a(n) for n = 0..1023</a>

%e For example 7 = 111, and PSF(7) = 10101 = 21, so a(7) = (49 - 21)/4 = 7.

%e 13 = 1101 -> 1010001 = 81, so a(13) = (169 - 81)/4 = 22.

%o (PARI) a(n)=my(v=binary(n));(n^2-sum(i=1,#v,v[i]*4^(#v-i)))/4 \\ _Charles R Greathouse IV_, Mar 04 2013

%Y Cf. A000290, A000695.

%K nonn

%O 0,6

%A _Jon Perry_, Mar 03 2013