login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104973 Numbers with 6 distinct digits {1,2,3,4,5,6} such that all adjacent digits (as well as first and last digits) are coprime. 2

%I #5 Mar 22 2018 18:14:34

%S 123456,143256,165234,165432,216543,234165,234561,256143,321654,

%T 325614,341652,345612,416523,432165,432561,456123,523416,543216,

%U 561234,561432,612345,614325,652341,654321

%N Numbers with 6 distinct digits {1,2,3,4,5,6} such that all adjacent digits (as well as first and last digits) are coprime.

%t aaadcpQ[n_]:=And@@CoprimeQ@@@Partition[n,2,1]&&CoprimeQ[n[[1]],n[[-1]]]; FromDigits/@Select[Permutations[Range[6]],aaadcpQ] (* _Harvey P. Dale_, Mar 22 2018 *)

%Y Cf. A104971, A104972.

%K full,nonn,base,fini

%O 1,1

%A _Zak Seidov_, Mar 30 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)