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!)
A333975 a(1) = 1, a(2) = 2 and for n > 2, a(n) is the smallest number not of the form OR(a(i),a(j)) for 1 <= i < j < n. 1
1, 2, 4, 7, 8, 11, 13, 14, 16, 19, 21, 22, 25, 26, 28, 32, 35, 37, 38, 41, 42, 44, 49, 50, 52, 56, 64, 67, 69, 70, 73, 74, 76, 81, 82, 84, 88, 97, 98, 100 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

MATHEMATICA

a[1] = 1; a[2] = 2;

a[n_] := a[n] =

  For[k = a[n - 1] + 1, True, k++,

   If[FreeQ[

     Table[BitOr[a[i], a[j]], {i, 1, n - 2}, {j, i + 1, n - 1}], k],

    Return[k]]];

PROG

(Python)

A333975_list, aset, m = [1, 2], set(), 2

for i in range(3, 10001):

    for j in range(i-2):

        aset.add(m|A333975_list[j])

    m += 1

    while m in aset:

        m += 1

    A333975_list.append(m) # Chai Wah Wu, Dec 21 2020

CROSSREFS

Sequence in context: A229829 A000069 A344602 * A140137 A080308 A089559

Adjacent sequences:  A333972 A333973 A333974 * A333976 A333977 A333978

KEYWORD

nonn

AUTHOR

Michal D. Kuczynski, Sep 03 2020

STATUS

approved

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 May 20 03:37 EDT 2022. Contains 353851 sequences. (Running on oeis4.)