Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A132129
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A132129 Largest prime with distinct digits when written in base n. +0
1
2, 19, 19, 577, 7417, 114229, 2053313, 42373937, 987654103 (list; graph; listen)
OFFSET

2,1

COMMENT

R. J. Mathar's program confirms a(2) - a(10) and proves that a(11) does not exist.

a(10) = 987654103 = A007810(9). For n >= 3, a(n) < A062813(n), a multiple of n.

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.

MAPLE

rebase := proc(L, b) add(op(-i, L)*b^(i-1), i=1..nops(L)) ; end: A132129rec := proc(L, n, ndigs) local a, d ; if nops(L) < ndigs then for d from n-1 to 0 by -1 do if not d in L then a := A132129rec([op(L), d], n, ndigs) ; if a > 0 then RETURN(a) ; fi ; fi ; od: RETURN(-1) ; else a := rebase(L, n) ; if isprime(a) then RETURN(a) ; else RETURN(-1) ; fi ; fi ; end: A132129 := proc(n) local d, L, a, ndgs ; for ndgs from n to 1 by -1 do for d from n-1 to 0 by -1 do L := [d] ; a := A132129rec(L, n, ndgs) ; if a > 0 then RETURN(a) ; fi ; od: od; end: for n from 2 do print(n, A132129(n)) ; od: - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Oct 24 2007

CROSSREFS

Cf. A062813, A007810, A029743.

Sequence in context: A153653 A065643 A038031 this_sequence A125611 A022119 A042247

Adjacent sequences: A132126 A132127 A132128 this_sequence A132130 A132131 A132132

KEYWORD

base,fini,full,nonn

AUTHOR

Rick L. Shepherd (rshepherd2(AT)hotmail.com), Aug 11 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research