All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Polynomial Degree Plunder (Posted on 2025-02-17) Difficulty: 3 of 5
Find the number of polynomials P(x) with positive integer coefficients and with at most 2 terms such that P(2)=384.

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer solution | Comment 1 of 2
Assume the polynomials with two terms are of the form:   ax^e + bx^f and with e >= f

Initially allowing both terms to have equal exponents, I found 542:  536 with 2 terms, and 6 with 1 term.    But ...
... I am reducing this number by 190 to:
    346 with 2 terms, 6 with one term
    a total of 352

The 190 have 2 terms but each term has the same exponent:
96 are of the form:  (96+i)x + (96-i)x
48 are of the form:  (48+i)x^2 + (48-i)x^2
24 are of the form:  (24+i)x^3 + (48-i)x^3
12 are of the form:  (12+i)x^4 + (48-i)x^4
6 are of the form:  (6+i)x^5 + (48-i)x^5
3 are of the form:  (3+i)x^6 + (48-i)x^6
1 is of the form: 2x^7 + 1x^7
This accounts for 190 where the exponents are the same.  My opinion is that these are not in proper polynomial form and should not be counted.  They are duplicative of the 6 polynomials with only one term.

The 6 polynomials with a single term are:
3x^7,  6x^6,  12x^5,  24x^4,  48x^3,  96x^2

