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.

Showing 1-3 of 3 results.

A057924 Sequence b(n) mentioned in A057923.

Original entry on oeis.org

2, 3, 5, 6, 7, 13, 14, 15, 25, 26, 27, 29, 30, 31, 45, 46, 47, 49, 50, 51, 53, 54, 55, 61, 62, 63, 89, 90, 91, 93, 94, 95, 125, 126, 127, 225, 226, 227, 229, 230, 231, 237, 238, 239, 249, 250, 251, 253, 254, 255, 397, 398, 399, 401, 402, 403, 405, 406, 407, 413, 414
Offset: 1

Views

Author

Larry Reeves (larryr(AT)acm.org), Oct 03 2000

Keywords

Crossrefs

Programs

  • Maple
    A[0]:= 0: A[1]:= 2: B[1]:= 2:
    for n from 2 to 100 do
      for k from B[n-1]-A[n-1] do
        b:= Bits:-Or(A[n-1],k);
        if b > B[n-1] then A[n]:= k; B[n]:= b; break fi
      od;
    od:
    seq(B[n],n=1..100); # Robert Israel, Aug 13 2017

A057925 Position of first occurrence of 2^n in A057923.

Original entry on oeis.org

2, 1, 3, 6, 9, 15, 27, 36, 51, 87, 135, 243, 315, 531, 735, 969, 1707, 2679, 3831, 6363, 9663, 14559, 23091, 33045, 45999, 77523, 120471, 177639, 252717, 405321, 554037, 795831, 1335087, 1819527, 2491233, 4183467, 5920215, 8051991, 12530967
Offset: 0

Views

Author

Larry Reeves (larryr(AT)acm.org), Oct 03 2000

Keywords

Crossrefs

Extensions

More terms from David W. Wilson, Jan 11 2001
Definition corrected by Michel Marcus, Aug 02 2013

A051145 a(0)=0, a(1)=1, a(n) = smallest number such that sequence b(n) = a(n) OR a(n+1) is strictly monotonically increasing.

Original entry on oeis.org

0, 1, 2, 4, 3, 8, 4, 9, 6, 16, 7, 24, 32, 25, 34, 28, 35, 64, 36, 65, 38, 72, 39, 80, 40, 81, 42, 84, 43, 128, 44, 129, 46, 144, 47, 192, 48, 193, 50, 196, 51, 200, 52, 201, 54, 256, 55, 264, 64, 265, 66, 268, 67, 272, 68, 273, 70, 280, 71, 288, 72, 289, 74, 292, 75, 304
Offset: 0

Views

Author

N. J. A. Sloane, E. M. Rains

Keywords

Comments

a(A051147(n)) = 2^n; A209229(a(A244747(n))) = 1. - Reinhard Zumkeller, Jul 06 2014

Examples

			To find a(6): we have a(4)=3=11, a(5)=8=1000, 3 OR 8 = 1011 = 11, smallest number which when OR-ed with 8 gives a number bigger than 11 is 4, since then 4=100 OR 8=1000 = 1100=12; so a(6)=4, b(6)=12 (cf. A051146).
		

Crossrefs

Programs

  • Haskell
    import Data.Bits ((.|.))
    a051145 n = a051145_list !! n
    a051145_list = 0 : 1 : f 1 1 where
       f x b = y : f y z where
         (y, z) = head [(y, z) | y <- [1..],
                                 let z = x .|. y :: Integer, z > b]
    -- Reinhard Zumkeller, Oct 25 2012
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = (b = 0; While[b++; BitOr[b, a[n-1]] <= BitOr[a[n-2], a[n-1]]]; b); Table[a[n], {n, 0, 65}] (* Jean-François Alcover, Oct 07 2011 *)

Formula

a(n) = ((a(n-1) OR a(n-2)) + 1) AND NOT a(n-1). - Charlie Neder, Oct 12 2018

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 03 2000
Showing 1-3 of 3 results.