Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to eyeball08,Wondergirly,bofh,johnstevens77,Bhoddhisatva, for Donating to support the site

Sequence

cinelli
Lemon Slice
Posts: 553
Joined: November 9th, 2016, 11:33 am
Has thanked: 234 times
Been thanked: 161 times

Sequence

#209058

Postby cinelli » March 21st, 2019, 10:44 am

In the following infinite sequence

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

how many numbers are prime?

Cinelli

UncleEbenezer
The full Lemon
Posts: 10781
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1469 times
Been thanked: 2991 times

Re: Sequence

#209067

Postby UncleEbenezer » March 21st, 2019, 11:31 am

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 ;)

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Sequence

#209083

Postby Gengulphus » March 21st, 2019, 12:28 pm

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

cinelli
Lemon Slice
Posts: 553
Joined: November 9th, 2016, 11:33 am
Has thanked: 234 times
Been thanked: 161 times

Re: Sequence

#209558

Postby cinelli » March 23rd, 2019, 9:22 am

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


Return to “Games, Puzzles and Riddles”

Who is online

Users browsing this forum: No registered users and 15 guests