login
A330569
a(n) = 1 if n is odd, otherwise a(n) = 2^(v-1)+1 where v is the 2-adic valuation of n (A007814(n)).
2
1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 9, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 17, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 9, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 33, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 9, 1, 2, 1, 3, 1
OFFSET
1,2
COMMENTS
Conjecture: a(n) is the height of the bottom region in column n of the Conant gasket in A328078.
LINKS
MATHEMATICA
a[n_] := If[OddQ[n], 1, 1 + 2^(IntegerExponent[n, 2] - 1)]; Array[a, 100] (* Amiram Eldar, Aug 30 2024 *)
PROG
(Python)
def A330569(n): return 1+(0 if n&1 else 1<<(~n & n-1).bit_length()-1) # Chai Wah Wu, Jul 01 2022
(PARI) a(n) = if(n % 2, 1, 1 + 1 << (valuation(n, 2) - 1)); \\ Amiram Eldar, Aug 30 2024
CROSSREFS
Sequence in context: A319494 A105609 A268361 * A340785 A355758 A206778
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 07 2020
STATUS
approved