A257897 Numbers n such that n = concat(a,b) and n | a^b + b^a , with a>0 and b>0.
63, 103, 128, 147, 155, 212, 272, 292, 351, 452, 486, 497, 525, 527, 537, 584, 607, 624, 648, 729, 979, 999, 1024, 1296, 1323, 1359, 1533, 1541, 1575, 1809, 1872, 2048, 2050, 2107, 2187, 2448, 2512, 2537, 2564, 2763, 2793, 2886, 3072, 3357, 3927, 4096, 4263, 4284
Offset: 1
Examples
6^3 + 3^6 = 945 and 945 / 63 = 15; 10^3 + 3^10 = 60049 and 60049 / 103 = 583; 12^8 + 8^12 = 69149458432 and 69149458432 / 128 = 540230144; etc.
Links
- Paolo P. Lava, Table of n, a(n) for n = 1..400
Programs
-
Maple
with(numtheory); P:=proc(q) local a,b,i,n; for n from 1 to q do for i from 1 to ilog10(n) do a:=trunc(n/10^i); b:=n-a*10^i; if a>0 and b>0 then if type((a^b+b^a)/n,integer) then print(n); break; fi; fi; od; od; end: P(10^9);
-
Mathematica
tst[n_]:=Catch@Block[{a,b}, Do[a=Floor[n/10^k]; b=Mod[n,10^k]; If[Mod[ PowerMod[a, b, n] + PowerMod[b, a, n], n]==0, Throw@True], {k, IntegerLength[n]-1}]; False]; Select[Range@1000, tst] (* Giovanni Resta, May 12 2015 *)
Comments