cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A358534 Start with a(1)=1, a(2)=2. Thereafter, if gcd(a(n-2),a(n-1)) = 1 then a(n) is the smallest unused k such that gcd(a(n-2),k) > 1 and gcd(a(n-1),k) = 1, otherwise a(n) is the smallest unused k such that gcd(a(n-2),k) = 1 and gcd(a(n-1),k) > 1. If the latter is impossible, then a(n) = smallest missing number u. (See comments.)

Original entry on oeis.org

1, 2, 4, 3, 9, 5, 10, 6, 25, 35, 7, 15, 12, 55, 11, 20, 8, 45, 21, 40, 16, 65, 13, 30, 14, 27, 33, 17, 34, 18, 85, 95, 51, 24, 119, 49, 68, 22, 153, 39, 136, 28, 187, 99, 170, 26, 75, 57, 50, 32, 105, 63, 80, 38, 115, 23, 60, 36, 125, 145, 19, 76, 29, 87, 31, 62
Offset: 1

Views

Author

Keywords

Comments

A lexicographically earliest sequence. We write (i,j) to mean gcd(i,j) for brevity. Let rad(m) = A007947(m).
Define (i,j)=1 to be "closed" else "open". If we have i and j closed, then we find the least k not already in the sequence that is closed to i but open to j, otherwise we find same that is open to i but closed to j.
Condition [1], (i,j)=1 requires smallest unused k such that (i,k)=1 and (j,k)>1, given primes p|i, merely by finding the smallest missing k indivisible by any p.
Condition [2], (i,j)>1, requires smallest unused k such that (i,k)>1 and (j,k)=1 iff rad(i) does not divide rad(j).
Let S = {p | i} and T = {q | j}. If T contains S, then (j,k)=1 makes (i,k)>1 impossible.
Condition [3] allows a solution. In this case, we simply set a(n) = u, the smallest missing number in a(1..n-1).
The most conspicuous case of [3] is i = p^v and j = p^w, v < w. Since p^v | p^w, if a(n) = k is made such that (p^w,k)=1, then k is also coprime to p^v or any power of p. Hence we write a(n) = u.
Another, rare case of [3] is if i and j belong to R, the sequence of numbers that are products of the same squarefree kernel K. Suppose K = 6, then R = A003586. Now suppose i = 6*R(2) = 6*2 = 12 and j = 6*R(3) = 6*3 = 18. Indeed, if a(n) = k is made such that (18,k)=1, then k is also coprime to 12 and any number in 6*R. Hence in this case we write a(n) = u.

Crossrefs

Cf. A358093.

Programs

  • Mathematica
    nn = 120; c[] = False; q[] = 1; f[n_] := Times @@ FactorInteger[n][[All, 1]]; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; Set[{i, j, u}, {a[1], a[2], 3}]; Set[{r, s}, {f[i], f[j]}]; Do[Which[CoprimeQ[i, j], If[PrimeNu[j] == 1, While[c[q[s] s], q[s]++]; k = q[s]; While[Nand[! c[s k], CoprimeQ[i, k]], k++]; k *= s, k = u; While[Nand[! c[k], CoprimeQ[i, k], ! CoprimeQ[j, k]], k++]], Divisible[s, r], k = u, True, If[PrimeNu[i] == 1, While[c[q[r] s], q[r]++]; k = q[r]; While[Nand[! c[r k], CoprimeQ[j, k]], k++]; k *= r, k = u; While[Nand[! c[k], ! CoprimeQ[i, k], CoprimeQ[j, k]], k++]] ]; Set[{a[n], c[k], i, j, r, s}, {k, True, j, k, s, f[k]}]; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn]

A358354 a(n) = n for n <= 3. Thereafter a(n) is the least m such that rad(m) = rad(rad(a(n-3)) + rad(a(n-1))) where rad is A007947.

Original entry on oeis.org

1, 2, 3, 4, 8, 5, 7, 9, 16, 27, 6, 32, 25, 11, 13, 12, 17, 30, 18, 23, 53, 59, 82, 15, 74, 78, 93, 167, 35, 64, 169, 24, 128, 45, 21, 529, 38, 3481, 164, 60, 89, 57, 87, 22, 79, 166, 94, 173, 339, 433, 606, 105, 538, 286, 391, 929, 75, 406, 1335, 90, 218, 1553
Offset: 1

Views

Author

David James Sycamore, Nov 11 2022

Keywords

Comments

Similar sequence to A358093, though here the definition works between a(n-1) and a(n-3) (skipping a(n-2)) so there is no evident parity pattern, and adjacent pairs are not always coprime.
Conjecture: for n > 60, a(n) is squarefree. - Michael De Vlieger, Jul 01 2025

Examples

			To find a(4): a(1)=1, a(3)=3 so a(4) is the least m such that rad(n) = rad(rad(1) + rad(3)) = rad(4) = 2. Since 2 has occurred already, a(4) = 4.
		

Crossrefs

Programs

  • Mathematica
    Block[{a, c, f, i, j, k, m, p, q, s, nn}, nn = 62; c[] = False; p[] = q[] = 1; f[n] := Times @@ FactorInteger[n][[All, 1]]; Array[Set[{a[#], c[#]}, {#, True}] &, 3]; Array[(q[#]++; p[#]++) &[f[a[#]] ] &, 3]; Set[{i, j, k}, Array[f[a[#]] &, 3]]; Do[s = f[i + k]; If[PrimeQ[s], m = s^p[s]; p[s]++, m = q[s]; While[Nand[! c[m s], PowerMod[s, s, m] == 0], m++]; m *= s]; q[s]++; Set[{a[n], c[m], i, j, k}, {m, True, j, k, s}], {n, 4, nn}]; Array[a, nn] ] (* Michael De Vlieger, Nov 12 2022 *)
Showing 1-2 of 2 results.