This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A309364 #34 May 04 2023 02:24:22 %S A309364 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, %T A309364 15,14,16,62,6,9,18,14,19,10,7,14,21,5,22,6,14,12,24,46,25,13,14,10, %U A309364 27,41,8,26,14,16,30,14,31,16,25,126,8,6,34,10,14,18,36 %N A309364 a(n) is the least k >= 0 such that n divides C(k) (where C(k) are the Catalan numbers A000108). %C A309364 The sequence is well defined: %C A309364 - if k has t+1 ones in binary representation, 2^t divides C(k), %C A309364 - for any odd prime number p: if k has e digits (p+1)/2 in base p, p^e divides C(k), %C A309364 - for any n with prime factorization 2^t * Product_{i=1..o} p_i ^ e_i (where p_i are distinct odd prime numbers), %C A309364 - 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 A309364 - C(N) is a multiple of n, and %C A309364 - a(n) <= N. %C A309364 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). %H A309364 Rémy Sigrist, <a href="/A309364/b309364.txt">Table of n, a(n) for n = 1..10000</a> %F A309364 a(p) = (p+1)/2 for any prime number p > 3. %F A309364 a(C(k)) = k for k <> 1. %o A309364 (PARI) a(n) = for (k=0, oo, my (c=binomial(2*k, k)/(k+1)); if (c%n==0, return (k))) %o A309364 (Python) %o A309364 from itertools import count %o A309364 def A309364(n): %o A309364 if n == 1: return 0 %o A309364 c = 1 %o A309364 for k in count(1): %o A309364 if not c%n: return k %o A309364 c = c*((k<<1)+1<<1)//(k+2) # _Chai Wah Wu_, May 04 2023 %Y A309364 Cf. A000108, A309200. %K A309364 nonn %O A309364 1,2 %A A309364 _Rémy Sigrist_, Jul 25 2019