A384537 Composite numbers that are equal to the concatenation of the primes and exponents in their prime factorizations in some bases.
16, 27, 64, 256, 729, 1024, 3125, 4096, 4617, 16384, 19683, 29767, 65536, 255987, 262144, 395847, 531441, 631463, 823543, 1048576, 1332331, 4194304, 9765625, 14348907, 16777216, 25640947, 67108864
Offset: 1
Examples
In base 6: 24 = 2^4 (in decimal: 16 = 2^4); In base 8: 33 = 3^3 (in decimal: 27 = 3^3); In base 29: 26 = 2^6 (in decimal: 64 = 2^6); In base 124: 28 = 2^8 (in decimal: 256 = 2^8); In base 241: 36 = 3^6 (in decimal: 729 = 3^6); In base 507: 2A = 2^A (in decimal: 1024 = 2^10); In base 624: 55 = 5^5 (in decimal: 3125 = 5^5); In base 2042: 2C = 2^C (in decimal: 4096 = 2^12); In base 11: 3518 = 3^5 * 18 (in decimal: 4617 = 3^5 * 19). See A384540 for more nontrivial examples.
Programs
-
PARI
F(n,b) = my(f=factor(n), d=[]); for(i=1, #f~, d=concat(d, digits(f[i,1],b)); if(f[i,2]>1, d=concat(d, digits(f[i,2],b)))); fromdigits(d,b) isA384537(n) = { if(issquarefree(n), return(0)); my(f=factor(n), dr); if(#f~ == 1, return(n > 4 && f[1,2] % f[1,1] == 0)); dr = if(f[#f~,2] == 1, f[#f~,1], f[#f~,2]); fordiv(n - dr, b, if(b>=2 && F(n,b)==n, return(b))); return(0); } \\ returns the (smallest) base to which n is a Davis number whenever possible
Comments