A250040 Numbers n such that m = floor(n/10) is coprime to n and, if nonzero, m is also a term of the sequence.
1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 101, 103, 107, 109, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 125, 127, 131, 132, 133, 134, 135, 136, 137, 138, 139, 141, 143, 145, 149, 151, 152, 154, 157, 158, 161, 163, 165, 167, 169, 171, 172, 173, 174, 175
Offset: 1
Examples
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.
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
Crossrefs
Programs
-
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
-
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
Comments