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.

This page as a plain text file.
%I A357753 #36 Oct 18 2022 13:31:31
%S A357753 4,9,16,36,64,144,256,529,1024,2116,4096,8281,16384,33124,65536,
%T A357753 131769,262144,525625,1048576,2099601,4194304,8392609,16777216,
%U A357753 33558849,67108864,134235396,268435456,536895241,1073741824,2147488281,4294967296,8589953124,17179869184
%N A357753 a(n) is the least square with n binary digits.
%F A357753 a(n) = A017912(n-1)^2.
%F A357753 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
%p A357753 a:= n-> ceil(sqrt(2)^(n-1))^2:
%p A357753 seq(a(n), n=3..35);  # _Alois P. Heinz_, Oct 13 2022
%t A357753 Array[Ceiling[Sqrt[2^(# - 1)]]^2 &, 33, 3]
%o A357753 (PARI) for (n=3, 35, for(k=0, oo, if(#digits(k^2,2)==n, print1(k^2,", "); break)))
%o A357753 (PARI) a(n) = if(n%2 == 1, 1 << (n-1), ceil(sqrt(1<<(n-1)))^2) \\ _David A. Corneth_, Oct 11 2022
%o A357753 (Python)
%o A357753 from math import isqrt
%o A357753 def A357753(n): return 1<<n-1 if n&1 else (isqrt(1<<n-1)+1)**2 # _Chai Wah Wu_, Oct 13 2022
%Y A357753 Cf. A000290, A000302, A065732, A070939, A017912, A357754.
%K A357753 nonn,base
%O A357753 3,1
%A A357753 _Hugo Pfoertner_, Oct 11 2022