[go: up one dir, main page]

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”).

A357595
Lexicographically earliest infinite sequence of distinct positive integers such that a(n+1) is the least k != j, for which gcd(k, j) > 1; j = n + a(n).
2
1, 4, 2, 10, 6, 22, 7, 8, 12, 3, 26, 74, 14, 9, 46, 122, 15, 16, 17, 18, 19, 5, 21, 11, 20, 24, 25, 13, 82, 27, 30, 183, 35, 28, 31, 32, 34, 142, 33, 36, 38, 158, 40, 166, 39, 42, 44, 49, 194, 45, 50, 202, 48, 303, 51, 52, 54, 37, 55, 56, 29, 57, 63, 58, 60, 65
OFFSET
1,2
COMMENTS
If n + a(n) = prime p, a(n+1) is the smallest multiple (>1) of p, which has not occurred earlier. Conjectured to be a permutation of the positive integers.
LINKS
Michael De Vlieger, Log-log scatterplot of a(n), n = 1..2^14, labeling records in red and local minima in blue, highlighting primes in green and (composite) prime powers in gold.
EXAMPLE
a(1)=1, then 1+a(1)=2 so a(2) must be 4, the least k != 2 which shares a divisor with 2.
MATHEMATICA
nn = 66; c[_] = False; u = 2; a[1] = j = 1; c[1] = True; Do[Set[{k, m}, {u, n + j - 1}]; While[Or[c[k], k == m, CoprimeQ[k, m]], k++]; Set[{a[n], c[k], j}, {k, True, k}]; If[k == u, While[c[u], u++]], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Oct 05 2022 *)
CROSSREFS
Sequence in context: A283942 A266418 A193422 * A160572 A213500 A213584
KEYWORD
nonn
AUTHOR
STATUS
approved