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.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 25 2019
STATUS
approved