login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357754 a(n) is the largest square with n binary digits. 7
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
LINKS
FORMULA
a(n) = 2^n - A056007(n). - Kevin Ryde, Oct 13 2022
a(n) = A116601(n+2)^2. - Michel Marcus, Oct 13 2022
MATHEMATICA
Array[Floor[Sqrt[2^# - 1]]^2 &, 33, 3] (* Michael De Vlieger, Oct 11 2022 *)
PROG
(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<<n)\1)^2, ((1 << (n\2)) - 1)^2) \\ David A. Corneth, Oct 11 2022
(Python)
from math import isqrt
def A357754(n): return (isqrt((1<<n)-1) if n&1 else (1<<(n>>1))-1)**2 # Chai Wah Wu, Oct 13 2022
CROSSREFS
Sequence in context: A158183 A158184 A001255 * A133019 A326708 A028866
KEYWORD
nonn,base,easy
AUTHOR
Hugo Pfoertner, Oct 11 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 17 18:03 EDT 2024. Contains 375990 sequences. (Running on oeis4.)