An Early Christmas Algebraic Sequence

Consider the sequence a 1 , a 2 , a 3 , a 4 , { a }_{ 1 },{ a }_{ 2 },{ a }_{ 3 },{ a }_{ 4 },\dots such that a 1 = 2 { a }_{ 1 }=2 and for every positive integer n n ,

a n + 1 = a n + p n { a }_{ n+1 }={ a }_{ n }+{ p }_{ n } , where p n { p }_{ n } is the largest prime factor of a n { a }_{ n } .

The first few terms of the sequence are 2 , 4 , 6 , 9 , 12 , 15 , 20 2,4,6,9,12,15,20 . What is the largest value of n n such that a n { a }_{ n } is a four-digit number?

Note : This is adapted from a Mathematics competition. Happy solving; From Issac Newton,


The answer is 198.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

6 solutions

Patrick Corn
Dec 16, 2014

The key fact is: if p p and q q are consecutive primes, then a p + q 2 = p q a_{p+q-2} = pq .

You can see this by induction: it's true for p = 2 , q = 3 p = 2, q = 3 , and then if it's true for p p and q q , suppose r r is the next prime after q q . Then the terms of the sequence between a p + q 2 a_{p+q-2} and a q + r 2 a_{q+r-2} are pretty clearly an arithmetic sequence with common difference q q , as q q is the largest prime factor of all of them. So a q + r 2 = q r a_{q+r-2} = qr and the inductive hypothesis holds.

So a 196 = 97 101 a_{196} = 97 \cdot 101 , and then a 198 = 99 101 = 9999 a_{198} = 99 \cdot 101 = 9999 , so 198 \fbox{198} is the answer.

Well, I observed another thing: for prime p p , a 2 p 2 = p 2 a_{2p-2}=p^2
I think this is equivalent to yours.

展豪 張 - 5 years, 6 months ago

Right, I got the sequence 1,3,6,10,16,21, 27, 33 (which is the sequence of the positions of the numbers which were in the form p q pq in the original sequence). I couldn't find the pattern and kept taking multiple differentials over and over till I just gave up :D. If only I added 2 to each number in the sequence haha

Tanishq kancharla - 6 years, 5 months ago

Log in to reply

It doesn't have to be that counter-intuitive. Just factorize incompletely each number in the sequence:

  • a 1 = 2 × 1 a_1 = 2\times1
  • a 2 = 2 × 2 a_2 = 2\times2
  • a 3 = 2 × 3 a_3 = 2\times3
  • a 4 = 3 × 3 a_4 = 3\times3
  • a 5 = 4 × 3 a_5 = 4\times3
  • a 6 = 5 × 3 a_6 = 5\times3
  • a 7 = 5 × 4 a_7 = 5\times4
  • a 8 = 5 × 5 a_8 = 5\times5
  • a 9 = 5 × 6 a_9 = 5\times6
  • a 10 = 5 × 7 a_{10} = 5\times7
  • a 11 = 6 × 7 a_{11} = 6\times7
  • a 12 = 7 × 7 a_{12} = 7\times7
  • a 13 = 8 × 7 a_{13} = 8\times7
  • a 14 = 9 × 7 a_{14} = 9\times7
  • a 15 = 10 × 7 a_{15} = 10\times7
  • a 16 = 11 × 7 a_{16} = 11\times7

Kenny Lau - 5 years, 10 months ago

observed that the sequence is

2×1 , 2×2 , 2×3 , 3×3 , 3×4 , 3×5 , 4×5 , 5×5

There are some perfect square of prime , Consider from a part of sequence (p,q are primes)

p×(p+1) , p×(p+2) , ... , p×q , p+1×q , p+2×q , ... , q×q

There are 2(q-p) terms , So the Sequence

2×1 , 2×2 , 2×3 , 3×3 , ... p×p , ... , q×q , ... , r×r

there are 2(r-q) + 2(q-p) + 2(p-3) + 2(3-2) + 2 terms , which simplify to 2r-2

now find a prime number that squared is less than 9999

that prime is 97 (97×97 = 9409)

so the sequence

2 , 4 ,6 , 9 , .... , 9409

has 192 terms , now keep finding few next terms

a192 = 97×97

a193 = 98×97

a194 = 99×97

a195 = 100×97

a196 = 101×97

a197 = 101×98

a198 = 101×99

so the answer is 198

This is a wonderful combination of observation and algebra. This should be the top solution... if it has more LaTeX.

Kenny Lau - 5 years, 10 months ago

I like this solution. I did something similar, after the first few you get a logical idea of what it all means, and it just sort of comes together.

Austin Antonacci - 5 years, 7 months ago
Chew-Seong Cheong
Dec 16, 2014

We notice that the sequence of a n a_n is as follows: S n = { 2 , 4 , 6 , 9 , 12 , 15 , 20 , 25 , 30 , 35... } S_n = \{2,4,6,9,12,15,20,25,30,35...\} = { 1 ˙ 2 , 2 ˙ 2 , 2 ˙ 3 , 3 ˙ 3 , 4 ˙ 3 , 3 ˙ 5 , 4 ˙ 5 , 5 ˙ 5 , 6 ˙ 5 , 5 ˙ 7... } \quad \space = \{1\dot{}2,2\dot{}2,2\dot{}3,3\dot{}3,4\dot{}3,3\dot{}5,4\dot{}5,5\dot{}5,6\dot{}5,5\dot{}7...\}

