login
A309364
a(n) is the least k >= 0 such that n divides C(k) (where C(k) are the Catalan numbers A000108).
2
0, 2, 5, 6, 3, 5, 4, 14, 14, 8, 6, 6, 7, 4, 14, 30, 9, 14, 10, 13, 5, 6, 12, 14, 13, 8, 41, 12, 15, 14, 16, 62, 6, 9, 18, 14, 19, 10, 7, 14, 21, 5, 22, 6, 14, 12, 24, 46, 25, 13, 14, 10, 27, 41, 8, 26, 14, 16, 30, 14, 31, 16, 25, 126, 8, 6, 34, 10, 14, 18, 36
OFFSET
1,2
COMMENTS
The sequence is well defined:
- if k has t+1 ones in binary representation, 2^t divides C(k),
- for any odd prime number p: if k has e digits (p+1)/2 in base p, p^e divides C(k),
- for any n with prime factorization 2^t * Product_{i=1..o} p_i ^ e_i (where p_i are distinct odd prime numbers),
- by the Chinese remainder theorem, there is a number N ending with t+1 ones in base 2 and ending with e_i digits (p_i+1)/2 in base p_i for i = 1..o,
- C(N) is a multiple of n, and
- a(n) <= N.
As a consequence, A309200 is a permutation of the positive integers (since for any n > 0, we have infinitely many multiples of n among the Catalan number, and then the argument used to prove that A111273 is a permutation completes the proof).
LINKS
FORMULA
a(p) = (p+1)/2 for any prime number p > 3.
a(C(k)) = k for k <> 1.
PROG
(PARI) a(n) = for (k=0, oo, my (c=binomial(2*k, k)/(k+1)); if (c%n==0, return (k)))
(Python)
from itertools import count
def A309364(n):
if n == 1: return 0
c = 1
for k in count(1):
if not c%n: return k
c = c*((k<<1)+1<<1)//(k+2) # Chai Wah Wu, May 04 2023
CROSSREFS
Sequence in context: A340859 A336817 A340858 * A062825 A154925 A154962
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 25 2019
STATUS
approved