|
|
A168612
|
|
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.
|
|
3
|
|
|
1, 3, 7, 23, 55, 311, 823, 1847, 10039, 26423, 8415031, 25192247, 58746679, 1132488503, 3279972151, 7574939447, 16164874039, 291042780983, 840798594871, 1940310222647, 4139333478199, 74508077655863, 215245566011191, 496720542721847, 1059670496143159
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
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]];
|
|
PROG
|
(Python)
from math import gcd
from itertools import count, islice
def agen(): # generator of terms
an, alst = 1, []
while True:
yield an; alst.append(an); b = an.bit_length(); t = 1 << b
for z in count(0):
an = (t << z) + alst[-1]
if all(gcd(an, ai) == 1 for ai in alst): break
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
Steve Bailey (SGBailey(AT)iee.org), Dec 01 2009
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|