[go: up one dir, main page]

login
A276170
Let n have j digits {d_j, d_(j-1), ..., d_2, d_1}. Sequence lists numbers n such that n = d_j^b_j + d_(j-1)^b_(j-1) + ... + d_2^b_2 + d_1^b_1 for some permutation {b_j, b_(j-1), ..., b_2, b_1} of the digits.
2
1, 1364, 3435, 4155, 4316, 4355, 17463, 48625, 63725, 78215, 117693, 136775, 137456, 137529, 164726, 184746, 196753, 264719, 326617, 326671, 397612, 423858, 516974, 637395, 652812, 653285, 653957, 687523, 834272, 936627, 1374962, 1617349, 1679812, 1683397, 1683514
OFFSET
1,2
COMMENTS
0^0 is not admitted.
652812 is the first number with two essentially different permutations:
6^1 + 5^8 + 2^5 + 8^6 + 1^2 + 2^2 = 6^2 + 5^8 + 2^1 + 8^6 + 1^5 + 2^2 = 652812.
EXAMPLE
One of the permutations of {1,3,6,4} is {6,1,4,3} and 1^6+3^1+6^4+4^3 = 1364.
MAPLE
with(combinat); P:= proc(q) local a, b, c, d, j, k, ok, n;
for n from 1 to q do ok:=1; d:=ilog10(n)+1; a:=convert(n, base, 10); b:=permute(a, d);
for k from 1 to nops(b) do c:=0; for j from 1 to d do
if a[j]=0 and b[k][j]=0 then ok:=0; break; else c:=c+a[j]^b[k][j]; fi; od;
if ok=1 then if c=n then print(n); break; fi; fi; od; od; end: P(10^6);
CROSSREFS
Sequence in context: A119521 A004930 A004950 * A028486 A281479 A013592
KEYWORD
nonn,base,fini,easy
AUTHOR
Paolo P. Lava, Aug 23 2016
STATUS
approved