A276115 Numbers whose digits have a permutation that is a palindrome.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 131, 133, 141, 144, 151, 155, 161, 166, 171, 177, 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
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A084050 (for a sequence where leading zero numbers are included).
Programs
-
Maple
filter:= proc(n) local L,M; if n < 10 then return true fi; L:= convert(n,base,10); M:= [seq(numboccur(j,L),j=0..9)]; convert(M mod 2, `+`) <= 1 and convert(M[2..-1],`+`)>=2 end proc: select(filter, [$1..1000]); # Robert Israel, Aug 31 2016
-
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
Extensions
101 inserted by Robert Israel, Aug 31 2016
Comments