Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #30 Aug 18 2024 20:48:39
%S 1,2,1,2,2,2,1,2,1,4,1,2,1,2,2,2,2,2,1,4,1,2,1,2,2,3,1,2,1,4,1,2,1,3,
%T 2,2,2,2,1,4,1,2,1,2,2,2,1,2,1,5,2,3,1,2,2,2,1,2,1,4,1,2,1,2,3,2,1,3,
%U 1,4,1,2,1,3,2,2,1,3,1,4,1,3,1,2,3,2,1,2,1,4
%N Number of divisors d of n such that d-1 is square.
%C The Cartesian equation for the Witch of Agnesi is given as y = 8*k^3/(x^2+4*k^2). If we set x = n, then a(n)-1 is the number of positive integer solutions in k such that y is a positive integer. Let d = m^2+1 be a divisor of n, then k = m*n/2 is a solution. - _Thomas Scheuerle_, Aug 07 2024
%F G.f.: Sum_{k>=0} x^(k^2+1)/(1 - x^(k^2+1)).
%F From _Vaclav Kotesovec_, Jan 19 2023: (Start)
%F a(n) = Sum_{k=0..n} (floor(n/(k^2 + 1)) - floor((n-1)/(k^2 + 1))).
%F Sum_{k=1..n} a(k) = Sum_{k=0..n} floor(n/(k^2 + 1)).
%F Sum_{k=1..n} a(k) ~ c*n, where c = A113319 = (1 + Pi*coth(Pi))/2 = 2.0766... (End)
%t nmax = 100; Rest[CoefficientList[Series[Sum[x^(k^2 + 1)/(1 - x^(k^2 + 1)), {k, 0, Sqrt[nmax]}], {x, 0, nmax}], x]] (* _Vaclav Kotesovec_, Jan 19 2023 *)
%t Table[Sum[Floor[n/(k^2 + 1)] - Floor[(n-1)/(k^2 + 1)], {k, 0, Sqrt[n]}], {n, 1, 100}] (* _Vaclav Kotesovec_, Jan 19 2023 *)
%o (PARI) a(n) = sumdiv(n, d, issquare(d-1));
%o (PARI) my(N=100, x='x+O('x^N)); Vec(sum(k=0, sqrtint(N), x^(k^2+1)/(1-x^(k^2+1))))
%Y Cf. A002522, A046951, A113319, A359937, A359944.
%K nonn
%O 1,2
%A _Seiichi Manyama_, Jan 19 2023