OFFSET
1,2
COMMENTS
If k is a term of this sequence then k*2^m is a term of A116882 for any m >= 0.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (2*n-1)*2^A070941(n-1), for n > 1.
MATHEMATICA
q[n_] := 2^(2*IntegerExponent[n, 2]) >= n; Join[{1}, Select[Range[2, 12000, 2], q[#] && !q[#/2] &]]
(* or *)
a[1] = 1; a[n_] := (2*n - 1)*2^IntegerLength[2*n - 1, 2]; Array[a, 100]
PROG
(PARI) a(n) = if(n == 1, 1, (2*n - 1)*2^length(binary(2*n - 1)));
(Python)
def A363121(n): return (m:=2*n-1)<<m.bit_length() if n>1 else 1 # Chai Wah Wu, May 17 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, May 16 2023
STATUS
approved