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-5 of 5 results.

A230097 Indices of records in A159918.

Original entry on oeis.org

0, 1, 3, 5, 11, 21, 39, 45, 75, 155, 181, 627, 923, 1241, 2505, 3915, 5221, 6475, 11309, 15595, 19637, 31595, 44491, 69451, 113447, 185269, 244661, 357081, 453677, 908091, 980853, 2960011, 2965685, 5931189, 11862197, 20437147, 22193965, 43586515, 57804981, 157355851
Offset: 1

Views

Author

N. J. A. Sloane, Oct 11 2013

Keywords

Comments

The records themselves are not so interesting: 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18, 19, 20, ... (A357304).
Lindström mentions that the record value 34 in A159918 is first reached at n = 980853.

Crossrefs

Programs

  • Haskell
    a230097 n = a230097_list !! (n-1)
    a230097_list = 0 : f 0 0 where
       f i m = if v > m then i : f (i + 1) v else f (i + 1) m
               where v = a159918 i
    -- Reinhard Zumkeller, Oct 12 2013
    (Python 3.10+)
    from itertools import count, islice
    def A230097_gen(): # generator of terms
        c = -1
        for n in count(0):
            if (m := (n**2).bit_count())>c:
                yield n
                c = m
    A230097_list = list(islice(A230097_gen(),20)) # Chai Wah Wu, Oct 01 2022

Formula

Lindström shows that lim sup wt(m^2)/log_2 m = 2.

Extensions

a(19)-a(40) from Reinhard Zumkeller, Oct 12 2013

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).

A357656 a(n) is a lower bound for the largest Hamming weight of squares with exactly n binary zeros.

Original entry on oeis.org

1, 0, 13, 8, 13, 16, 37, 38, 44
Offset: 0

Views

Author

Keywords

Comments

The terms from a(2) onwards must be regarded as lower bounds, because no proof for the non-existence of squares with a very small number of binary zeros in the range k^2 > 2^90 (see b-file of A230097) is known.
a(9) >= 63, a(10) >= 57.

Examples

			                A357657(n)
   n  a(n) bits     k       k^2          k^2 in binary
   0    1    1      1         1                      1
   1    0    1      0         0                      0
   2   13   15    181     32761        111111111111001
   3    8   11     45      2025            11111101001
   4   13   17    362    131044      11111111111100100
   5   16   21   1241   1540081  101110111111111110001
		

Crossrefs

A357657 are the corresponding square roots of the record-setting squares.

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.

A357742 a(n) is the maximum binary weight of the squares of n-bit numbers.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 13, 13, 15, 16, 18, 20, 22, 24, 25, 27, 29, 31, 34, 34, 37, 38, 39, 41, 44, 44, 47, 49, 51, 52, 54, 55, 57, 59, 63, 63, 64, 66, 68, 69, 72, 73, 76, 77, 78, 80, 82, 85, 87
Offset: 1

Views

Author

Keywords

Examples

			   bit   |
  length |          possible binary weight of k^2
   of k  | 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
   = n   |          the rightmost value is a(n)
  -------+--------------------------------------------------------------
     1   | 0  1
     2   |    1  2  -  -
     3   |    1  2  3  -  -  -
     4   |    1  2  3  4  5  -  -  -
     5   |    1  2  3  4  5  6  -  -  -  -
     6   |    1  2  3  4  5  6  7  8  -  -  -  -
     7   |    1  2  3  4  5  6  7  8  9  -  -  -  -  -
     8   |    1  2  3  4  5  6  7  8  9 10 11  - 13  -  -  -
     9   |    1  2  3  4  5  6  7  8  9 10 11 12 13  -  -  -  -  -
    10   |    1  2  3  4  5  6  7  8  9 10 11 12 13 14 15  -  -  -  -  -
		

Crossrefs

Formula

a(n) = max(A357658(2*n-2), A357658(2*n-1)).

Extensions

a(47)-a(50) from Martin Ehrenstein, Dec 26 2023
Showing 1-5 of 5 results.