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

%I #39 Aug 15 2015 03:41:44

%S 2,3,5,7,17,31,67,73,107,109,127,173,191,227,257,373,701,1667,2293,

%T 4289,5189,6761,7517,7703,9103,12547,14891,15083,16319,19433,28807,

%U 31727,47653,65537,69313,83269,85093,86293,262657,295433,444713,663571,1053953,1063613

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

%H Chai Wah Wu, <a href="/A255161/b255161.txt">Table of n, a(n) for n = 1..3793</a> (all terms < 10^14).

%e 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).

%e 13 does not belong to the sequence since only in one one-digit base (namely, base 3) is its base representation (111) palindromic.

%o (PARI) ispal(n,b)=my(v=digits(n,b));for(i=1,#v\2,if(v[i]!=v[#v+1-i],return(0)));1

%o is(n)=sum(b=2,9,ispal(n,b))>1 && isprime(n) \\ _Charles R Greathouse IV_, Feb 21 2015

%Y Cf. A087155 (without restriction k<10).

%K nonn,base

%O 1,1

%A _Pierandrea Formusa_, Feb 15 2015