OFFSET
0,7
COMMENTS
The graph of this sequence has the shape of a tilted Sierpinski triangle. - WG Zeist, Jan 15 2019
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..8192
FORMULA
a(2^k + x) = a(x) + (x^2 AND 2^k) for 0 <= x < 2^k. - David Radcliffe, May 06 2023
MATHEMATICA
Table[BitAnd[n, n^2], {n, 0, 63}] (* Alonso del Arte, Jun 19 2012 *)
PROG
(Python)
print([n*n & n for n in range(99)])
(Haskell)
import Data.Bits ((.&.))
a213541 n = n .&. n ^ 2 -- Reinhard Zumkeller, Apr 25 2013
(PARI) a(n) = bitand(n, n^2); \\ Michel Marcus, Jan 15 2019
CROSSREFS
KEYWORD
AUTHOR
Alex Ratushnyak, Jun 14 2012
STATUS
approved