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.

A357753 a(n) is the least square with n binary digits.

Original entry on oeis.org

4, 9, 16, 36, 64, 144, 256, 529, 1024, 2116, 4096, 8281, 16384, 33124, 65536, 131769, 262144, 525625, 1048576, 2099601, 4194304, 8392609, 16777216, 33558849, 67108864, 134235396, 268435456, 536895241, 1073741824, 2147488281, 4294967296, 8589953124, 17179869184
Offset: 3

Views

Author

Hugo Pfoertner, Oct 11 2022

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> ceil(sqrt(2)^(n-1))^2:
    seq(a(n), n=3..35);  # Alois P. Heinz, Oct 13 2022
  • Mathematica
    Array[Ceiling[Sqrt[2^(# - 1)]]^2 &, 33, 3]
  • PARI
    for (n=3, 35, for(k=0, oo, if(#digits(k^2,2)==n, print1(k^2,", "); break)))
    
  • PARI
    a(n) = if(n%2 == 1, 1 << (n-1), ceil(sqrt(1<<(n-1)))^2) \\ David A. Corneth, Oct 11 2022
    
  • Python
    from math import isqrt
    def A357753(n): return 1<Chai Wah Wu, Oct 13 2022

Formula

a(n) = A017912(n-1)^2.
a(2n+1) = (2^n)^2 = 4^n, for n>=1; indeed: 4^n_{10} = 10^(2n){2} that is the least number with 2n+1 binary digits. - _Bernard Schott, Oct 15 2022