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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A357096 Least number whose set of decimal digits coincides with the set of decimal digits of prime(n). 1
 2, 3, 5, 7, 1, 13, 17, 19, 23, 29, 13, 37, 14, 34, 47, 35, 59, 16, 67, 17, 37, 79, 38, 89, 79, 10, 103, 107, 109, 13, 127, 13, 137, 139, 149, 15, 157, 136, 167, 137, 179, 18, 19, 139, 179, 19, 12, 23, 27, 29, 23, 239, 124, 125, 257, 236, 269, 127, 27, 128, 238, 239 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS EXAMPLE prime(5) = 11 and 1 have the same set of digits {1}, and 1 is the smallest such number, hence a(5) = 1. MAPLE f:= proc(p) local L, i; L:= sort(convert(convert(convert(p, base, 10), set), list)); if L[1] = 0 then L[1]:= L[2]; L[2]:= 0 fi; add(L[-i]*10^(i-1), i=1..nops(L)) end proc: seq(f(ithprime(i)), i=1..100); # Robert Israel, Sep 12 2022 MATHEMATICA a[n_] := Module[{d = Union[IntegerDigits[Prime[n]]]}, If[d[[1]] == 0, d[[1;; 2]] = d[[2;; 1;; -1]]]; FromDigits[d]]; Array[a, 100] (* Amiram Eldar, Sep 13 2022 *) PROG (PARI) a(n)=my(v=vecsort(digits(prime(n)), , 8), w=v); if(v[1]==0, j=#v; w=if(j>2, v[3..j], []); w=concat(Vecrev(v[1..2]), w)); fromdigits(w) (Python) from sympy import prime def a(n): s = "".join(sorted(set(str(prime(n))))) return int(s) if "0" not in s else int(s[1] + "0" + s[2:]) print([a(n) for n in range(1, 63)]) # Michael S. Branicky, Sep 12 2022 CROSSREFS Cf. A179239, A179308. Sequence in context: A197124 A032759 A142711 * A093338 A229875 A230199 Adjacent sequences: A357093 A357094 A357095 * A357098 A357099 A357100 KEYWORD nonn,base AUTHOR Jean-Marc Rebert, Sep 12 2022 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.

Last modified January 27 17:42 EST 2023. Contains 359845 sequences. (Running on oeis4.)