%I #143 Aug 23 2024 02:10:12
%S 1,2,4,8,9,16,18,25,32,36,49,50,64,72,81,98,100,121,128,144,162,169,
%T 196,200,225,242,256,288,289,324,338,361,392,400,441,450,484,512,529,
%U 576,578,625,648,676,722,729,784,800,841,882,900,961,968,1024
%N Squares and twice squares.
%C Numbers n such that sum of divisors of n (A000203) is odd.
%C Also the numbers with an odd number of run sums (trapezoidal arrangements, number of ways of being written as the difference of two triangular numbers). - _Ron Knott_, Jan 27 2003
%C Pell(n)*Sum_{k|n} 1/Pell(k) is odd, where Pell(n) is A000129(n). - _Paul Barry_, Oct 12 2005
%C Number of odd divisors of n (A001227) is odd. - _Vladeta Jovovic_, Aug 28 2007
%C A071324(a(n)) is odd. - _Reinhard Zumkeller_, Jul 03 2008
%C Sigma(a(n)) = A000203(a(n)) = A152677(n). - _Jaroslav Krizek_, Oct 06 2009
%C Numbers n such that sum of odd divisors of n (A000593) is odd. - _Omar E. Pol_, Jul 05 2016
%C A187793(a(n)) is odd. - _Timothy L. Tiffin_, Jul 18 2016
%C If k is odd (k = 2m+1 for m >= 0), then 2^k = 2^(2m+1) = 2*(2^m)^2. If k is even (k = 2m for m >= 0), then 2^k = 2^(2m) = (2^m)^2. So, the powers of 2 sequence (A000079) is a subsequence of this one. - _Timothy L. Tiffin_, Jul 18 2016
%C Numbers n such that A175317(n) = Sum_{d|n} pod(d) is odd, where pod(m) = the product of divisors of m (A007955). - _Jaroslav Krizek_, Dec 28 2016
%C Positions of zeros in A292377 and A292383, positions of ones in A286357 and A292583. (See A292583 for why.) - _Antti Karttunen_, Sep 25 2017
%C Numbers of the form A000079(i)*A016754(j), i,j>=0. - _R. J. Mathar_, May 30 2020
%C Equivalently, numbers whose odd part is square. Cf. A042968. - _Peter Munn_, Jul 14 2020
%C These are the Heinz numbers of the partitions counted by A119620. - _Gus Wiseman_, Oct 29 2021
%C Numbers m whose abundance, A033880(m), is odd. - _Peter Munn_, May 23 2022
%C Numbers with an odd number of middle divisors (cf. A067742). - _Omar E. Pol_, Aug 02 2022
%H T. D. Noe, <a href="/A028982/b028982.txt">Table of n, a(n) for n = 1..1000</a>
%H Tewodros Amdeberhan, Victor H. Moll, Vaishavi Sharma, and Diego Villamizar, <a href="https://arxiv.org/abs/2007.03088">Arithmetic properties of the sum of divisors</a>, arXiv:2007.03088 [math.NT], 2020. See p. 5.
%H J. N. Cooper and A. W. N. Riasanovsky, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Cooper/cooper3.html">On the Reciprocal of the Binary Generating Function for the Sum of Divisors</a>, Journal of Integer Sequences, Vol. 16 (2013), #13.1.8.
%H Patrick De Geest, <a href="http://www.worldofnumbers.com/index.html">World!Of Numbers</a>
%H John S. Rutherford, <a href="http://dx.doi.org/10.1107/S010876730804333X">Sublattice enumeration. IV. Equivalence classes of plane sublattices by parent Patterson symmetry and colour lattice group type</a>, Acta Cryst. (2009). A65, 156-163.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Abundance.html">Abundance</a>
%F A001105 UNION A000290.
%F a(n) is asymptotic to c*n^2 with c = 2/(1+sqrt(2))^2 = 0.3431457.... - _Benoit Cloitre_, Sep 17 2002
%F In particular, a(n) = c*n^2 + O(n). - _Charles R Greathouse IV_, Jan 11 2013
%F a(A003152(n)) = n^2; a(A003151(n)) = 2*n^2. - _Enrique PĂ©rez Herrero_, Oct 09 2013
%F Sum_{n>=1} 1/a(n) = Pi^2/4. - _Amiram Eldar_, Jun 28 2020
%t Take[ Sort[ Flatten[ Table[{n^2, 2n^2}, {n, 35}] ]], 57] (* _Robert G. Wilson v_, Aug 27 2004 *)
%o (PARI) list(lim)=vecsort(concat(vector(sqrtint(lim\1),i,i^2), vector(sqrtint(lim\2),i,2*i^2))) \\ _Charles R Greathouse IV_, Jun 16 2011
%o (Haskell)
%o import Data.List.Ordered (union)
%o a028982 n = a028982_list !! (n-1)
%o a028982_list = tail $ union a000290_list a001105_list
%o -- _Reinhard Zumkeller_, Jun 27 2015
%o (Python)
%o from itertools import count, islice
%o from sympy.ntheory.primetest import is_square
%o def A028982_gen(startvalue=1): # generator of terms >= startvalue
%o return filter(lambda n:int(is_square(n) or is_square(n<<1)),count(max(startvalue,1)))
%o A028982_list = list(islice(A028982_gen(),30)) # _Chai Wah Wu_, Jan 09 2023
%o (Python)
%o from math import isqrt
%o def A028982(n):
%o def f(x): return n-1+x-isqrt(x)-isqrt(x>>1)
%o kmin, kmax = 1,2
%o while f(kmax) >= kmax:
%o kmax <<= 1
%o while True:
%o kmid = kmax+kmin>>1
%o if f(kmid) < kmid:
%o kmax = kmid
%o else:
%o kmin = kmid
%o if kmax-kmin <= 1:
%o break
%o return kmax # _Chai Wah Wu_, Aug 22 2024
%Y Complement of A028983.
%Y Characteristic function is A053866, A093709.
%Y Odd terms in A178910.
%Y Cf. A000203, A000290, A000593, A001105, A042968, A187793.
%Y Supersequence of A000079.
%Y Cf. A028260, A033880, A046951, A067742.
%Y Cf. A119620, A119899, A347437, A347438, A348550.
%K nonn,easy
%O 1,2
%A _Patrick De Geest_