A352768 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with both a(n-2)+a(n-1) and a(n-2)*a(n-1).
1, 2, 6, 4, 8, 10, 12, 14, 16, 18, 20, 22, 15, 74, 178, 24, 26, 28, 21, 7, 30, 111, 3, 9, 27, 33, 36, 39, 40, 158, 32, 34, 38, 42, 35, 44, 316, 46, 48, 50, 52, 45, 194, 478, 54, 56, 58, 60, 62, 64, 66, 55, 11, 70, 63, 49, 72, 77, 298, 78, 68, 76, 51, 254, 75, 84, 57, 69, 81, 87, 90, 93, 96, 98
Offset: 1
Keywords
Examples
a(3) = 6 as a(1)+a(2)=3, a(1)*a(2)=2, and 6 is the smallest unused number that shares a factor with both 3 and 2.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Annotated log-log scatterplot of a(n), n = 1..2^16, showing records in red, local minima in blue, fixed points in gold, and highlighting primes in green.
- Scott R. Shannon, Image of the first 250000 terms. The green line is y = n.
Programs
-
Mathematica
nn = 74; c[] = 0; a[1] = c[1] = 1; a[2] = c[1] = 2; u = 1; While[c[u] > 0, u++]; Do[k = u; While[Nand[c[k] == 0, GCD[#1, k] > 1, GCD[#2, k] > 1], k++] & @@ {#1 + #2, #1 #2} & @@ {a[i - 2], a[i - 1]}; Set[{a[i], c[k]}, {k, i}]; If[k == u, While[c[u] > 1, u++]], {i, Length[s] + 1, nn}]; Array[a, nn] (* _Michael De Vlieger, Apr 02 2022 *)
Comments