OFFSET
1,6
COMMENTS
LINKS
Dustin Theriault, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
OddPart[x_] := x / 2^IntegerExponent[x, 2]
Table[OddPart[(3/2)^IntegerExponent[i + 1, 2] * (i + 1) - 1], {i, 100}]
PROG
(C) int a(int n) {
while (n & 1) n += (n >> 1) + 1;
while (!(n & 1)) n >>= 1;
return n;
}
(PARI) oddpart(n) = n >> valuation(n, 2); \\ A000265
a(n) = oddpart((3/2)^valuation(n+1, 2)*(n+1) - 1); \\ Michel Marcus, May 24 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Dustin Theriault, May 23 2023
STATUS
approved