The 346 polynomials with two terms (and different exponents, largest first) are:
1x^8 + 1x^7,  1x^8 + 2x^6,  1x^7 + 4x^6,  1x^8 + 4x^5,  1x^7 + 8x^5,  1x^8 + 8x^4,  1x^6 + 10x^5,  1x^7 + 16x^4,  1x^8 + 16x^3,  1x^6 + 20x^4,  1x^5 + 22x^4,  1x^7 + 32x^3,  1x^8 + 32x^2,  1x^6 + 40x^3,  1x^5 + 44x^3,  1x^4 + 46x^3,  1x^7 + 64x^2,  1x^8 + 64x^1,  1x^6 + 80x^2,  1x^5 + 88x^2,  1x^4 + 92x^2,  1x^3 + 94x^2,  1x^7 + 128x^1,  1x^6 + 160x^1,  1x^5 + 176x^1,  1x^4 + 184x^1,  1x^3 + 188x^1,  1x^2 + 190x^1,  2x^7 + 2x^6,  2x^7 + 4x^5,  2x^6 + 8x^5,  2x^7 + 8x^4,  2x^6 + 16x^4,  2x^7 + 16x^3,  2x^5 + 20x^4,  2x^6 + 32x^3,  2x^7 + 32x^2,  2x^5 + 40x^3,  2x^4 + 44x^3,  2x^6 + 64x^2,  2x^7 + 64x^1,  2x^5 + 80x^2,  2x^4 + 88x^2,  2x^3 + 92x^2,  2x^6 + 128x^1,  2x^5 + 160x^1,  2x^4 + 176x^1,  2x^3 + 184x^1,  2x^2 + 188x^1,  3x^6 + 6x^5,  3x^6 + 12x^4,  3x^5 + 18x^4,  3x^6 + 24x^3,  3x^5 + 36x^3,  3x^4 + 42x^3,  3x^6 + 48x^2,  3x^5 + 72x^2,  3x^4 + 84x^2,  3x^3 + 90x^2,  3x^6 + 96x^1,  3x^5 + 144x^1,  3x^4 + 168x^1,  3x^3 + 180x^1,  3x^2 + 186x^1,  4x^6 + 4x^5,  4x^6 + 8x^4,  4x^5 + 16x^4,  4x^6 + 16x^3,  4x^5 + 32x^3,  4x^6 + 32x^2,  4x^4 + 40x^3,  4x^5 + 64x^2,  4x^6 + 64x^1,  4x^4 + 80x^2,  4x^3 + 88x^2,  4x^5 + 128x^1,  4x^4 + 160x^1,  4x^3 + 176x^1,  4x^2 + 184x^1,  5x^6 + 2x^5,  5x^6 + 4x^4,  5x^6 + 8x^3,  5x^5 + 14x^4,  5x^6 + 16x^2,  5x^5 + 28x^3,  5x^6 + 32x^1,  5x^4 + 38x^3,  5x^5 + 56x^2,  5x^4 + 76x^2,  5x^3 + 86x^2,  5x^5 + 112x^1,  5x^4 + 152x^1,  5x^3 + 172x^1,  5x^2 + 182x^1,  6x^5 + 12x^4,  6x^5 + 24x^3,  6x^4 + 36x^3,  6x^5 + 48x^2,  6x^4 + 72x^2,  6x^3 + 84x^2,  6x^5 + 96x^1,  6x^4 + 144x^1,  6x^3 + 168x^1,  6x^2 + 180x^1,  7x^5 + 10x^4,  7x^5 + 20x^3,  7x^4 + 34x^3,  7x^5 + 40x^2,  7x^4 + 68x^2,  7x^5 + 80x^1,  7x^3 + 82x^2,  7x^4 + 136x^1,  7x^3 + 164x^1,  7x^2 + 178x^1,  8x^5 + 8x^4,  8x^5 + 16x^3,  8x^4 + 32x^3,  8x^5 + 32x^2,  8x^4 + 64x^2,  8x^5 + 64x^1,  8x^3 + 80x^2,  8x^4 + 128x^1,  8x^3 + 160x^1,  8x^2 + 176x^1,  9x^5 + 6x^4,  9x^5 + 12x^3,  9x^5 + 24x^2,  9x^4 + 30x^3,  9x^5 + 48x^1,  9x^4 + 60x^2,  9x^3 + 78x^2,  9x^4 + 120x^1,  9x^3 + 156x^1,  9x^2 + 174x^1,  10x^5 + 4x^4,  10x^5 + 8x^3,  10x^5 + 16x^2,  10x^4 + 28x^3,  10x^5 + 32x^1,  10x^4 + 56x^2,  10x^3 + 76x^2,  10x^4 + 112x^1,  10x^3 + 152x^1,  10x^2 + 172x^1,  11x^5 + 2x^4,  11x^5 + 4x^3,  11x^5 + 8x^2,  11x^5 + 16x^1,  11x^4 + 26x^3,  11x^4 + 52x^2,  11x^3 + 74x^2,  11x^4 + 104x^1,  11x^3 + 148x^1,  11x^2 + 170x^1,  12x^4 + 24x^3,  12x^4 + 48x^2,  12x^3 + 72x^2,  12x^4 + 96x^1,  12x^3 + 144x^1,  12x^2 + 168x^1,  13x^4 + 22x^3,  13x^4 + 44x^2,  13x^3 + 70x^2,  13x^4 + 88x^1,  13x^3 + 140x^1,  13x^2 + 166x^1,  14x^4 + 20x^3,  14x^4 + 40x^2,  14x^3 + 68x^2,  14x^4 + 80x^1,  14x^3 + 136x^1,  14x^2 + 164x^1,  15x^4 + 18x^3,  15x^4 + 36x^2,  15x^3 + 66x^2,  15x^4 + 72x^1,  15x^3 + 132x^1,  15x^2 + 162x^1,  16x^4 + 16x^3,  16x^4 + 32x^2,  16x^3 + 64x^2,  16x^4 + 64x^1,  16x^3 + 128x^1,  16x^2 + 160x^1,  17x^4 + 14x^3,  17x^4 + 28x^2,  17x^4 + 56x^1,  17x^3 + 62x^2,  17x^3 + 124x^1,  17x^2 + 158x^1,  18x^4 + 12x^3,  18x^4 + 24x^2,  18x^4 + 48x^1,  18x^3 + 60x^2,  18x^3 + 120x^1,  18x^2 + 156x^1,  19x^4 + 10x^3,  19x^4 + 20x^2,  19x^4 + 40x^1,  19x^3 + 58x^2,  19x^3 + 116x^1,  19x^2 + 154x^1,  20x^4 + 8x^3,  20x^4 + 16x^2,  20x^4 + 32x^1,  20x^3 + 56x^2,  20x^3 + 112x^1,  20x^2 + 152x^1,  21x^4 + 6x^3,  21x^4 + 12x^2,  21x^4 + 24x^1,  21x^3 + 54x^2,  21x^3 + 108x^1,  21x^2 + 150x^1,  22x^4 + 4x^3,  22x^4 + 8x^2,  22x^4 + 16x^1,  22x^3 + 52x^2,  22x^3 + 104x^1,  22x^2 + 148x^1,  23x^4 + 2x^3,  23x^4 + 4x^2,  23x^4 + 8x^1,  23x^3 + 50x^2,  23x^3 + 100x^1,  23x^2 + 146x^1,  24x^3 + 48x^2,  24x^3 + 96x^1,  24x^2 + 144x^1,  25x^3 + 46x^2,  25x^3 + 92x^1,  25x^2 + 142x^1,  26x^3 + 44x^2,  26x^3 + 88x^1,  26x^2 + 140x^1,  27x^3 + 42x^2,  27x^3 + 84x^1,  27x^2 + 138x^1,  28x^3 + 40x^2,  28x^3 + 80x^1,  28x^2 + 136x^1,  29x^3 + 38x^2,  29x^3 + 76x^1,  29x^2 + 134x^1,  30x^3 + 36x^2,  30x^3 + 72x^1,  30x^2 + 132x^1,  31x^3 + 34x^2,  31x^3 + 68x^1,  31x^2 + 130x^1,  32x^3 + 32x^2,  32x^3 + 64x^1,  32x^2 + 128x^1,  33x^3 + 30x^2,  33x^3 + 60x^1,  33x^2 + 126x^1,  34x^3 + 28x^2,  34x^3 + 56x^1,  34x^2 + 124x^1,  35x^3 + 26x^2,  35x^3 + 52x^1,  35x^2 + 122x^1,  36x^3 + 24x^2,  36x^3 + 48x^1,  36x^2 + 120x^1,  37x^3 + 22x^2,  37x^3 + 44x^1,  37x^2 + 118x^1,  38x^3 + 20x^2,  38x^3 + 40x^1,  38x^2 + 116x^1,  39x^3 + 18x^2,  39x^3 + 36x^1,  39x^2 + 114x^1,  40x^3 + 16x^2,  40x^3 + 32x^1,  40x^2 + 112x^1,  41x^3 + 14x^2,  41x^3 + 28x^1,  41x^2 + 110x^1,  42x^3 + 12x^2,  42x^3 + 24x^1,  42x^2 + 108x^1,  43x^3 + 10x^2,  43x^3 + 20x^1,  43x^2 + 106x^1,  44x^3 + 8x^2,  44x^3 + 16x^1,  44x^2 + 104x^1,  45x^3 + 6x^2,  45x^3 + 12x^1,  45x^2 + 102x^1,  46x^3 + 4x^2,  46x^3 + 8x^1,  46x^2 + 100x^1,  47x^3 + 2x^2,  47x^3 + 4x^1,  47x^2 + 98x^1,  48x^2 + 96x^1,  49x^2 + 94x^1,  50x^2 + 92x^1,  51x^2 + 90x^1,  52x^2 + 88x^1,  53x^2 + 86x^1,  54x^2 + 84x^1,  55x^2 + 82x^1,  56x^2 + 80x^1,  57x^2 + 78x^1,  58x^2 + 76x^1,  59x^2 + 74x^1,  60x^2 + 72x^1,  61x^2 + 70x^1,  62x^2 + 68x^1,  63x^2 + 66x^1,  64x^2 + 64x^1,  65x^2 + 62x^1,  66x^2 + 60x^1,  67x^2 + 58x^1,  68x^2 + 56x^1,  69x^2 + 54x^1,  70x^2 + 52x^1,  71x^2 + 50x^1,  72x^2 + 48x^1,  73x^2 + 46x^1,  74x^2 + 44x^1,  75x^2 + 42x^1,  76x^2 + 40x^1,  77x^2 + 38x^1,  78x^2 + 36x^1,  79x^2 + 34x^1,  80x^2 + 32x^1,  81x^2 + 30x^1,  82x^2 + 28x^1,  83x^2 + 26x^1,  84x^2 + 24x^1,  85x^2 + 22x^1,  86x^2 + 20x^1,  87x^2 + 18x^1,  88x^2 + 16x^1,  89x^2 + 14x^1,  90x^2 + 12x^1,  91x^2 + 10x^1,  92x^2 + 8x^1,  93x^2 + 6x^1,  94x^2 + 4x^1,  95x^2 + 2x^1

------------------------
count = 0
sols = []
for a in range(1,193):
    for b in range(1,193):
        for e in range(1,9):
        # for e in range(6,7):
            if a*2**e > 384:
                continue
            for f in range(1,e+1):
                if e==f:
                    continue
            # for f in range(6,7):
                if b*2**f > 384:
                    continue
                if e==f and a<b:
                    continue

                if a*2**e + b*2**f == 384:
                    # print(a,b,e,f)
                    if e==f and e>6:
                        print(a,b,e,f,'asdf')
                    count += 1
                    text = (str(a) + 'x^' + 
                            str(e) + ' + ' +
                            str(b) + 'x^' +
                            str(f))
                    sols.append(text)
                            
print(count)

count2 = 0
sols2 = []
for a in range(1,192):
    for e in range(1,9):
        if a*2**e == 384:
            count2 += 1
            text = (str(a) + 'x^' + 
                    str(e) )
            sols2.append(text)
print(sols2)
print(count2)

  Posted by Larry on 2025-02-17 14:37:15
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information