OFFSET
0,2
COMMENTS
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..16383
Walter Trump, Log-log plot of first 2^24 terms. Green dots (which overwrite the black dots) indicate terms a(n) which are divisible by 64.
MAPLE
g:= proc() false end: t:= 2:
b:= proc(n) option remember; global t; local k; if n<2 then n
else for k from t while g(k) or Bits[And](k, b(n-2))>0
or Bits[And](k, b(n-1))>0 do od; g(k):=true;
while g(t) do t:=t+1 od; k fi
end:
a:= n-> b(n)+b(n+1):
seq(a(n), n=0..100); # Alois P. Heinz, May 09 2022
MATHEMATICA
g[_] = False ; t = 2;
b[n_] := b[n] = Module[{k}, If[n < 2, n,
For[k = t, g[k] || BitAnd[k, b[n-2]] > 0 ||
BitAnd[k, b[n-1]] > 0, k++]; g[k] = True;
While[g[t], t = t+1]; k]];
a[n_] := b[n] + b[n+1];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jul 07 2022, after Alois P. Heinz *)
PROG
(Python)
from itertools import count, islice
def A353715_gen(): # generator of terms
s, a, b, c, ab = {0, 1}, 0, 1, 2, 1
yield 1
while True:
for n in count(c):
if not (n & ab or n in s):
yield b+n
a, b = b, n
ab = a|b
s.add(n)
while c in s:
c += 1
break
CROSSREFS
KEYWORD
base,nonn
AUTHOR
N. J. A. Sloane, May 09 2022
STATUS
approved