login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = A357082(n-1) + A357082(n).
2

%I #16 Sep 16 2022 23:45:19

%S 1,3,5,7,9,15,16,15,16,24,29,32,33,29,34,29,32,36,34,42,61,64,34,32,

%T 61,64,61,64,61,64,65,72,76,64,72,85,76,64,72,82,64,72,100,104,100,91,

%U 64,72,64,72,104,100,116,127,128,129,133,128,129,128,129,128,129

%N a(n) = A357082(n-1) + A357082(n).

%H Scott R. Shannon, <a href="/A357148/b357148.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael De Vlieger, <a href="https://oeis.org/A357082/a357082_5.png">Bitmap of (a(n-1) + a(n))</a>, n = 1..2^11, 12X vertical exaggeration, read horizontally where black represents 1 and white 0, with least significant bit on bottom.

%H Michael De Vlieger, Let sequence b list primitive terms in this sequence. <a href="/A357148/a357148.png">Annotated plot a(n) = b(k) at (n, k)</a> for n = 1..84.

%H Michael De Vlieger, <a href="/A357148/a357148_1.png">Plot a(n) = b(k) at (n, k)</a> for n = 1..2^12.

%H Scott R. Shannon, <a href="/A357148/a357148_2.png">Image for n = 0..2250000</a>.

%t nn = 120; c[_] = False; j = a[0] = 0; u = 1; w = "0"; Do[k = u; While[Or[c[k], StringContainsQ[w, Set[v, IntegerString[j + k, 2]]]], k++]; Set[{a[n], c[k], b[n]}, {k, True, j + k}]; Set[{j, w}, {k, w <> IntegerString[k, 2]}]; If[k == u, While[c[u], u++]], {n, nn}], n]; Array[b, nn] (* _Michael De Vlieger_, Sep 15 2022 *)

%o (Python)

%o from itertools import islice

%o def agen():

%o aset, astr, an, mink = {0}, "0", 0, 1

%o while True:

%o k = mink

%o while k in aset or bin(an+k)[2:] in astr: k += 1

%o while mink in aset: mink += 1

%o yield an+k; an = k; aset.add(an); astr += bin(an)[2:]

%o print(list(islice(agen(), 63))) # _Michael S. Branicky_, Sep 16 2022

%Y Cf. A357082.

%K nonn

%O 1,2

%A _Michael De Vlieger_, Sep 15 2022