A379512 Erase digits 0 and 1 from decimal expansion of n. Then keep just the coprime digits; write 0 if all digits disappear.
0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 0, 23, 0, 25, 0, 27, 0, 29, 3, 3, 32, 0, 34, 35, 0, 37, 38, 0, 4, 4, 0, 43, 0, 45, 0, 47, 0, 49, 5, 5, 52, 53, 54, 0, 56, 57, 58, 59, 6, 6, 0, 0, 0, 65, 0, 67, 0, 0, 7, 7, 72, 73, 74, 75, 76, 0, 78, 79, 8, 8, 0, 83, 0, 85, 0, 87
Offset: 0
Examples
a(10) = 0 as we do not accept zeros and ones in n. a(22) = 0 as gcd(2,2) = 2. a(25) = 25 as gcd(2,5) = 1. a(1234567890) = a(23456789) = a(3579) = a(57) = 57. Note that numbers n with even digits and numbers n containing digits 0 and 1 only disappear immediately and we get a(n) = 0.
Programs
-
PARI
a(n)=my(d=select(k->k>1, digits(n))); if(sum(i=1,#d, d[i]%2==0)>1, d=select(k->k%2,d)); if(sum(i=1,#d, d[i]%3==0)>1, d=select(k->k%3,d)); if(sum(i=1,#d, d[i]==5)>1, d=select(k->k!=5,d)); if(sum(i=1,#d, d[i]==7)>1, d=select(k->k!=7,d)); fromdigits(d) \\ Charles R Greathouse IV, Jan 21 2025
Formula
a(n) <= 9875. There are 299 distinct values in this sequence. - Charles R Greathouse IV, Jan 21 2025
Comments