login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A328131 Erase all zero digits from decimal expansion of n. Then keep just the coprime digits; write 0 if all digits disappear. 1
1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 21, 0, 23, 0, 25, 0, 27, 0, 29, 3, 31, 32, 0, 34, 35, 0, 37, 38, 0, 4, 41, 0, 43, 0, 45, 0, 47, 0, 49, 5, 51, 52, 53, 54, 0, 56, 57, 58, 59, 6, 61, 0, 0, 0, 65, 0, 67, 0, 0, 7, 71, 72, 73, 74, 75, 76 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Digit 0 in n is erased, non-coprime digits of n are erased. If all digits are erased, we write 0 for the result.
The digit 1 is never erased, e.g. repunits are fixed points of this procedure. - Chai Wah Wu, Apr 02 2020
LINKS
EXAMPLE
10 becomes 1 as we do not accept zeros in n, 22 becomes 0 as gcd(2,2) = 2, 25 becomes 25 as gcd(2,5) = 1, 1033 becomes 133 becomes 1, 1234567890 becomes 123456789 becomes 157. Note that numbers with even digits disappear immediately and we get 0.
PROG
(PARI) a(n) = my(D=digits(n)); D=select(d->d!=0, D); my(C=Set()); for(i=1, #D, for(j=i+1, #D, if(gcd(D[i], D[j]) != 1, C=concat(C, [D[i], D[j]])))); C=Set(C); fromdigits(select(d->!setsearch(C, d), D)); \\ Daniel Suteu, Oct 08 2019
(Python)
def A328131(n):
s, tlist = str(n), ('2468', '369', '468', '5', '689', '7', '8', '9')
dset = set('0'+''.join(t if t[0] in s and sum(s.count(d) for d in t) > 1 else '' for t in tlist))
return int('0'+''.join(d for d in s if d not in dset)) # Chai Wah Wu, Apr 02 2020
CROSSREFS
Cf. A320486.
Sequence in context: A059717 A004185 A068636 * A004719 A004151 A151765
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Oct 04 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:06 EDT 2024. Contains 371792 sequences. (Running on oeis4.)