OFFSET
1,3
COMMENTS
Conjecture: the only terms of the form 2^r-1 are 0, 1, 3, 31 and 255. Since 2^r-1 !== 2 (mod 3), this is equivalent to saying that the only numbers of the form 2^r-1 that have no digits 2 in ternary are 0, 1, 3, 31, 255. The conjecture would imply that the n-th Catalan number is divisible by 2 or 3 other than n taking these values.
LINKS
Jianing Song, Table of n, a(n) for n = 1..12287 (all terms < 3^13-1)
FORMULA
EXAMPLE
PROG
(PARI) a(n) = 3*fromdigits(binary(n\3), 3) + n%3 - 1 \\ adapted from Gheorghe Coserea's program for A005836
(Python)
def A370662(n):
a, b = divmod(n, 3)
return 3*int(bin(a)[2:], 3)+b-1 # Chai Wah Wu, Feb 29 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jianing Song, Feb 24 2024
STATUS
approved