A276354 Palindromes n > 0 such that the sum of all distinct permutations of the digits of n is also a palindrome.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 191, 202, 212, 222, 232, 242, 252, 272, 303, 313, 323, 333, 353, 404, 414, 434, 444, 515, 555, 666, 777, 787, 868, 888, 949, 999, 1001, 1111, 1221, 2002, 2112, 2222, 2992
Offset: 1
Examples
101 is a term because 11 + 101 + 110 = 222 is also a palindrome. 232 is a term because 223 + 232 + 322 = 777 is also a palindrome. 2002 is a term because 22 + 202 + 220 + 2002 + 2020 + 2200 = 6666 is also a palindrome.
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..385
Programs
-
PARI
A047726(n) = n=eval(Vec(Str(n))); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!); A055642(n) = #Str(n); A007953(n) = sumdigits(n); A045876(n) = ((10^A055642(n)-1)/9)*(A047726(n)*A007953(n)/A055642(n)); isA002113(n) = n=digits(n); for(i=1, #n\2, if(n[i]!=n[#n+1-i], return(0))); 1; lista(nn) = for(n=1, nn, if(isA002113(n) && isA002113(A045876(n)), print1(n", ")));
Comments