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!)
A159078 Number of perfect powers with distinct digits in base n. 0

%I #11 Sep 22 2013 23:14:02

%S 1,1,9,8,25,50,88,297,657,1418,3212,8662,24185,64103,183718

%N Number of perfect powers with distinct digits in base n.

%e The 8 powers with unique digits in base 5 are 1, 4, 8, 9, 16, 27, 144, and 576; in base 5 these are 1, 4, 13, 14, 31, 102, 1304, and 4301.

%o (PARI) okdigs(digs) = {for (i = 1, #digs-1, for (j = i+1, #digs, if (digs[j] == digs[i], return (0);););); return (1);}

%o a(n) = {b = n; sols = Set([1]); vmax = b^b; pmax = ceil(log(vmax)/log(2)); for (p = 2, pmax, i = 2; while ((iep = i^p) < vmax, if (okdigs(digits(iep, b)), sols = Set(concat(sols, iep));); i++;);); #sols;} \\ _Michel Marcus_, Aug 19 2013

%Y Cf. A075309

%K nonn,base,more

%O 2,3

%A _Johan Särnbratt_, Apr 04 2009

%E a(11) - a(16) from _Johan Särnbratt_, Apr 21 2009

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 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)