# Homework Help: Number problem

1. Oct 17, 2007

### Trail_Builder

one of the "maths challenge" questions. one of the only ones i couldn't do :S I've tried for a good number of hours, but havnt found a way to do it. I feel any more time would just be brute forcing it which i wouldnt have time for in the exam anyways.

hope you can help

1. The problem statement, all variables and given/known data

X is a positive integer in which each digit is 1; that is, X is of the form 111111....
Given that every digit of the integer pX^2 + qX + r (where p, q, and r are fixed integer coefficients and p > 0) is also 1. Irrespective of the number of digits X. Which of the following is a possible value of q?

2. Relevant equations

3. The attempt at a solution

:S

thanks

2. Oct 17, 2007

### ace123

Well if I understood correctly. Then can't you substitute x=1 and p=1 and then see what numbers for q would give you an integer with each digit being 1. Understand?

3. Oct 18, 2007

### Trail_Builder

it has to work for every possibly permutation of X I think.

hence "Irrespective of the number of digits X" and "where p, q, and r are fixed".

is that right?

4. Oct 18, 2007

### qspeechc

I know absolutely zero number theory, but here are my musings on this:

If X=11111... with n 1's, then X^2 contains all the digits from (and contained in) 1 to n, no more and no less.So
X^2 = 123...n...321 where n is the no. of 1's in X for n<11 (10=>0). n>10, X^2 contains all numbers 0, 1, ...9
pX^2 = p(123...n...321)
qX = qqqqq... n q's in total

So q=0 if n=1 and r= 0. For higher n the digits of X^2 are not all 1's.

p(123...n...321) + qqqq...+r = 111....
Is there a digit q that satisfies:
p(123...n...321) + qqqq... +r = 1111...

Apparently not: p(123...n...321) is of length 2n-1 (number of digits it contains), and qqqq... is of length n.
Im obviously not sure of all this, but it seems like this may have something to do with it. If it does, you can work it out and formalise it, if not, you can ignore me :D

Last edited: Oct 18, 2007
5. Oct 19, 2007

### ace123

well if q is 10 and r is 0 won't the integer be 11?

Edit: qspeechc might be right in what he's saying but I can't understand it at the moment but I hope you did.

Last edited: Oct 19, 2007
6. Oct 20, 2007

### qspeechc

To repeat myself; I don't know any number theory.

If q is 10^n, then all it does is add n zeroes on the end of the 1's, and you can see then that it doesn't change anything.

7. Oct 20, 2007

### ace123

I don't think he's checked this.