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!)
A132129 Largest prime with distinct digits when written in base n. 1
2, 19, 19, 577, 7417, 114229, 2053313, 42373937, 987654103, 25678048763, 736867805209, 23136292864193, 789018236128391, 29043982525257901, 1147797409030815779, 48471109094902530293, 2178347851919531491093, 103805969587115219167613, 5228356786703601108008083 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
a(10) = 987654103 = A007810(9). For n >= 3, a(n) < A062813(n), a multiple of n.
Contribution R. J. Mathar, May 15 2010 (START):
Supposed all digits are used and the digits at positions 0 to n-1 are d_0, d_1,... d_{n-1}, the candidates are d_0+d_1*n+d_2*n^2+....+d_{n-1}*n^(n-1).
These values are (n-1)*n/2 (mod n-1), and they cannot be prime if n is even, because this number is = 0 (mod n-1) then, showing that n-1 is a divisor.
In conclusion, if n is even, the entries have at most n-1 digits in base n. (END)
If n is odd then the candidate numbers considered in the previous comment are divisible by (n-1)/2. Hence, we conclude that for n>3, a(n) has at most n-1 digits in base n. Conjecture: for n>3, a(n) has exactly n-1 digits in base n. - Eric M. Schmidt, Oct 26 2014
LINKS
EXAMPLE
a(9) = 42373937 as the prime 42373937 (base 10) = 87654102 (base 9), the largest prime number with distinct digits when represented in base 9.
PROG
(Sage) def a(n) :
if n==2 : return 2
if n==3 : return 19
for P in Permutations(range(n-1, -1, -1), n-1) :
N = sum(P[-1-i]*n^i for i in range(n-1))
if is_prime(N) : return N
# Eric M. Schmidt, Oct 26 2014
CROSSREFS
Sequence in context: A065643 A038031 A229264 * A125611 A340922 A370460
KEYWORD
base,nonn
AUTHOR
Rick L. Shepherd, Aug 11 2007
EXTENSIONS
Removed my claim of finiteness of the sequence. - R. J. Mathar, May 18 2010
a(11)-a(20) from Eric M. Schmidt, Oct 26 2014
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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)