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.

A255161 Prime numbers with more than one 1 < k < 10 for which the base-k representation is palindromic.

Original entry on oeis.org

2, 3, 5, 7, 17, 31, 67, 73, 107, 109, 127, 173, 191, 227, 257, 373, 701, 1667, 2293, 4289, 5189, 6761, 7517, 7703, 9103, 12547, 14891, 15083, 16319, 19433, 28807, 31727, 47653, 65537, 69313, 83269, 85093, 86293, 262657, 295433, 444713, 663571, 1053953, 1063613
Offset: 1

Views

Author

Pierandrea Formusa, Feb 15 2015

Keywords

Examples

			17 belongs to the sequence as for more than one one-digit base (2 and 4) its base representation is palindromic (in base 2 the representation is 10001, in base 4 the representation is 101).
13 does not belong to the sequence since only in one one-digit base (namely, base 3) is its base representation (111) palindromic.
		

Crossrefs

Cf. A087155 (without restriction k<10).

Programs

  • PARI
    ispal(n,b)=my(v=digits(n,b));for(i=1,#v\2,if(v[i]!=v[#v+1-i],return(0)));1
    is(n)=sum(b=2,9,ispal(n,b))>1 && isprime(n) \\ Charles R Greathouse IV, Feb 21 2015