OFFSET
1,1
COMMENTS
It is not known if this sequence is defined for any n > 0; showing that it is would solve some of the problems posed by Clark Kimberling about the Kolakoski sequence A000002 (see the link), at least the 2nd and 3rd problems.
a(22) > 7.7*10^10, if exists. - Andrei Zabolotskii, Oct 06 2025
LINKS
C. Kimberling, Integer Sequences and Arrays, Illustration of the Kolakoski sequence
PROG
(Rust)
const TWO: u8 = u8::MAX;
const SIZE: usize = 2<<30;
fn main() {
let mut kol: Vec<u8> = vec![0; SIZE];
kol[1] = TWO;
let mut j = 1;
let mut n = 1;
for i in 1..SIZE {
if kol[i] == TWO {
if i % 2 == 1 && j+1 < SIZE {
kol[j] = TWO;
kol[j+1] = TWO;
}
} else {
if i % 2 == 1 {
if j < SIZE { kol[j] = TWO; }
} else {
let c = kol[i] + 1;
if j < SIZE { kol[j] = c; }
if c == n {
println!("{}", j+1);
n += 1;
}
}
}
j += if kol[i] == TWO {2} else {1};
}
} // Andrei Zabolotskii, Oct 06 2025
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Jean-Christophe Hervé, Nov 09 2014
EXTENSIONS
a(16)-a(21) from Andrei Zabolotskii, Oct 06 2025
STATUS
approved
