# Thread: Primes in an Infinite Sequence

1. ## Primes in an Infinite Sequence

1.) Given the following infinite sequence:

9, 98, 987, 9876, ..., 987654321, 9876543219, 98765432198, ...

What are all the primes?

2.) David has this unique social security number. The 9 digits in the social security number have the digits from 1 all the way through 9. The number also has the following properties: when you read it from left to right, the first two digits will form a number that is divisible by 2, the first 3 digits will form a number that's divisible by 3, the first 4 digits... and so forth until the whole number is divisible by 9. What is David's social security number?

2. Hello, Ideasman!

Given the following infinite sequence:
. . 9, 98, 987, 9876, ..., 987654321, 9876543219, 98765432198, ...

What are all the primes?
All the even numbers can be eliminated.

We have the sequence ending with odd digits:

. . . . . . . 9, 987, 98765, 9876543, 987654321, ...
. . - - . . . . . . - . . . . . . . . - - . .
Divisors: .9 - 3 . . . 5 . - - . .3 . . . . . . 9

So far, the first five odd numbers are composite.
Let's consider the next five in the sequence.

If we append 9, we have: .9876543219, which is still divisible by 9.

If we append 987, we have: .987654321987, which is still divisible by 3.

If we append 98765, we have: .98765432198765, which is divisible by 5.

If we append 9876543, we have: .9876543219876543, which is divislble by 3.

If we append 987654321, we have: .987654321987654321, which is divisible by 9.

It seems that there are no primes in the sequence.

3. Originally Posted by Ideasman
1.) Given the following infinite sequence:

9, 98, 987, 9876, ..., 987654321, 9876543219, 98765432198, ...

What are all the primes?

2.) David has this unique social security number. The 9 digits in the social security number have the digits from 1 all the way through 9. The number also has the following properties: when you read it from left to right, the first two digits will form a number that is divisible by 2, the first 3 digits will form a number that's divisible by 3, the first 4 digits... and so forth until the whole number is divisible by 9. What is David's social security number?
Thanks Soroban. My prof. is tricky. I was trying to find prime numbers for #1. No wonder I couldn't find any. Yes, this is correct.

For the 2nd one, does it relate to #1 at all? They are in the same "section".