The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213673 (n^2 - A000695(n))/4. 3
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, 101, 112, 126, 140, 155, 0, 16, 32, 49, 64, 82, 100, 119, 128, 148, 168, 189, 208, 230, 252, 275, 256, 280, 304, 329, 352, 378, 404, 431, 448, 476, 504 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
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).
a(n) = 0 if and only if n is 0 or a power of 2.
LINKS
EXAMPLE
For example 7 = 111, and PSF(7) = 10101 = 21, so a(7) = (49 - 21)/4 = 7.
13 = 1101 -> 1010001 = 81, so a(13) = (169 - 81)/4 = 22.
PROG
(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
CROSSREFS
Sequence in context: A111768 A011177 A335534 * A118946 A097879 A180658
KEYWORD
nonn
AUTHOR
Jon Perry, Mar 03 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 05:12 EDT 2024. Contains 372528 sequences. (Running on oeis4.)