login
A339671
a(1) = 1, a(2) = 2; for n>2, a(n) = smallest number not already used that shares a prime factor with a(n-1) and has a prime factor not in a(n-2).
2
1, 2, 4, 6, 3, 15, 5, 10, 8, 12, 9, 21, 7, 14, 16, 18, 20, 22, 11, 33, 24, 26, 13, 39, 27, 30, 25, 35, 28, 32, 34, 17, 51, 36, 38, 19, 57, 42, 40, 44, 46, 23, 69, 45, 48, 50, 52, 54, 56, 49, 63, 60, 55, 65, 70, 58, 29, 87, 66, 62, 31, 93, 72, 64, 68, 74, 37, 111, 75, 78, 76, 80, 82, 41, 123, 81
OFFSET
1,2
COMMENTS
Inspired by A064413 and A336957. The terms show a similar pattern to A064413, and like that sequence they are likely a permutation of the positive integers. Many terms also match the values in A169837. For example a(17)=20 to a(115)=111 (shifted by an index of 1) are the same, but then differ again before more matches occurr.
See A339670 for a similar sequence where the prime factor rules are reversed.
EXAMPLE
a(4) = 6 as a(3) = 4 = 2*2 and a(2) = 2, thus a(4) must contain 2 as a prime factor but must also contain a prime factor other than 2. The lowest unused number matching these criteria is 2*3 = 6.
a(6) = 15 as a(5) = 3 and a(4) = 6 = 2*3, thus a(6) must contain 3 as a prime factor but must also contain a prime factor other than 2 and 3. The lowest unused number matching these criteria is 3*5 = 15. This is the first term that differs from A064413.
MATHEMATICA
Block[{a = {1, 2}, b = {}, c = {2}, p, k}, Do[k = 2; While[Nand[FreeQ[a, k], IntersectingQ[c, Set[p, FactorInteger[k][[All, 1]]]], Length@ Complement[p, Intersection[b, p]] > 0], k++]; AppendTo[a, k]; b = c; c = p, 75]; a] (* Michael De Vlieger, Dec 12 2020 *)
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Dec 12 2020
STATUS
approved