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 A254746 #12 May 22 2025 10:21:42 %S A254746 1,2,2,5,8,0,0,11,0,24,0,0,29,0,0,0,0,39,58,0,21,33,9,69,9,0,16,86,0, %T A254746 0,0,0,0,64,139,0,0,0,75,12,4,0,0,119,195,0,193,202,0,0,55,218,0,0,0, %U A254746 0,84,201,0,0,203,275,0,198,159,0,0,0,0,255,13,204,0 %N A254746 a(n) = Catalan(n^2) mod prime(n). %H A254746 Chai Wah Wu, <a href="/A254746/b254746.txt">Table of n, a(n) for n = 1..10000</a> %F A254746 a(n) = A000108(n^2) mod A000040(n). %t A254746 Table[Mod[CatalanNumber[n^2], Prime[n]], {n, 80}] %o A254746 (Magma) [Catalan(n^2) mod NthPrime(n): n in [1..100]]; %o A254746 (Python) %o A254746 from sympy import factorint, prime %o A254746 A254746_list, c, s, s2 = [1], {}, 2, 4 %o A254746 for n in range(2,10**3+1): %o A254746 for p,e in factorint(4*n-2).items(): %o A254746 if p in c: %o A254746 c[p] += e %o A254746 else: %o A254746 c[p] = e %o A254746 for p,e in factorint(n+1).items(): %o A254746 if c[p] == e: %o A254746 del c[p] %o A254746 else: %o A254746 c[p] -= e %o A254746 if n == s2: %o A254746 d, ps = 1, prime(s) %o A254746 for p,e in c.items(): %o A254746 d = (d*pow(p,e,ps)) % ps %o A254746 A254746_list.append(d) %o A254746 s2 += 2*s+1 %o A254746 s += 1 # _Chai Wah Wu_, Feb 14 2015 %Y A254746 Cf. A000040, A214441, A246714, A254706. %K A254746 nonn %O A254746 1,2 %A A254746 _Vincenzo Librandi_, Feb 07 2015