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.

A357942 a(1)=1, a(2)=2. Thereafter, if there are prime divisors p | a(n-1) that are coprime to a(n-2), a(n) is the least novel multiple of the product of these primes. Otherwise a(n) is the least novel multiple of the squarefree kernel of a(n-1). See comments.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Oct 22 2022

Keywords

Comments

Let k be the greatest common squarefree divisor of a(n-2) and a(n-1) and let s = A007947(a(n-1)). If k = 1, then a(n) = m_s*s, else a(n) = m_k*k, where m_i is the smallest multiple of i such that m*i does not appear in a(1..n-1).
Variant of A357963; a(21) = 36, but A357963(21) = 22.

Examples

			a(1) = 1, a(2) = 2 and 2 divides 2 but does not divide 1. Since 2 is the only prime divisor of 2, a(3) = 4, the smallest unused multiple of 2.
Since every prime divisor of a(3)=4 also divides a(2) = 2, a(4) = 6, the least novel multiple of the squarefree kernel of 4.
a(19,20) = (25,30); 2|30 and 3|30 but 2 and 3 do not divide 25. The smallest multiple of 2*3 = 6 not already in the sequence is 36. Therefore a(21) = 36.
		

Crossrefs

Programs

  • Mathematica
    nn = 67; c[] = False; q[] = 1; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; q[2] = 2; Do[m = FactorInteger[a[n - 1]][[All, 1]]; If[Length@ # == 0, While[Set[k, #* q[#]]; c[k], q[#]++] &[Times @@ m], While[Set[k, #* q[#]]; c[k], q[#]++] &[Times @@ #]] &@ Select[m, CoprimeQ[#, a[n - 2]] &]; Set[{a[n], c[k]}, {k, True}], {n, 3, nn}]; Array[a, nn]