login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers whose digits have a permutation that is a palindrome.
1

%I #21 Aug 31 2016 15:24:11

%S 1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99,101,110,111,112,113,114,

%T 115,116,117,118,119,121,122,131,133,141,144,151,155,161,166,171,177,

%U 181,188,191,199,202,211,212,220,221,222,223,224,225,226,227,228,229,232,233,242,244,252,255,262,266

%N Numbers whose digits have a permutation that is a palindrome.

%C Permutations with leading zeros are not considered as palindromic, thus (for example) 10 is not included in the sequence.

%C Also numbers in which at most 1 digit occurs an odd number of times and (if there is more than one digit) at least 2 digits are nonzero. - _David A. Corneth_, Aug 21 2016, corrected by _Robert Israel_, Aug 31 2016

%H Robert Israel, <a href="/A276115/b276115.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= proc(n) local L,M;

%p if n < 10 then return true fi;

%p L:= convert(n,base,10);

%p M:= [seq(numboccur(j,L),j=0..9)];

%p convert(M mod 2, `+`) <= 1 and convert(M[2..-1],`+`)>=2

%p end proc:

%p select(filter, [$1..1000]); # _Robert Israel_, Aug 31 2016

%o (PARI) is(n) = {my(v = concat(vecsort(digits(n)), ["a"]), prev=1, odd=0); if(#v>2&&v[#v-2]==0,return(0)); for(i=1,#v-1, if(v[i]!=v[i+1], odd+=(i-prev+1)%2; if(odd==2,return(0)); prev = i + 1)); 1} \\ _David A. Corneth_, Aug 21 2016

%Y Cf. A084050 (for a sequence where leading zero numbers are included).

%K nonn,base

%O 1,2

%A _Judson Neer_, Aug 19 2016

%E 101 inserted by _Robert Israel_, Aug 31 2016