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.

A361133 a(n) = n for n <= 3. Let h, i, j represent a(n-3), a(n-2), a(n-1) respectively. For n > 3, if there is a symmetric difference in the sets of distinct primes dividing h and j, with greatest member p then a(n) is the least novel multiple of p. Otherwise, a(n) is the least novel k such that (k,i) > 1.

Original entry on oeis.org

1, 2, 3, 6, 9, 4, 12, 8, 10, 5, 15, 18, 20, 21, 7, 14, 24, 28, 16, 27, 35, 42, 49, 25, 56, 22, 11, 33, 30, 44, 36, 40, 55, 66, 77, 63, 88, 70, 45, 99, 110, 121, 39, 13, 26, 48, 52, 32, 51, 17, 34, 54, 68, 38, 19, 57, 60, 76, 69, 23, 46, 72, 92, 50, 65, 115, 138, 161, 84, 184
Offset: 1

Views

Author

David James Sycamore, Mar 02 2023

Keywords

Comments

In other words if there are primes p which divide h but not j or primes q which divide j but not h then a(n) is the least novel multiple of the greatest of all such primes p, q. If there are no such primes (rad(h) = rad(j)), then a(n) is the least unused number sharing a divisor with i.
When an odd prime p appears it is immediately preceded and followed by multiples m*p and r*p of p respectively, thus m*p, p, r*p where if m = 2 then b is 3, and m > 2 forces r = 2 (compare with A064413 where m = 2, and r = 3 throughout).
The scatterplot resembles a fine-toothed comb, wherein it seems that the "teeth" represent consecutive multiples of certain distinct primes, which become compacted closer and closer together as the sequence progresses.
Conjectured to be a permutation of the natural numbers, with primes in natural order.

Examples

			a(4) = 6 because the symmetric difference for 1 and 3 contains only one prime (3) and 6 is the least multiple of 3 that has not occurred already.
a(5) = 9 since h,j = 2,6 with difference 3, and 9 is the least novel multiple of 3.
a(6) = 4 since h,i,j = 3,6,9 (3,9 have no symmetric difference), and 4 is least novel number sharing a divisor with i = 6.
		

Crossrefs

Programs

  • Mathematica
    nn = 2^10; c[] = False; q[] = 1;
    f[n_] := f[n] = FactorInteger[n][[All, 1]];
    Array[Set[{a[#], c[#]}, {#, True}] &, 3];
    Set[{h, i, j, R, S, T}, {a[1], a[2], a[3], f[a[1]], f[a[2]],
      f[a[3]]}]; u = 4;
    Do[If[R == T,
       k = u; While[Or[c[k], CoprimeQ[i, k]], k++],
       (k = q[#]; While[c[k #], k++]; k *= #; While[c[# q[#]], q[#]++]) &[
        Max@ SymmetricDifference[R, T] ] ];
      Set[{a[n], c[k], h, i, j}, {k, True, i, j, k}];
      Set[{R, S, T}, {S, T, f[k]}];
      If[k == u, While[c[u], u++]], {n, 4, nn}];
    Array[a, nn] (* Michael De Vlieger, Mar 05 2023 *)