OFFSET
1,3
COMMENTS
A term can have at most 4 digits that are not 1, but can have any number of 1's. - Robert Israel, Apr 21 2026
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
filter:= proc(n) local L, d, i, j;
L:= convert(n, base, 10); d:= nops(L);
`and`(seq(seq(igcd(L[i], L[j])=1, j=i+1..d), i=1..d))
end proc:
select(filter, [$0..200]); # Robert Israel, Apr 21 2026
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
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Nov 28 2002
STATUS
approved
