Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A087155
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A087155 Primes which are palindromes in more than one base. +0
1
5, 7, 13, 17, 23, 29, 31, 37, 41, 43, 59, 61, 67, 71, 73, 83, 89, 97, 101, 107, 109, 113, 127, 131, 151, 157, 173, 181, 191, 193, 197, 199, 211, 227, 229, 233, 239, 241, 251, 257, 271, 277, 281, 307, 313, 331, 337, 349, 353, 373, 379, 383, 397, 401, 409, 419 (list; graph; listen)
OFFSET

1,1

EXAMPLE

17 is in the list because 17 base 2 = 10001, 17 base 4 = 101 and 17 base 16 = 11, three palindromes. 19 is not in the list because 19 is not a palindrome for any base other that base 18.

PROGRAM

(PARI) q=1; forprime(m=3, 500, count=0; for(b=2, m-1, w=b+1; k=0; i=m; while(i>0, k=k*w+i%b; i=floor(i/b)); l=0; j=k; while(j>0, l=l*w+j%w; j=floor(j/w)); if(l==k, count=count+1; if(count>1, print1(m, ", "); q=b; m=nextprime(m+1); q=1; b=1, q=b), )))

CROSSREFS

Sequence in context: A040125 A106067 A028311 this_sequence A045442 A095283 A163385

Adjacent sequences: A087152 A087153 A087154 this_sequence A087156 A087157 A087158

KEYWORD

base,nonn

AUTHOR

Randy L. Ekl (Randy.Ekl(AT)Motorola.com), Oct 18 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research