Page 1 of 1

Sequence

Posted: March 21st, 2019, 10:44 am
by cinelli
In the following infinite sequence

9 98 987 9876 98765 987654 9876543 98765432 987654321 9876543219
98765432198 987654321987 ... etc

how many numbers are prime?

Cinelli

Re: Sequence

Posted: March 21st, 2019, 11:31 am
by UncleEbenezer
None. They're all divisible by at least one of 2, 3 or 5.

Let's call your sequence X[n], starting at X[1] = 9.

The key is that you've missed out 0, so we can look for patterns in X[9n+m], where n >= 0 and 1 <= m <= 9.
All we need to do is to find divisors for each m.

Every X[3n] and X[3n+1] is divisible by 3. So that covers the cases of m=1, 3, 4, 6, 7 and 9.
Every X[9n+2, 4, 6 or 8] is divisible by 2.
Golly, that leaves only m=5. Which ends in a 5, and thus is divisible by 5.

Sorry, too easy ;)

Re: Sequence

Posted: March 21st, 2019, 12:28 pm
by Gengulphus
cinelli wrote:In the following infinite sequence

9 98 987 9876 98765 987654 9876543 98765432 987654321 9876543219
98765432198 987654321987 ... etc

how many numbers are prime?

Spoiler...

None of them - the ones ending with 9, 7, 6, 4, 3 and 1 are divisible by 3, the ones ending with 2 and 8 are divisible by 2 and the ones ending with 5 are divisible by 5, all by the standard divisibility tests. That only leaves the possibilities that primes in the sequence are 2, 3 or 5 themselves, and the sequence does not include any of them.

Gengulphus

Re: Sequence

Posted: March 23rd, 2019, 9:22 am
by cinelli
Well solved UncleEbenezer and Gengulphus. Perhaps it was an easy one, but I think there is a place for puzzles which aren't too taxing.

Cinelli