If q n q_n denotes the n t h n^{th} prime, then:

S n = { q 1 , 2 q 1 , q 1 q 2 , 3 q 2 , 4 q 2 , q 2 q 3 , 4 q 3 , 5 q 3 , 6 q 3 , q 3 q 4 . . . q k q k + 1 . . . } S_n = \{q_1,2q_1,q_1q_2,3q_2,4q_2,q_2q_3,4q_3,5q_3,6q_3,q_3q_4...q_kq_{k+1}...\}

When a n = q k q k + 1 a_n=q_kq_{k+1} then

n = ( q 2 0 ) + ( q 3 q 1 ) + ( q 4 q 2 ) + . . . + ( q k + 1 q k ) = q k + 1 + q k q 1 n = (q_2-0)+(q_3-q_1)+(q_4-q_2)+ ...+(q_{k+1}-q_k) = q_{k+1}+q_k-q_1

For example:

When k = 1 k = 1 or a n = 2 ˙ 3 = 6 n = q 2 + q 1 q 1 = 0 + 3 + 2 2 = 3 a_n = 2\dot{}3 = 6 \quad \Rightarrow n = q_2 + q_1 - q_1 = 0 + 3 + 2 -2 = 3 .

When k = 2 k = 2 or a n = 15 n = q 3 + q 2 q 1 = 5 + 3 2 = 6 a_n = 15 \quad \Rightarrow n = q_3 + q_2 - q_1 = 5 + 3 - 2 = 6

When k = 3 k = 3 or a n = 35 a_n = 35 n = q 4 + q 3 q 1 = 7 + 5 2 = 10 \quad \Rightarrow n = q_4 + q_3 - q_1 = 7 + 5 - 2 = 10

The largest k k for a n < 10000 a_n < 10000 is 25 25 , when a n 1 = q 25 q 26 = 97 ˙ 101 = 9797 a_{n_1} = q_{25}q_{26} = 97\dot{}101 = 9797 , when n = 101 + 97 2 = 196 n = 101 + 97 -2 = 196 .

Then a 197 = 9797 + 101 = 9898 a_{197} = 9797 + 101 = 9898 and a 198 = 9898 + 101 = 9999 a_{198} = 9898 + 101 = 9999 .

Therefore the largest n = 198 n = \boxed {198} .

Arjen Vreugdenhil
Oct 19, 2015

Lemma : For every prime p p , the perfect square p 2 p^2 occupies position 2 p 2 2p-2 in the sequence.

Thus, the last perfect square less than 10 0 2 100^2 is p = 97 p = 97 at position 192.

The sequence then continues: a 192 = 9 7 2 , a 193 = 97 98 , a 194 = 97 99 , a 195 = 97 100 , a 196 = 97 101 , a 197 = 98 101 , a 198 = 99 101 = 9999. a_{192} = 97^2, a_{193} = 97\cdot 98, a_{194} = 97\cdot 99, a_{195} = 97\cdot 100, \\ a_{196} = 97\cdot 101, a_{197} = 98\cdot 101, a_{198} = 99\cdot 101 = 9999. Thus the answer is 198 \boxed{198} .

(Or, once you detect the pattern, count backward from a 200 = 10 1 2 a_{200} = 101^2 .)

Proof of the lemma, by induction. Suppose the statement is true for some prime p p , and let p p' be the next prime number. Then a 2 p 2 + 1 = p ( p + 1 ) , a 2 p 2 + n = p ( p + n ) for p + n p , a p + p 2 = p p , a p + p 1 = ( p + 1 ) p , a p + p + n 2 = ( p + n ) p for p + n p , a 2 p 2 = p p . \begin{array}{ll} a_{2p-2+1} = p\cdot (p+1), \\ a_{2p-2+n} = p\cdot (p+n) & \text{for}\ p+ n \leq p', \\ a_{p+p'-2} = p\cdot p', \\ a_{p+p'-1} = (p+1)\cdot p', \\ a_{p+p'+n-2} = (p+n)\cdot p' & \text{for}\ p+n \leq p', \\ a_{2p'-2} = p'\cdot p'.\end{array} Since the statement is true for p = 2 p = 2 ( a 2 = 2 2 a_2 = 2^2 ), it is true for all prime numbers.

Nikola Djuric
Dec 22, 2015

2×1,2×2,2×3|3×3,3×4,3×5|...97×101|101×98,101×99 so we see that answer is 3+(5-2)+(7-3)+(11-5)+...+(101-89)+2= 101+97=198 a198=9999

Sean Sullivan
Jul 17, 2015

I observed that every other nimber in the pattern is either a perfect square of a prime, or one below the perfect square of a composite, for each even term of the sequence a n a_{n} it is the either the square or 1 1 less the square of n 2 + 1 \frac{n}{2}+1 , the closest square to 9999 9999 is 10000 = 10 0 2 10000=100^{2} so 100 = n 2 + 1 100=\frac{n}{2}+1 and n = 198 n=198 , because 10000 10000 is the square of a composite and not a prime, a 198 a_{198} is 1 1 less than 10000 10000 , or 9999 9999 and the answer is 198 \boxed{198}

Disclaimer: I'm aware this isn't a mathematically stable argument as I gave no proof for the pattern I found however as this problem was from a mathematic competition I had speed in mind and went with the pattern I first saw

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...