Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a337864 -id:a337864
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) is the number formed by removing from n all duplicate digits except the leftmost copy of each.
+10
8
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 2, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 3, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 4, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 5, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 6, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 7, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 8, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 9, 10, 10, 102, 103, 104, 105, 106, 107, 108, 109, 10, 1, 12
OFFSET
0,3
COMMENTS
Differs from A106612: a(100) = 10, A106612(100) = 100.
Differs from A337864: a(101) = 10, A337864(101) = 101.
a(n)=n iff n is a term of A010784. a(n)<n iff n is a term of A109303.
A010784 is the sequence of distinct terms in this sequence, thus 9876543210 is the largest term here also, as no digit occurs more than once in any given term. Each term except 0 appears infinitely often in this sequence. - Rick L. Shepherd, Oct 03 2020
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000 (corrected by Andrew Howroyd at the suggestion of Rodolfo Kurchan and Omar E. Pol, Oct 04 2020)
EXAMPLE
a(100)=10 as a (second) 0 digit is dropped. a(1211323171)=1237.
a(10...1) = 10 for any number of 0's and/or 1's in any order replacing the "..." in the term's index. - Rick L. Shepherd, Oct 03 2020
MATHEMATICA
Table[FromDigits@ DeleteDuplicates@ IntegerDigits@ n, {n, 74}] (* Michael De Vlieger, Jun 01 2016 *)
PROG
(PARI) a(n)={my(d=digits(n)); fromdigits(vecextract(d, vecsort(vecsort(d, , 9))))} \\ Andrew Howroyd, Oct 04 2020
(Perl) sub a {my($n)=@_; my @seen; $n =~ s{.}{!$seen[$&]++ && $&}eg; $n} # Kevin Ryde, Oct 04 2020
(Python)
def a(n):
seen, out, s = set(), "", str(n)
for d in s:
if d not in seen: out += d; seen.add(d)
return int(out)
print([a(n) for n in range(113)]) # Michael S. Branicky, Jul 23 2022
CROSSREFS
Cf. A106612, A010784 (fixed points), A109303 (non-fixed).
Cf. A043529 (equivalent in binary, except at n=0), A337864.
KEYWORD
base,easy,nonn
AUTHOR
Rick L. Shepherd, Jan 25 2008
STATUS
approved
Consider the exponents in the prime factorization of n, and replace each run of k consecutive e's by a unique e; the resulting list corresponds to the exponents in the prime factorization of a(n).
+10
3
1, 2, 3, 4, 3, 2, 3, 8, 9, 10, 3, 12, 3, 10, 3, 16, 3, 18, 3, 20, 21, 10, 3, 24, 9, 10, 27, 20, 3, 2, 3, 32, 21, 10, 3, 4, 3, 10, 21, 40, 3, 10, 3, 20, 45, 10, 3, 48, 9, 50, 21, 20, 3, 54, 21, 40, 21, 10, 3, 12, 3, 10, 63, 64, 21, 10, 3, 20, 21, 10, 3, 72, 3
OFFSET
1,2
COMMENTS
We ignore the exponents (all 0's) for the prime numbers beyond the greatest prime factor of n.
This sequence operates on prime exponents as A090079 and A337864 operate on binary and decimal digits, respectively.
FORMULA
a(a(n)) = a(n).
a(n^k) = a(n)^k for any k >= 0.
a(n) = A319521(A356008(n)).
A007814(a(n)) = A007814(n).
a(n) = 3 iff n belongs to A294674 \ {1}.
a(n) = 4 iff n belongs to A061742 \ {1}.
a(n) = 8 iff n belongs to A115964.
EXAMPLE
For n = 99:
- 99 = 11^1 * 7^0 * 5^0 * 3^2 * 2^0,
- the list of exponents is: 1 0 0 2 0,
- compressing consecutive values, we obtain: 1 0 2 0,
- so a(99) = 7^1 * 5^0 * 3^2 * 2^0 = 63.
PROG
(PARI) a(n) = { my (v=1, e=-1, k=0); forprime (p=2, oo, if (n==1, return (v), if (e!=e=valuation(n, p), v*=prime(k++)^e); n/=p^e)) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 23 2022
STATUS
approved

Search completed in 0.005 seconds