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.

Showing 1-3 of 3 results.

A357658 a(n) is the maximum Hamming weight of squares k^2 in the range 2^n <= k^2 < 2^(n+1).

Original entry on oeis.org

1, 2, 3, 3, 5, 4, 6, 6, 8, 8, 9, 9, 13, 11, 13, 12, 14, 15, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 26, 27, 28, 29, 30, 31, 31, 34, 33, 34, 37, 37, 38, 38, 39, 39, 41, 41, 42, 44, 44, 44, 46, 47, 47, 49, 50, 51, 52, 52, 53, 54, 55, 55, 57, 57, 58, 59, 62, 63
Offset: 2

Views

Author

Hugo Pfoertner, Oct 09 2022

Keywords

Comments

The sequence can be approximated by a linear function c*n + d, with c ~= 0.883 +- 0.003, d ~= -1.65 +- 0.16. See linked plot. For a square number with 100 binary digits (n=99) a maximum Hamming weight of 85 or 86 is expected. For example, 1125891114428899^2 has Hamming weight 85.

Examples

			  n         A357753(n) a(n) A357659(n)    A357660(n)    A357754(n)
  bits  2^n  least sq  Ha w  k_min  ^2     k_max  ^2   largest sq
   2     4      4       1     2      4      2      4        4
   3     8      9       2     3      9      3      9        9
   4    16     16       3     5     25      5     25       25
   5    32     36       3     7     49      7     49       49
   6    64     64       5    11    121     11    121      121
   7   128    144       4    13    169     15    225      225
  12  4096   4096       9    75   5625     89   7921     8100
		

Crossrefs

A357659 and A357660 are the minimal and the maximal values of k producing a(n).

A357754 a(n) is the largest square with n binary digits.

Original entry on oeis.org

4, 9, 25, 49, 121, 225, 484, 961, 2025, 3969, 8100, 16129, 32761, 65025, 131044, 261121, 524176, 1046529, 2096704, 4190209, 8386816, 16769025, 33547264, 67092481, 134212225, 268402689, 536848900, 1073676289, 2147395600, 4294836225, 8589767761, 17179607041, 34359441769
Offset: 3

Views

Author

Hugo Pfoertner, Oct 11 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Array[Floor[Sqrt[2^# - 1]]^2 &, 33, 3] (* Michael De Vlieger, Oct 11 2022 *)
  • PARI
    for (n=3, 35, forstep (k2=2^n-1, 2^(n-1), -1, if (issquare(k2), print1(k2,", "); break)))
    
  • PARI
    a(n) = if(n%2 == 1, (sqrt(1<David A. Corneth, Oct 11 2022
    
  • Python
    from math import isqrt
    def A357754(n): return (isqrt((1<>1))-1)**2 # Chai Wah Wu, Oct 13 2022

Formula

a(n) = 2^n - A056007(n). - Kevin Ryde, Oct 13 2022
a(n) = A116601(n+2)^2. - Michel Marcus, Oct 13 2022

A357657 a(n) is a lower bound for the square root of the maximum square with exactly n zeros in its binary representation.

Original entry on oeis.org

1, 0, 181, 45, 362, 1241, 2965685, 5931189, 57804981
Offset: 0

Views

Author

Keywords

Comments

See A357656 for more information.
a(9) >= 66537313397, a(10) >= 10520476455.

Crossrefs

A357656 gives the Hamming weight of the squared terms.
Showing 1-3 of 3 results.