login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A090465 Smallest number m such that n followed by m nines yields a prime or -1 if no solution exists or has been found for n. 2
1, 0, 0, 2, 0, -1, 0, 1, -1, 1, 0, -1, 0, 1, -1, 2, 0, -1, 0, 2, -1, 1, 0, -1, 3, 1, -1, 4, 0, -1, 0, 2, -1, 1, 1, -1, 0, 1, -1, 1, 0, -1, 0, 1, -1, 16, 0, -1, 1, 1, -1, 3, 0, -1, 5, 1, -1, 15, 0, -1, 0, 2, -1, 12, 1, -1, 0, 2, -1, 1, 0, -1, 0, 2, -1, 1, 3, -1, 0, 1, -1, 1, 0, -1, 1, 2, -1, 33, 0, -1, 1, 1, -1, 3, 10, -1, 0, 3, -1, 1, 0, -1, 0, 1, -1, 1, 0, -1 (list; graph; refs; listen; history; internal format)
OFFSET

1,4

COMMENTS

a(n) = 0 if n is already prime. a(n) = -1 for n = any multiple of 3 other than 3 itself. The first 9 record holders in this sequence are 1, 4, 25, 28, 46, 88, 374, 416, 466 with the values 1, 2, 3, 4, 16, 33, 57, 70, 203 respectively.

EXAMPLE

a(25)=3 because three 9's must be appended to 25 before a prime is formed (25999). a(6) = -1 because no matter how many 9's are appended to 6, the resulting number is always divisible by 3 and can therefore not be prime.

CROSSREFS

Cf. A083747 (The Wilde Primes, i.e. same operation using ones), A090464 (using sevens), A090584 (using threes).

Sequence in context: A082886 A097304 A136745 * A052344 A147768 A167746

Adjacent sequences:  A090462 A090463 A090464 * A090466 A090467 A090468

KEYWORD

base,sign

AUTHOR

Chuck Seggelin (barkeep(AT)plastereddragon.com), Dec 02 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 03:44 EST 2012. Contains 205860 sequences.