%I #166 Oct 22 2024 12:53:06
%S 1,1,1,2,1,2,1,2,2,2,1,3,1,2,2,3,1,3,1,3,2,2,1,4,2,2,2,3,1,4,1,3,2,2,
%T 2,5,1,2,2,4,1,4,1,3,3,2,1,5,2,3,2,3,1,4,2,4,2,2,1,6,1,2,3,4,2,4,1,3,
%U 2,4,1,6,1,2,3,3,2,4,1,5,3,2,1,6,2,2,2,4,1,6,2,3,2,2,2,6,1,3,3,5,1,4,1,4,4
%N Number of divisors of n that are at most sqrt(n).
%C Number of ways to arrange n identical objects in a rectangle, modulo rotation.
%C Number of unordered solutions of x*y = n. - _Colin Mallows_, Jan 26 2002
%C Number of ways to write n-1 as n-1 = x*y + x + y, 0 <= x <= y <= n. - _Benoit Cloitre_, Jun 23 2002
%C Also number of values for x where x+2n and x-2n are both squares (e.g., if n=9, then 18+18 and 18-18 are both squares, as are 82+18 and 82-18 so a(9)=2); this is because a(n) is the number of solutions to n=k(k+r) in which case if x=r^2+2n then x+2n=(r+2k)^2 and x-2n=r^2 (cf. A061408). - _Henry Bottomley_, May 03 2001
%C Also number of sums of sequences of consecutive odd numbers or consecutive even numbers including sequences of length 1 (e.g., 12 = 5+7 or 2+4+6 or 12 so a(12)=3). - _Naohiro Nomoto_, Feb 26 2002
%C Number of partitions whose consecutive parts differ by exactly two.
%C a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24=2^3*3 and 375=3*5^3 both have prime signature (3,1). - _Christian G. Bower_, Jun 06 2005
%C Also number of partitions of n such that if k is the largest part, then each of the parts 1,2,...,k-1 occurs exactly twice. Example: a(12)=3 because we have [3,3,2,2,1,1],[2,2,2,2,2,1,1] and [1,1,1,1,1,1,1,1,1,1,1,1]. - _Emeric Deutsch_, Mar 07 2006
%C a(n) is also the number of nonnegative integer solutions of the Diophantine equation 4*x^2 - y^2 = 16*n. For example, a(24)=4 because there are 4 solutions: (x,y) = (10,4), (11,10), (14,20), (25,46). - _N-E. Fahssi_, Feb 27 2008
%C a(n) is the number of even divisors of 2*n that are <= sqrt(2*n). - _Joerg Arndt_, Mar 04 2010
%C First differences of A094820. - _John W. Layman_, Feb 21 2012
%C a(n) = #{k: A027750(n,k) <= A000196(n)}; a(A008578(n)) = 1; a(A002808(n)) > 1. - _Reinhard Zumkeller_, Dec 26 2012
%C Row lengths of the tables in A161906 and A161908. - _Reinhard Zumkeller_, Mar 08 2013
%C Number of positive integers in the sequence defined by x_0 = n, x_(k+1) = (k+1)*(x_k-2)/(k+2) or equivalently by x_k = n/(k+1) - k. - _Luc Rousseau_, Mar 03 2018
%C Expanding the first comment: Number of rectangles with area n and integer side lengths, modulo rotation. Also number of 2D grids of n congruent squares, in a rectangle, modulo rotation (cf. A000005 for rectangles instead of squares; cf. A034836 for the 3D case). - _Manfred Boergens_, Jun 08 2021
%C Number of divisors of n that have an even number of prime divisors (counted with multiplicity), or in other words, number of terms of A028260 that divide n. - _Antti Karttunen_, Apr 17 2022
%D George E. Andrews and Kimmo Eriksson, Integer Partitions, Cambridge Univ. Press, 2004, page 18, exer. 21, 22.
%H T. D. Noe, <a href="/A038548/b038548.txt">Table of n, a(n) for n = 1..10000</a>
%H Cristina Ballantine and Mircea Merca, <a href="https://doi.org/10.1016/j.jnt.2016.06.007">New convolutions for the number of divisors</a>, Journal of Number Theory, 2016, vol. 170, pp. 17-34.
%H Christopher Briggs, Y. Hirano, and H. Tsutsui, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Briggs/briggs3.html">Positive Solutions to Some Systems of Diophantine Equations</a>, Journal of Integer Sequences, Vol. 19 (2016), Article 16.8.4.
%H S.-H. Cha, E. G. DuCasse, and L. V. Quintas, <a href="http://arxiv.org/abs/1405.5283">Graph invariants based on the divides relation and ordered by prime signatures</a>, arXiv:1405.5283 [math.NT], 2014, (2.27).
%H Madeline Locus Dawsey, Matthew Just and Robert Schneider, <a href="https://arxiv.org/abs/2107.14284">A "supernormal" partition statistic</a>, arXiv:2107.14284 [math.NT], 2021. See Table 2 p. 21.
%H T. Verhoeff, <a href="https://cs.uwaterloo.ca/journals/JIS/trapzoid.html">Rectangular and Trapezoidal Arrangements</a>, J. Integer Sequences, Vol. 2 (1999), Article 99.1.6.
%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>.
%F a(n) = ceiling(d(n)/2), where d(n) = number of divisors of n (A000005).
%F a(2k) = A034178(2k) + A001227(k). a(2k+1) = A034178(2k+1). - _Naohiro Nomoto_, Feb 26 2002
%F G.f.: Sum_{k>=1} x^(k^2)/(1-x^k). - _Jon Perry_, Sep 10 2004
%F Dirichlet g.f.: (zeta(s)^2 + zeta(2*s))/2. - _Christian G. Bower_, Jun 06 2005 [corrected by _Vaclav Kotesovec_, Aug 19 2019]
%F a(n) = (A000005(n) + A010052(n))/2. - _Omar E. Pol_, Jun 23 2009
%F a(n) = A034178(4*n). - _Michael Somos_, May 11 2011
%F 2*a(n) = A161841(n). - _R. J. Mathar_, Mar 07 2021
%F a(n) = A000005(n) - A056924(n) = A056924(n) + A010052(n) = Sum_{d|n} A065043(d). - _Antti Karttunen_, Apr 17 2022
%F Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma - 1/2)*n, where gamma is Euler's constant (A001620). - _Amiram Eldar_, Nov 27 2022
%e a(4) = 2 since 4 = 2 * 2 = 4 * 1. Also A034178(4*4) = 2 since 16 = 4^2 - 0^2 = 5^2 - 3^2. - _Michael Somos_, May 11 2011
%e x + x^2 + x^3 + 2*x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + 2*x^9 + 2*x^10 + x^11 + ...
%p with(numtheory): A038548 := n->ceil(sigma[0](n)/2);
%t Table[ Floor[ (DivisorSigma[0, n] + 1)/2], {n, 105}] (* _Robert G. Wilson v_, Mar 02 2009 *)
%t Table[Count[Divisors[n],_?(#<=Sqrt[n]&)],{n,110}] (* _Harvey P. Dale_, Jul 10 2021 *)
%t Table[Sum[If[n > k*(k-1), 1, 0], {k, Divisors[n]}], {n, 1, 100}] (* _Vaclav Kotesovec_, Oct 22 2024 *)
%o (PARI) {a(n) = if( n<1, 0, sumdiv(n, d, d*d <= n))} /* _Michael Somos_, Jan 25 2005 */
%o (PARI) a(n)=ceil(numdiv(n)/2) \\ _Charles R Greathouse IV_, Sep 28 2012
%o (Haskell)
%o a038548 n = length $ takeWhile (<= a000196 n) $ a027750_row n
%o -- _Reinhard Zumkeller_, Dec 26 2012
%o (C#)
%o int A038548(int n) {
%o System.Numerics.BigInteger erg = 0, i;
%o for (i = 1; i * i <= n; i++)
%o if (n % i == 0) erg++;
%o return (int)erg;
%o } // _Frank Hollstein_, Jan 08 2023
%o (Python)
%o from sympy import divisor_count
%o def A038548(n): return divisor_count(n)+1>>1 # _Chai Wah Wu_, Dec 19 2023
%Y Different from A068108. Records give A038549, A004778, A086921.
%Y Cf. A000005, A001620, A028260, A056924, A072670, A094820, A161841, A108504.
%Y Cf. A066839, A033676, row sums of A303300.
%Y Inverse Möbius transform of A065043.
%Y Cf. A244664 (Dgf at s=2), A244665 (Dgf at s=3).
%K nonn,easy,nice,changed
%O 1,4
%A _Tom Verhoeff_, _N. J. A. Sloane_