OFFSET
1,2
COMMENTS
Equivalent definition 1: Assuming a base b (in this case b=10), let us say that a positive integer k has the property RTC(b) when m=floor(k/b) is coprime to k, i.e., gcd(k,m)=1. Then k belongs to this sorted list if (i) it has the property RTC(b) and (ii) m is either 0 or belongs also to the list.
Equivalent definition 2: Every nonempty prefix of a(n) in base b has the property RTC(b).
Notes: The acronym RTC stands for 'Right-Truncated is Coprime'. We could also say that a(n) are right-truncatable numbers with property RTC(b).
This particular list is an infinite subset of A248499.
LINKS
Stanislav Sykora, Table of n, a(n) for n = 1..10000
Stanislav Sykora, PARI/GP scripts for genetic threads, with code and comments.
Wikipedia, Coprime integers
EXAMPLE
149, 14, and 1 are members because (149,14), (14,1) and (1,0) are all coprime pairs.
67 is not a member because gcd(67,7)=1, but gcd(6,0)=6.
MAPLE
F:= proc(a) seq(10*a+d, d = select(t -> igcd(a, t)=1, [$0..9])) end proc:
B[1]:= [1]:
for i from 2 to 4 do
B[i]:= map(F, B[i-1]);
od:
ListTools:-Flatten([seq(B[i], i=1..4)]); # Robert Israel, Jan 04 2015
PROG
(PARI) See the link.
(PARI) is_rtc(n, b=10) = {while (((m=gcd(n\b, n)) == 1), if (m == 0, return (1)); if ((n=n\b) == 0, return (1)); ); return (0); } \\ Michel Marcus, Jan 17 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Stanislav Sykora, Dec 07 2014
STATUS
approved