login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A111462 a(1) = 7, then smallest prime beginning with the digit reversal of the previous term. 2
7, 71, 17, 719, 9173, 3719, 91733, 3371947, 7491733, 33719479, 974917337, 73371947923, 3297491733763, 367337194792327, 72329749173376301, 1036733719479232777, 777232974917337630173, 37103673371947923277727 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..18.

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: A097630 A090647 A200929 * A045713 A090155 A326740

Adjacent sequences:  A111459 A111460 A111461 * A111463 A111464 A111465

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy, Aug 04 2005

EXTENSIONS

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

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 28 07:43 EDT 2021. Contains 348321 sequences. (Running on oeis4.)