%I #18 Feb 08 2023 10:44:19
%S 1,3,7,23,55,311,823,1847,10039,26423,8415031,25192247,58746679,
%T 1132488503,3279972151,7574939447,16164874039,291042780983,
%U 840798594871,1940310222647,4139333478199,74508077655863,215245566011191,496720542721847,1059670496143159
%N In binary starting with 1, prepend a 1 and as few 0's as required such that the new number is relatively prime to all previous in sequence. Thus binary 1, 11, 111, 10111, 110111, 100110111, 1100110111, 11100110111.
%C a(169) has 1003 digits. - _Michael S. Branicky_, Feb 07 2023
%H Michael S. Branicky, <a href="/A168612/b168612.txt">Table of n, a(n) for n = 1..168</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Archives/Mathematics/2009_December_1">Mathematics reference desk 2009 December 1.</a> Sequence proposed by Julzes.
%t f[s_] := Append[s, i = 0; While[! AllTrue[s, CoprimeQ[2^(i+BitLength[Last[s]])+Last[s], #] &], i++]; 2^(i+BitLength[Last[s]])+Last[s]];
%t Nest[f, {1}, 30] (* _Seth A. Troisi_, Feb 07 2023 *)
%o (Python)
%o from math import gcd
%o from itertools import count, islice
%o def agen(): # generator of terms
%o an, alst = 1, []
%o while True:
%o yield an; alst.append(an); b = an.bit_length(); t = 1 << b
%o for z in count(0):
%o an = (t << z) + alst[-1]
%o if all(gcd(an, ai) == 1 for ai in alst): break
%o print(list(islice(agen(), 25))) # _Michael S. Branicky_, Feb 07 2023
%Y Cf. A171134.
%K nonn,base
%O 1,2
%A Steve Bailey (SGBailey(AT)iee.org), Dec 01 2009
%E a(9)-a(23) from _James G. Merickel_ and _John W. Layman_, Dec 03 2009
%E a(24)-a(25) from _Alois P. Heinz_, Feb 07 2023
|