cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A213541 a(n) = n AND n^2, where AND is the bitwise AND operator.

This page as a plain text file.
%I A213541 #32 Jun 25 2023 04:01:31
%S A213541 0,1,0,1,0,1,4,1,0,1,0,9,0,9,4,1,0,1,0,1,16,17,4,17,0,17,0,25,16,9,4,
%T A213541 1,0,1,0,1,0,1,36,33,0,1,32,41,0,41,4,33,0,33,0,33,16,49,36,17,0,49,
%U A213541 32,25,16,9,4,1,0,1,0,1,0,1,4,1,64,65,64,73,0,9,68
%N A213541 a(n) = n AND n^2, where AND is the bitwise AND operator.
%C A213541 The graph of this sequence has the shape of a tilted Sierpinski triangle. - _WG Zeist_, Jan 15 2019
%H A213541 Reinhard Zumkeller, <a href="/A213541/b213541.txt">Table of n, a(n) for n = 0..8192</a>
%F A213541 a(2^k + x) = a(x) + (x^2 AND 2^k) for 0 <= x < 2^k. - _David Radcliffe_, May 06 2023
%t A213541 Table[BitAnd[n, n^2], {n, 0, 63}] (* _Alonso del Arte_, Jun 19 2012 *)
%o A213541 (Python)
%o A213541 print([n*n & n for n in range(99)])
%o A213541 (Haskell)
%o A213541 import Data.Bits ((.&.))
%o A213541 a213541 n = n .&. n ^ 2  -- _Reinhard Zumkeller_, Apr 25 2013
%o A213541 (PARI) a(n) = bitand(n, n^2); \\ _Michel Marcus_, Jan 15 2019
%Y A213541 Cf. A213370.
%Y A213541 Cf. A000290.
%Y A213541 Cf. A007745 (OR), A169810 (XOR), A002378.
%K A213541 nonn,base,easy,less,look
%O A213541 0,7
%A A213541 _Alex Ratushnyak_, Jun 14 2012