reviewed
approved
Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
reviewed
approved
proposed
reviewed
editing
proposed
a = lambda n:((10**(n>>1))-1)<<1 if n & 1 == 0 else (11*(10**(n>>1)))-2 # _Darío Clavijo, Oct 16 2023
def a(n):
m = 10 ** (n >> 1)
if n & 1 == 0:
return (m - 1) << 1
else:
return (11 * m) - 2 # Darío Clavijo, Oct 16 2023
proposed
editing
editing
proposed
(Python)
a = lambda n:((10**(n>>1))-1)<<1 if n & 1 == 0 else (11*(10**(n>>1)))-2 # _Darío Clavijo, Oct 16 2023
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed