login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Perfect powers that can be permuted into another perfect power (in base 10).
3

%I #23 Aug 24 2020 22:30:34

%S 125,144,169,196,243,256,324,441,512,625,961,1024,1089,1296,1369,1728,

%T 1764,1936,2187,2197,2401,2916,4096,4761,7921,9216,9261,9604,9801,

%U 10201,10404,10609,11236,11664,12100,12544,12769,13689,14400,14884,15129,16384,16641,16807

%N Perfect powers that can be permuted into another perfect power (in base 10).

%H David A. Corneth, <a href="/A069656/b069656.txt">Table of n, a(n) for n = 1..10000</a>

%e 1024 = 2^10 and a digit permutation gives 2401 = 7^4.

%e 1369 = 37^2 and a digit permutation gives 1936 = 44^2

%o (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 }

%o 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

%Y Cf. A001597.

%K nonn,base

%O 1,1

%A _Amarnath Murthy_, Apr 04 2002

%E Corrected and extended by _Bodo Zinser_, Apr 03 2005

%E Better definition from _Jon Wild_, Aug 20 2020

%E More terms from _David A. Corneth_, Aug 20 2020