login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that shares a factor with a(n-1) and the product a(n) * a(n-1) is distinct from all previous products a(i) * a(i-1), i=2..n-1.
10

%I #28 Oct 25 2022 11:38:24

%S 1,2,2,4,4,6,2,10,4,8,6,3,3,9,6,6,10,5,5,15,3,21,6,12,8,8,10,10,12,9,

%T 9,15,6,14,2,22,4,14,7,7,21,9,18,8,14,10,15,12,14,14,16,8,20,10,22,6,

%U 26,2,34,4,26,8,22,11,11,33,3,39,6,32,8,30,9,24,12,21,14,20,15,15,21,18,18

%N a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that shares a factor with a(n-1) and the product a(n) * a(n-1) is distinct from all previous products a(i) * a(i-1), i=2..n-1.

%C This sequence uses a similar rule to A088177 but here all neighboring terms also share a factor. In the first 500000 terms the fixed points are 1,2,4,6, it is likely no more exist, while the smallest number not to have appeared is 1153. The sequence is conjectured to be a permutation of the positive integers.

%C See A354754 for the products of all pairs of terms.

%H Michael De Vlieger, <a href="/A354753/b354753.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael De Vlieger, <a href="/A354753/a354753_1.png">Annotated log-log scatterplot of a(n)</a> n = 1..2^14, showing records in red, a(n) = 2 in blue, fixed points highlighted in gold.

%H Scott R. Shannon, <a href="/A354753/a354753.png">Image of the first 50000 terms</a>.

%e a(7) = 2 as a(6) = 6 and 2 is the smallest positive number that shares a factor with 6 and whose product with 6, 2 * 6 = 12, has not previously appeared.

%t nn = 120; c[_] = 0; a[1] = c[1] = 1; a[2] = a[2] = j = 2; Do[k = 2; While[Nand[c[j*k] == 0, ! CoprimeQ[j, k]], k++]; Set[{a[n], c[j*k]}, {k, n}]; j = k, {n, 3, nn}]; Array[a, nn] (* _Michael De Vlieger_, Jun 15 2022 *)

%o (PARI) lista(nn) = my(va = vector(nn), vp = vector(nn-2)); va[1] = 1; va[2] = 2; for (n=3, nn, my(k=2); while ((gcd(k, va[n-1]) == 1) || #select(x->(x==k*va[n-1]), vp), k++); va[n] = k; vp[n-2] = k*va[n-1];); va; \\ _Michel Marcus_, Jun 14 2022

%Y Cf. A354754, A354803, A354804, A354749, A354759, A088177, A064413.

%K nonn,look

%O 1,2

%A _Scott R. Shannon_, Jun 06 2022