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.

A376548 a(1)=1,a(2)=2. Let p be the smallest prime factor of j=a(n-1), then for n>2 a(n) is the smallest novel multiple of Sopfr(j) if j is in A046363, or of p if it is not.

Original entry on oeis.org

1, 2, 4, 6, 5, 10, 7, 14, 8, 12, 21, 3, 9, 15, 18, 16, 20, 22, 13, 26, 24, 28, 11, 33, 27, 30, 32, 34, 19, 38, 36, 40, 44, 42, 46, 48, 55, 25, 35, 45, 66, 50, 52, 17, 51, 39, 54, 77, 49, 56, 65, 60, 58, 31, 62, 64, 68, 70, 72, 74, 76, 23, 69, 57, 63, 78, 80, 91
Offset: 1

Views

Author

David James Sycamore, Sep 27 2024

Keywords

Comments

If j=a(n-1) is in A046363 then a(n) = A001414(j) = prime q, and a(n+1) is the least novel multiple of q. Otherwise a(n) is the least novel multiple of the smallest prime factor of j. After a prime term a(n) the sequence produces a string of terms each divisible by the smallest prime factor of a(n+1) until arriving at a term in A046363, whereupon a new prime appears and the process repeats.
Conjectured to be a permutation of the positive integers A000027, in which the primes do not appear in order (prime order starts:2,5,7,3,13,11,19,17,31,23,43..).

Examples

			a(2)=2 is not a term in A046360, and has smallest prime factor 2, so a(3) = 4, the least novel multiple of 2. Likewise a(4)=6 since a(3)=4 is not in A046360 and the smallest prime factor of 4 is 2.
a(4)=6 is a term in A046360, so a(5)=A001414(6)=5.
a(6)=10 since 5 is the smallest prime factor of 5, and 10 is the smallest novel multiple of 5.
If a(n-1) = prime p, a(n) is the least novel multiple of p, for example a(12) = 3 and since a(4) = 6 it follows that a(13) = 9. Likewise a(19) = 13, and since no prior term is divisible by 13, a(20) = 36.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] := False; m[] := 1;
    a[1] = 1; j = a[2] = 2; c[1] = c[2] = True; m[1] = m[2] = 2;
    f[x_] := f[x] = Total@ Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[x]];
    Do[(If[PrimeQ[#2], k = #2, k = #1]; While[c[k*m[k]], m[k]++]; k *= m[k]) & @@
      {FactorInteger[j][[1, 1]], f[j]};
      Set[{a[i], c[k], j}, {k, True, k}], {i, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, Sep 28 2024 *)