OFFSET
1,1
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
27 is a member as 2 and 7 both are coprime to 27. 53 is a member as 5 and 3 both are coprime to 53.
MAPLE
for n from 2 to 500 do it1 := convert(n, base, 10): flag := 1: for k from 1 to nops(it1) do if igcd(n, it1[k])<>1 then flag := 0 fi: od: if flag=1 then printf(`%d, `, n) fi: od:
MATHEMATICA
Select[Range[11, 191, 2], CoprimeQ[Product[i, {i, IntegerDigits[#]}], #] &] (* Arkadiusz Wesolowski, May 19 2012 *)
PROG
(Python)
from math import gcd
def ok(n): return n > 1 and all(gcd(n, int(d)) == 1 for d in str(n))
print([k for k in range(212) if ok(k)]) # Michael S. Branicky, Nov 13 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 21 2001
EXTENSIONS
More terms from James A. Sellers, Apr 23 2001
STATUS
approved