cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Judson Neer, Aug 19 2016

Keywords

Comments

Permutations with leading zeros are not considered as palindromic, thus (for example) 10 is not included in the sequence.
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

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