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.

A051146 Sequence b(n) mentioned in A051145.

This page as a plain text file.
%I A051146 #14 Jun 26 2025 12:03:42
%S A051146 1,3,6,7,11,12,13,15,22,23,31,56,57,59,62,63,99,100,101,103,110,111,
%T A051146 119,120,121,123,126,127,171,172,173,175,190,191,239,240,241,243,246,
%U A051146 247,251,252,253,255,310,311,319,328,329,331,334,335,339,340,341,343
%N A051146 Sequence b(n) mentioned in A051145.
%H A051146 Reinhard Zumkeller, <a href="/A051146/b051146.txt">Table of n, a(n) for n = 1..10000</a>
%t A051146 (* a5 = A051145 *) a5[0] = 0; a5[1] = 1; a5[n_] := a5[n] = (b = 0; While[b++; BitOr[b, a5[n-1]] <= BitOr[a5[n-2], a5[n-1]]]; b); a[n_] := BitOr[a5[n], a5[n+1]]; Table[a[n], {n, 0, 55}] (* _Jean-François Alcover_, Jan 09 2013 *)
%o A051146 (Haskell)
%o A051146 import Data.Bits ((.|.))
%o A051146 a051146 n = a051146_list !! (n-1)
%o A051146 a051146_list = zipWith (.|.) a051145_list $ tail a051145_list
%o A051146 -- _Reinhard Zumkeller_, Oct 25 2012
%Y A051146 Cf. A051145.
%K A051146 nonn,easy,nice
%O A051146 1,2
%A A051146 _N. J. A. Sloane_, E. M. Rains
%E A051146 More terms from Larry Reeves (larryr(AT)acm.org), Oct 03 2000