Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
A078453 Numbers in which all the digits are coprime to each other. 0

%I #9 Dec 24 2022 04:46:43

%S 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,23,25,27,29,31,

%T 32,34,35,37,38,41,43,45,47,49,51,52,53,54,56,57,58,59,61,65,67,71,72,

%U 73,74,75,76,78,79,81,83,85,87,89,91,92,94,95,97,98

%N Numbers in which all the digits are coprime to each other.

%t Join[Range[0,9],Select[Range[10,98],GCD@@IntegerDigits[#]==1 &]] (* _Stefano Spezia_, Dec 23 2022 *)

%o (Python)

%o from math import gcd

%o from functools import reduce

%o def ok(n):

%o d = list(map(int, str(n)))

%o return len(d) == 1 or reduce(gcd, d) == 1

%o print([k for k in range(100) if ok(k)]) # _Michael S. Branicky_, Dec 23 2022

%Y Cf. A069715.

%K base,easy,nonn

%O 1,3

%A _Amarnath Murthy_, Nov 28 2002

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 August 18 13:06 EDT 2024. Contains 375269 sequences. (Running on oeis4.)