OFFSET
2,1
COMMENTS
Every number that contains, in base n, every digit once is divisible by n-1 (if n is even) or (n-1)/2 (if n is odd).
Conjecture: a(n) exists for all n.
LINKS
Robert Israel, Table of n, a(n) for n = 2..385
EXAMPLE
a(4) = 201 because 201 = 3021_4 contains all digits 0 to 3 once in base 4, 201/(4-1) = 67 is prime, and no larger number works.
MAPLE
f:= proc(n) local b, p, x, i; uses combinat;
b:= `if`(n::even, n-1, (n-1)/2);
p:= lastperm(n);
do
x:= add((p[i]-1)*n^(n-i), i=1..n);
if isprime(x/b) then return x fi;
p:= prevperm(p);
if p = FAIL then return -1 fi
od;
end proc:
map(f, [$2..30]);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Feb 10 2026
STATUS
approved
