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!)
A007461 Shifts left under AND-convolution with itself.
(Formerly M0117)
7

%I M0117 #30 Dec 17 2021 11:11:38

%S 1,1,2,1,2,4,0,5,2,4,0,10,0,12,4,13,6,12,0,18,12,20,20,36,20,36,16,44,

%T 32,60,40,73,50,56,40,58,44,52,60,84,36,112,88,108,136,132,152,178,

%U 136,232,108,260,244,256,304,288

%N Shifts left under AND-convolution with itself.

%C a(A000225(n)) mod 2 = 1, a(A062289(n)) mod 2 = 0. [_Reinhard Zumkeller_, Apr 02 2012]

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Reinhard Zumkeller, <a href="/A007461/b007461.txt">Table of n, a(n) for n = 0..10000</a>

%H M. Bernstein and N. J. A. Sloane, <a href="http://arXiv.org/abs/math.CO/0205301">Some canonical sequences of integers</a>, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]

%H M. Bernstein and N. J. A. Sloane, <a href="/A003633/a003633_1.pdf">Some canonical sequences of integers</a>, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]

%p a:= proc(n) option remember; `if`(n=0, 1, add(

%p Bits[And](a(i), a(n-1-i)), i=0..n-1))

%p end:

%p seq(a(n), n=0..80); # _Alois P. Heinz_, Jun 16 2018

%t a[0]=1; a[1]=1; a[n_] := a[n] = Sum[BitAnd[a[k], a[n-k-1]], {k, 0, n-1}]; Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Sep 07 2012 *)

%o (Haskell)

%o import Data.Bits ((.&.))

%o a007461 n = a007461_list !! n

%o a007461_list = 1 : f [1,1] where

%o f xs = x : f (x:xs) where

%o x = sum $ zipWith (.&.) xs $ tail $ reverse xs :: Integer

%o -- _Reinhard Zumkeller_, Apr 02 2012

%Y Cf. A007460, A199770.

%K nonn,nice,eigen

%O 0,3

%A _N. J. A. Sloane_

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 April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)