OFFSET
1,2
COMMENTS
a(n) is odd iff n is in A001108.
a(n) = 6 if either n = 18 or n = q^2 where q is in A048161 or n = 2 q^2 - 1 where q is in A106483. - Robert Israel, Oct 26 2015
From Bernard Schott, Aug 29 2020: (Start)
a(n-1) is the number of solutions in positive integers (x, y, z) to the simultaneous equations (x + y - z = n, x^2 + y^2 - z^2 = n) for n > 1. See the British Mathematical Olympiad link. In this case, one always has z > x and z > y.
For n = 12 as in the Olympiad problem, the a(11) = 8 solutions are (13,78,79), (14,45,47), (15,34,37), (18,23,29), (23,18,29), (34,15,37), (45,14,47), (78,13,79). (End)
REFERENCES
Steve Dinh, The Hard Mathematical Olympiad Problems And Their Solutions, AuthorHouse, 2011, Problem 2 of the British Mathematical Olympiad 2007, page 28.
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000
British Mathematical Olympiad 2007/2008, Round 1, Problem 2.
FORMULA
EXAMPLE
a(6) = 4 since 1+2+3+4+5+6 = 21 has four divisors {1,3,7,21}.
MAPLE
seq(numtheory:-tau(n*(n+1)/2), n=1..100); # Robert Israel, Oct 26 2015
MATHEMATICA
DivisorSigma[0, #]&/@Accumulate[Range[90]] (* Harvey P. Dale, Apr 15 2019 *)
PROG
(PARI) for (n=1, 10000, write("b063440.txt", n, " ", numdiv(n*(n + 1)/2)) ) \\ Harry J. Smith, Aug 21 2009
(PARI) a(n)=factorback(apply(numdiv, if(n%2, [n, (n+1)/2], [n/2, n+1]))) \\ Charles R Greathouse IV, Dec 27 2014
(PARI) vector(100, n, numdiv(n*(n+1)/2)) \\ Altug Alkan, Oct 26 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Jul 24 2001
STATUS
approved