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

Home > Just Math
Evaluate the smallest value (Posted on 2024-03-09) Difficulty: 3 of 5
Suppose that a positive integer N can be expressed as the sum of k consecutive positive integers N = a + (a + 1) + (a + 2) + · · · + (a + k − 1)
for k = 2017 but for no other values of k > 1.

Considering all positive integers N with this property, what is the smallest positive integer a that occurs in any of these expressions?

Source: Putnam 2017

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts If I understand the problem correctly ... | Comment 1 of 2
I believe this is what is sought:
Start with a.  Compute N(a, 2017).  Then for k from 2 to 2016 see if there is a value of 'b' s.t. N(b,k) = N(a, 2017).  Then if checking every k from 2 to 2016 there is no integer value of b, then we have found a solution.

For example, suppose a=1 and k=2017  Then N=2035153, but this value of a fails because:
N=2035153 works for other (a,k) pairs in addition to (1, 2017): specifically (1513, 1009), and (1017576, 2)
So a cannot be 1.

---
N(a,k) = ak + (k)(k-1)/2
Given N, find 'b' values such that for some k, N(b,k) = N(a,2017)
value for b = N/k - (k-1)/2

The first several values for a:  [16, 1040, 3088, 7184, 15376, 31760, 64528]  
(which is not in oeis)
So the smallest such value for a = 16

------------------------
def f(a,k):
    return a*k + (k)*(k-1)/2

def find_a(N,k):
    """ k^2 + (2a-1)k - 2N = 0 """
    return  N/k - (k-1)/2 

ans = []
power = 5
for a in range(1,10**power):
    found = False
    this_n = f(a,2017)
    for k in range(2, 2017):
        b = find_a(this_n,k)
        if b%1 == 0:
            found = True
    if not found:
        print(a)
        ans.append(a)

Edited on March 9, 2024, 12:20 pm
  Posted by Larry on 2024-03-09 12:18:02

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

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