A134624 a(1) = 1. a(n) = the smallest integer which is > a(n-1) and is different from and not coprime to A134623(n-1).
1, 4, 6, 10, 14, 16, 18, 22, 24, 26, 27, 34, 38, 40, 42, 46, 50, 52, 58, 60, 62, 64, 66, 70, 72, 74, 75, 82, 86, 88, 90, 94, 96, 98, 99, 106, 108, 110, 112, 114, 118, 122, 123, 125, 134, 136, 138, 142, 146, 148, 154, 156, 158, 160, 162, 166, 168, 170, 171, 178, 182
Offset: 1
Keywords
Links
- Sean A. Irvine, Java program (github)
Crossrefs
Cf. A134623(n) = the n-th positive integer which is missing from {a(k)}.
Programs
-
PARI
missing(n, v) = {my(nb = 0, k = 1, s = Set(v), ok = 0); while(!ok, if (! setsearch(s, k), nb++); ok = (nb == n); if (!ok, k++);); k;} nextt(start, cop) = {my(k = max(start+1, cop+1)); while(gcd(k, cop) == 1, k++); k;} list4(nn) = {my(v3 = vector(nn), v4 = vector(nn)); v4[1] = 1; for (n=1, nn, v3[n] = missing(n, v4); if (n+1 > nn, break); v4[n+1] = nextt(v4[n], v3[n]);); v4} \\ Michel Marcus, Sep 06 2019
Extensions
Name and one term corrected and extended by Michel Marcus, Sep 06 2019