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.

A349491 a(1)=1, a(2)=4; for n > 2, a(n) is the smallest unused positive number such that gcd(a(n-1)*n,a(n)) > 1, where a(n) != a(n-1) and a(n) != n.

This page as a plain text file.
%I A349491 #11 Jan 29 2022 12:42:46
%S A349491 1,4,2,6,3,8,10,5,12,9,15,14,7,16,18,20,22,11,33,21,24,26,13,27,30,25,
%T A349491 35,32,28,34,17,36,38,19,40,39,42,44,45,46,23,48,50,52,51,54,56,49,63,
%U A349491 55,57,58,29,60,62,31,66,64,68,65,70,72,69,74,37,75,78,76,80,77,84,81,87
%N A349491 a(1)=1, a(2)=4; for n > 2, a(n) is the smallest unused positive number such that gcd(a(n-1)*n,a(n)) > 1, where a(n) != a(n-1) and a(n) !=  n.
%C A349491 This sequence shows similar behavior to the EKG sequence A064413. See the linked image.
%H A349491 Scott R. Shannon, <a href="/A349491/a349491.png">Image of the first 10000 terms</a>. The green line is y = n.
%e A349491 a(3) = 2 as a(2)*3 = 6, 2!=4, 2!=3, 2 is unused and gcd(6,2) > 1.
%e A349491 a(4) = 6 as a(3)*4 = 8, 6!=2, 6!=4, 6 is unused and gcd(8,6) > 1.
%o A349491 (Python)
%o A349491 from math import gcd
%o A349491 terms, appears = [1], {}
%o A349491 for n in range(2, 100):
%o A349491     t = 2
%o A349491     while not(appears.get(t) is None and gcd(terms[-1]*n, t)>1 and t!=terms[-1] and t!=n):
%o A349491         t += 1
%o A349491     appears[t] = True; terms.append(t);
%o A349491 print(terms) # _Gleb Ivanov_, Nov 20 2021
%Y A349491 Cf. A064413, A349493, A349472, A098550, A336957.
%K A349491 nonn
%O A349491 1,2
%A A349491 _Scott R. Shannon_, Nov 19 2021