login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A358026 Let G(n) = gcd(a(n-2),a(n-1)), a(1)=1, a(2)=2, a(3)=3. Thereafter if G(n) = 1, a(n) is the least novel m sharing a divisor with both a(n-2) and a(n-1). If G(n) > 1 and every prime divisor of a(n-1) also divides a(n-2), a(n) is the least m prime to both a(n-1) and a(n-2). Otherwise a(n) is the least novel multiple of any prime divisor of a(n-1) which does not divide a(n-2). 1
1, 2, 3, 6, 4, 5, 10, 8, 7, 14, 12, 9, 11, 33, 15, 20, 16, 13, 26, 18, 21, 28, 22, 44, 17, 34, 24, 27, 19, 57, 30, 25, 23, 115, 35, 42, 32, 29, 58, 36, 39, 52, 38, 76, 31, 62, 40, 45, 48, 46, 69, 51, 68, 50, 55, 66, 54, 37, 74, 56, 49, 41, 287, 63, 60, 64, 43 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Conjectured to be a permutation of the positive integers with the primes in natural order, and primes are the slowest numbers to appear (as in A352187).
LINKS
Michael De Vlieger, Log-log scatterplot of a(n), n = 1..2^14, showing records in red and local minima in blue, highlighting primes in green and other prime powers in gold.
EXAMPLE
a(4) = 6, the least novel number sharing a factor with both 2 and 3.
a(5) = 4, the least novel multiple of 2, which divides a(4) but does not divide a(3).
Since every prime dividing a(5)=4 also divides a(4)=6, a(6)=5 the least novel term prime to 3 and 6.
MATHEMATICA
nn = 67; c[_] = False; q[_] = 1; u = 4; Do[(Set[{a[n], c[n]}, {n, True}]; q[n]++), {n, u - 1}]; Do[m = FactorInteger[a[n - 1]][[All, 1]]; f = Select[m, CoprimeQ[#, a[n - 2]] &]; Which[Length[f] == PrimeNu[a[n - 1]], Set[{k, q[#1]}, {#2, #2/#1}] & @@ First@ MinimalBy[Map[{#, Set[g, q[#]]; While[c[g #], g++]; # g} &, Flatten@ Outer[Times, m, FactorInteger[a[n - 2]][[All, 1]] ] ], Last], Length[f] == 0, k = u; While[Nand[! c[k], CoprimeQ[a[n - 2], k], CoprimeQ[a[n - 1], k]], k++]; If[k == u, While[c[u], u++]], True, Set[{k, q[#1]}, {#2, #2/#1}] & @@ First@ MinimalBy[Map[{#, Set[g, q[#]]; While[c[g #], g++]; # g} &, f], Last] ]; Set[{a[n], c[k]}, {k, True}], {n, 4, nn}]; Array[a, nn] (* Michael De Vlieger, Oct 25 2022 *)
CROSSREFS
Sequence in context: A222758 A127915 A361966 * A331117 A282841 A254106
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Michael De Vlieger, Oct 25 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 26 17:53 EDT 2024. Contains 374636 sequences. (Running on oeis4.)