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.

A213542 a(n) = k AND k^k, where k=2*n+1, AND is the bitwise AND operator.

This page as a plain text file.
%I A213542 #23 May 22 2021 04:30:44
%S A213542 1,3,5,7,9,3,13,15,17,3,5,7,25,3,13,31,33,35,5,7,41,35,13,15,49,35,37,
%T A213542 7,57,35,45,63,65,67,69,7,9,3,13,15,81,67,5,7,25,3,77,31,97,35,5,7,41,
%U A213542 99,77,15,113,35,37,7,57,99,109,127,129,131,133,7,137,131
%N A213542 a(n) = k AND k^k, where k=2*n+1, AND is the bitwise AND operator.
%H A213542 Alois P. Heinz, <a href="/A213542/b213542.txt">Table of n, a(n) for n = 0..10000</a>
%p A213542 a:= proc(n) local i, k, m, r;
%p A213542       k:= 2*n+1;
%p A213542       m:= k &^ k mod (2^(1+ilog2(k)));
%p A213542       r:= 0;
%p A213542       for i from 0 while (m>0 or k>0) do
%p A213542         r:= r +2^i* irem(m, 2, 'm') *irem(k, 2, 'k')
%p A213542       od; r
%p A213542     end:
%p A213542 seq(a(n), n=0..100);  # _Alois P. Heinz_, Jun 21 2012
%t A213542 Table[BitAnd[n,n^n],{n,1,141,2}] (* _Harvey P. Dale_, Nov 26 2014 *)
%o A213542 (Python)
%o A213542 print([k**k & k for k in range(1,222,2)])
%Y A213542 Cf. A213541.
%K A213542 nonn,base,easy,look,less
%O A213542 0,2
%A A213542 _Alex Ratushnyak_, Jun 14 2012