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.

A371183 Lexicographically earliest sequence of distinct terms in which every triple of consecutive digits contains only one pair that is not coprime.

This page as a plain text file.
%I A371183 #7 Mar 23 2024 20:30:58
%S A371183 1,2,4,3,8,9,22,5,6,21,20,10,7,17,71,70,12,23,24,14,25,26,13,31,30,15,
%T A371183 51,50,16,27,28,18,29,32,33,19,34,38,39,42,52,41,40,100,102,103,104,
%U A371183 105,106,107,108,109,130,120,122,54,43,35,36,53,37,62,55,44,56,45,46,58,47,48
%N A371183 Lexicographically earliest sequence of distinct terms in which every triple of consecutive digits contains only one pair that is not coprime.
%t A371183 pairwiseQ[a_,b_,c_]:=Sort[{CoprimeQ[a,b],CoprimeQ[b,c],CoprimeQ[a,c]}]=={False,True,True}; a[1]=1;a[2]=2;a[3]=4;
%t A371183 a[n_]:=a[n]=Module[{k=1,digits,tab=Table[a[i],{i,1,n-1}]},
%t A371183 While[digits=Join[Take[Flatten[IntegerDigits[Take[tab,-3]]],-3],IntegerDigits[k]];
%t A371183 MemberQ[tab,k]||Union[pairwiseQ@@@
%t A371183 Table[{digits[[i]],digits[[i+1]],digits[[i+2]]},
%t A371183 {i,1,Length[digits]-2}]]!={True},k++];k]; a/@Range[70]
%Y A371183 Cf. A353187, A371060, A371182.
%K A371183 nonn,base
%O A371183 1,2
%A A371183 _Ivan N. Ianakiev_, Mar 14 2024