Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A090543
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A090543 a(1) = 3, then a(n) = least prime, not already present, beginning with the digit reversal of a(n-1). +0
3
3, 31, 13, 311, 113, 3119, 91139, 931193, 39113903, 30931193, 391139039, 930931193, 3911390393, 393093119329, 9239113903933, 3393093119329037, 7309239113903933023, 320339309311932903749, 94730923911390393302341 (list; graph; listen)
OFFSET

1,1

EXAMPLE

a(3) = 13 because a(2) = 31 and the digit reversal of 31 is 13 which is prime.

a(4) = 311 because a(3) = 13, digit reversal of 13 is 31, which is already in the list. Smallest prime that starts with 31 is 311.

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, A111462.

Sequence in context: A068698 A053300 A089281 this_sequence A139090 A042477 A023297

Adjacent sequences: A090540 A090541 A090542 this_sequence A090544 A090545 A090546

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Dec 09 2003; corrected 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 December 5 23:38 EST 2009. Contains 170428 sequences.


AT&T Labs Research