cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A250040 Numbers n such that m = floor(n/10) is coprime to n and, if nonzero, m is also a term of the sequence.

This page as a plain text file.
%I A250040 #39 Jan 23 2015 22:41:17
%S A250040 1,10,11,12,13,14,15,16,17,18,19,101,103,107,109,111,112,113,114,115,
%T A250040 116,117,118,119,121,125,127,131,132,133,134,135,136,137,138,139,141,
%U A250040 143,145,149,151,152,154,157,158,161,163,165,167,169,171,172,173,174,175
%N A250040 Numbers n such that m = floor(n/10) is coprime to n and, if nonzero, m is also a term of the sequence.
%C A250040 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.
%C A250040 Equivalent definition 2: Every nonempty prefix of a(n) in base b has the property RTC(b).
%C A250040 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).
%C A250040 This particular list is an infinite subset of A248499.
%H A250040 Stanislav Sykora, <a href="/A250040/b250040.txt">Table of n, a(n) for n = 1..10000</a>
%H A250040 Stanislav Sykora, <a href="https://oeis.org/wiki/File:GeneticThreads.txt">PARI/GP scripts for genetic threads</a>, with code and comments.
%H A250040 Wikipedia, <a href="http://en.wikipedia.org/wiki/Coprime_integers">Coprime integers</a>
%e A250040 149, 14, and 1 are members because (149,14), (14,1) and (1,0) are all coprime pairs.
%e A250040 67 is not a member because gcd(67,7)=1, but gcd(6,0)=6.
%p A250040 F:= proc(a) seq(10*a+d, d = select(t -> igcd(a,t)=1, [$0..9])) end proc:
%p A250040 B[1]:= [1]:
%p A250040 for i from 2 to 4 do
%p A250040   B[i]:= map(F,B[i-1]);
%p A250040 od:
%p A250040 ListTools:-Flatten([seq(B[i],i=1..4)]); # _Robert Israel_, Jan 04 2015
%o A250040 (PARI) See the link.
%o A250040 (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
%Y A250040 Cf. A248499, A250041.
%Y A250040 Other lists of right-truncatable numbers with the property RTC(b): A250036 (b=4), A250038 (b=16), A250042 (b=9), A250044 (b=8), A250046 (b=7), A250048 (b=6), A250050 (b=5).
%K A250040 nonn,base
%O A250040 1,2
%A A250040 _Stanislav Sykora_, Dec 07 2014