OFFSET
1,1
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
1024 = 2^10 and a digit permutation gives 2401 = 7^4.
1369 = 37^2 and a digit permutation gives 1936 = 44^2
PROG
(PARI) upto(n) = {l = List(); res = List(); for(i = 2, sqrtint(n), if(!ispower(i), for(j = 2, logint(n, i), c = i^j; listput(l, [freqdigits(c), c]); ) ) ); listsort(l, 1); for(i = 1, #l - 1, if(l[i][1] == l[i+1][1], k = i+1; while(k <= #l && l[i][1] == l[k][1], k++; ); for(j = i, k-1, listput(res, l[j][2]) ); ) ); listsort(res, 1); res }
addhelp(freqdigits, "Gives a vector that lists for every digit how often it occurs.") freqdigits(n) = {my(v=vector(10), d=digits(n)); for(i=1, #d, v[d[i]+1]++); v } \\ David A. Corneth, Aug 20 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 04 2002
EXTENSIONS
Corrected and extended by Bodo Zinser, Apr 03 2005
Better definition from Jon Wild, Aug 20 2020
More terms from David A. Corneth, Aug 20 2020
STATUS
approved