[go: up one dir, main page]

login
A078453
Numbers in which all the digits are coprime to each other.
0
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, 32, 34, 35, 37, 38, 41, 43, 45, 47, 49, 51, 52, 53, 54, 56, 57, 58, 59, 61, 65, 67, 71, 72, 73, 74, 75, 76, 78, 79, 81, 83, 85, 87, 89, 91, 92, 94, 95, 97, 98
OFFSET
1,3
MATHEMATICA
Join[Range[0, 9], Select[Range[10, 98], GCD@@IntegerDigits[#]==1 &]] (* Stefano Spezia, Dec 23 2022 *)
PROG
(Python)
from math import gcd
from functools import reduce
def ok(n):
d = list(map(int, str(n)))
return len(d) == 1 or reduce(gcd, d) == 1
print([k for k in range(100) if ok(k)]) # Michael S. Branicky, Dec 23 2022
CROSSREFS
Cf. A069715.
Sequence in context: A084981 A326880 A359077 * A052425 A272074 A246097
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Nov 28 2002
STATUS
approved