Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A111462
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A111462 a(1) = 7, then smallest prime beginning with the digit reversal of the previous term. +0
3
7, 71, 17, 719, 9173, 3719, 91733, 3371947, 7491733, 33719479, 974917337, 73371947923, 3297491733763, 367337194792327, 72329749173376301, 1036733719479232777, 777232974917337630173, 37103673371947923277727 (list; graph; listen)
OFFSET

1,1

EXAMPLE

a(3) = 17 because a(2) = 71 and the digit reversal of 71 is 17 which is prime

a(4) = 719 because a(3) = 17, digit reversal of 17 is 71 which is already in the list. Smallest prime that starts with 71 is 719.

MAPLE

reverse := proc (nn) local n, m; m := 0; n := nn; while (n > 0) do m := m*10 + irem(n, 10, 'n'); od; m; end:

a := proc(n, m) option remember; global currSet; local currN, i, origN, j; if n = 0 then currSet := {m}; return m; end if; currN := reverse(a(n - 1, m)); if (not (evalb(currN in currSet))) then if (isprime(currN)) then currSet := currSet union {currN}; return currN; end if; end if; origN := currN; j := 1; while (true) do origN := 10 * origN; currN := origN; i := 0; while i < (10^j) do if (isprime(currN) and (not evalb(currN in currSet))) then currSet := currSet union {currN}; return currN; end if; currN := currN + 1; i := i + 1; end do; j := j + 1; end do; return currN; end proc; (Delgau)

CROSSREFS

Cf. A111463, A090543.

Sequence in context: A051604 A097630 A090647 this_sequence A045713 A090155 A107163

Adjacent sequences: A111459 A111460 A111461 this_sequence A111463 A111464 A111465

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Aug 04 2005

EXTENSIONS

More terms from Chris Deugau (deugaucj(AT)uvic.ca), Nov 07 2005

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 August 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research