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.

A224694 Numbers n such that n^2 AND n = 0, where AND is the bitwise logical AND operator.

This page as a plain text file.
%I A224694 #28 Feb 01 2025 14:56:53
%S A224694 0,2,4,8,10,12,16,18,24,26,32,34,36,40,44,48,50,56,64,66,68,76,80,90,
%T A224694 96,98,100,108,112,128,130,132,136,138,144,146,152,160,164,168,176,
%U A224694 184,192,194,196,208,224,228,240,256,258,260,264,266,268,280,282,288,290,296,312
%N A224694 Numbers n such that n^2 AND n = 0, where AND is the bitwise logical AND operator.
%C A224694 Indices of zeros in A213541.
%C A224694 The sequence b(n) = a(n)/2  begins: 0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 16, 17, 18, 20, 22, 24, 25, 28, 32, 33, 34, 38, 40, 45, 48, 49, 50, 54, 56, 64
%H A224694 Reinhard Zumkeller, <a href="/A224694/b224694.txt">Table of n, a(n) for n = 1..10000</a>
%p A224694 read("transforms") :
%p A224694 isA224694 := proc(n)
%p A224694     return( ANDnos(n^2,n) =0 ) ;
%p A224694 end proc:
%p A224694 A224694 := proc(n)
%p A224694     option remember;
%p A224694     if n = 1 then
%p A224694         0;
%p A224694     else
%p A224694         for a from procname(n-1)+1 do
%p A224694             if isA224694(a) then
%p A224694                 return a;
%p A224694             end if;
%p A224694         end do:
%p A224694     end if;
%p A224694 end proc: # _R. J. Mathar_, Apr 25 2013
%t A224694 Select[Range[0, 350], BitAnd[#^2, #] == 0 &] (* _Matthew House_, Jul 14 2015 *)
%o A224694 (Python)
%o A224694 for i in range(333):
%o A224694     if ((i*i) & i)==0:
%o A224694         print(i, end=', ')
%o A224694 (Haskell)
%o A224694 import Data.List (elemIndices)
%o A224694 a224694 n = a224694_list !! (n-1)
%o A224694 a224694_list = elemIndices 0 a213541_list
%o A224694 -- _Reinhard Zumkeller_, Apr 25 2013
%Y A224694 Cf. A213541.
%K A224694 nonn,easy,base
%O A224694 1,2
%A A224694 _Alex Ratushnyak_, Apr 15 2013