cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A028982 Squares and twice squares.

This page as a plain text file.
%I A028982 #144 Feb 16 2025 08:32:35
%S A028982 1,2,4,8,9,16,18,25,32,36,49,50,64,72,81,98,100,121,128,144,162,169,
%T A028982 196,200,225,242,256,288,289,324,338,361,392,400,441,450,484,512,529,
%U A028982 576,578,625,648,676,722,729,784,800,841,882,900,961,968,1024
%N A028982 Squares and twice squares.
%C A028982 Numbers n such that sum of divisors of n (A000203) is odd.
%C A028982 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 A028982 Pell(n)*Sum_{k|n} 1/Pell(k) is odd, where Pell(n) is A000129(n). - _Paul Barry_, Oct 12 2005
%C A028982 Number of odd divisors of n (A001227) is odd. - _Vladeta Jovovic_, Aug 28 2007
%C A028982 A071324(a(n)) is odd. - _Reinhard Zumkeller_, Jul 03 2008
%C A028982 Sigma(a(n)) = A000203(a(n)) = A152677(n). - _Jaroslav Krizek_, Oct 06 2009
%C A028982 Numbers n such that sum of odd divisors of n (A000593) is odd. - _Omar E. Pol_, Jul 05 2016
%C A028982 A187793(a(n)) is odd. - _Timothy L. Tiffin_, Jul 18 2016
%C A028982 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 A028982 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 A028982 Positions of zeros in A292377 and A292383, positions of ones in A286357 and A292583. (See A292583 for why.) - _Antti Karttunen_, Sep 25 2017
%C A028982 Numbers of the form A000079(i)*A016754(j), i,j>=0. - _R. J. Mathar_, May 30 2020
%C A028982 Equivalently, numbers whose odd part is square. Cf. A042968. - _Peter Munn_, Jul 14 2020
%C A028982 These are the Heinz numbers of the partitions counted by A119620. - _Gus Wiseman_, Oct 29 2021
%C A028982 Numbers m whose abundance, A033880(m), is odd. - _Peter Munn_, May 23 2022
%C A028982 Numbers with an odd number of middle divisors (cf. A067742). - _Omar E. Pol_, Aug 02 2022
%H A028982 T. D. Noe, <a href="/A028982/b028982.txt">Table of n, a(n) for n = 1..1000</a>
%H A028982 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 A028982 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 A028982 Patrick De Geest, <a href="http://www.worldofnumbers.com/index.html">World!Of Numbers</a>
%H A028982 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 A028982 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Abundance.html">Abundance</a>
%F A028982 A001105 UNION A000290.
%F A028982 a(n) is asymptotic to c*n^2 with c = 2/(1+sqrt(2))^2 = 0.3431457.... - _Benoit Cloitre_, Sep 17 2002
%F A028982 In particular, a(n) = c*n^2 + O(n). - _Charles R Greathouse IV_, Jan 11 2013
%F A028982 a(A003152(n)) = n^2; a(A003151(n)) = 2*n^2. - _Enrique Pérez Herrero_, Oct 09 2013
%F A028982 Sum_{n>=1} 1/a(n) = Pi^2/4. - _Amiram Eldar_, Jun 28 2020
%t A028982 Take[ Sort[ Flatten[ Table[{n^2, 2n^2}, {n, 35}] ]], 57] (* _Robert G. Wilson v_, Aug 27 2004 *)
%o A028982 (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 A028982 (Haskell)
%o A028982 import Data.List.Ordered (union)
%o A028982 a028982 n = a028982_list !! (n-1)
%o A028982 a028982_list = tail $ union a000290_list a001105_list
%o A028982 -- _Reinhard Zumkeller_, Jun 27 2015
%o A028982 (Python)
%o A028982 from itertools import count, islice
%o A028982 from sympy.ntheory.primetest import is_square
%o A028982 def A028982_gen(startvalue=1): # generator of terms >= startvalue
%o A028982     return filter(lambda n:int(is_square(n) or is_square(n<<1)),count(max(startvalue,1)))
%o A028982 A028982_list = list(islice(A028982_gen(),30)) # _Chai Wah Wu_, Jan 09 2023
%o A028982 (Python)
%o A028982 from math import isqrt
%o A028982 def A028982(n):
%o A028982     def f(x): return n-1+x-isqrt(x)-isqrt(x>>1)
%o A028982     kmin, kmax = 1,2
%o A028982     while f(kmax) >= kmax:
%o A028982         kmax <<= 1
%o A028982     while True:
%o A028982         kmid = kmax+kmin>>1
%o A028982         if f(kmid) < kmid:
%o A028982             kmax = kmid
%o A028982         else:
%o A028982             kmin = kmid
%o A028982         if kmax-kmin <= 1:
%o A028982             break
%o A028982     return kmax # _Chai Wah Wu_, Aug 22 2024
%Y A028982 Complement of A028983.
%Y A028982 Characteristic function is A053866, A093709.
%Y A028982 Odd terms in A178910.
%Y A028982 Cf. A000203, A000290, A000593, A001105, A042968, A187793.
%Y A028982 Supersequence of A000079.
%Y A028982 Cf. A028260, A033880, A046951, A067742.
%Y A028982 Cf. A119620, A119899, A347437, A347438, A348550.
%K A028982 nonn,easy
%O A028982 1,2
%A A028982 _Patrick De Geest_