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.

A353187 Lexicographically earliest strictly increasing sequence of positive integers in which every triple of consecutive terms contains only one pair that is not coprime.

This page as a plain text file.
%I A353187 #36 Feb 22 2023 14:59:03
%S A353187 1,2,4,5,6,8,11,12,14,17,18,20,23,24,26,29,30,32,37,38,40,41,42,44,47,
%T A353187 48,50,53,54,56,59,60,62,67,68,70,71,72,74,77,78,80,83,84,86,89,90,92,
%U A353187 97,98,100,101,102,104,107,108,110,113,114,116,119,120,122,127,128,130,131
%N A353187 Lexicographically earliest strictly increasing sequence of positive integers in which every triple of consecutive terms contains only one pair that is not coprime.
%C A353187 Based on testing the first 1000 primes of the form 3n-1, it seems that A003627 is a subsequence.
%H A353187 Ivan N. Ianakiev, <a href="/A353187/b353187.txt">Table of n, a(n) for n = 1..10000</a>
%t A353187 next[n_,m_]:=Piecewise[{
%t A353187 {(k=m+1; While[!CoprimeQ[k,n]||!CoprimeQ[k,m],k++]; k),AllTrue[{n,m},EvenQ]},
%t A353187 {m+2,OddQ[n]&&EvenQ[m]},{m+1,EvenQ[n]&&OddQ[m]}}];
%t A353187 a[1]=1;a[2]=2;a[n_]:=a[n]=next[a[n-2],a[n-1]];a/@Range[100]
%o A353187 (PARI) { for (v=1, 122, if (v<=2 || ((gcd(pp,p)==1) + (gcd(p,v)==1) + (gcd(v, pp)==1))==2, print1 (v", "); [pp,p]=[p,v])) } \\ _Rémy Sigrist_, May 01 2022
%Y A353187 Cf. A047255.
%K A353187 nonn
%O A353187 1,2
%A A353187 _Ivan N. Ianakiev_, Apr 29 2022