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 A082180 #60 Aug 06 2025 01:04:27 %S A082180 4,9,25,49,121,125,169,289,343,361,418,529,841,961,1331,1369,1681, %T A082180 1849,2197,2209,2809,3481,3721,4489,4913,5041,5329,6241,6859,6889, %U A082180 7921,9409,10201,10609,11449,11881,12167,12769,16129,17161,18769,19321 %N A082180 Composite integers k such that binomial(2*k, k) == 2 (mod k). %C A082180 Also, composite integers k such that A000108(k) == 2 (mod k). %C A082180 It seems that the sequence contains all squares of primes and some cubes of odd primes. But it includes other terms as well, including 418 = 2*11*19 and 27173 = 29*937. [edited by _Jon E. Schoenfield_, Jul 31 2018] %C A082180 By Wolstenholme's theorem, this sequence does contain all squares of primes and cubes of primes > 3^3, since for primes p > 3 we have binomial(2p^3, p^3) == binomial(2p^2, p^2) == binomial(2p, p) == binomial(2, 1) == 2 (mod p^3). See the link below. - _Jianing Song_, Aug 01 2018 %C A082180 Note that binomial(2*(n+1), n+1) = binomial(2*n, n) * (4 - 2/(n+1)), which could be used to find terms. - _David A. Corneth_, Aug 05 2018 %C A082180 Up to a(800) = 30946969, 2001341 = 787 * 2543 is the only further term which, like 418 and 27173, is neither a square nor a cube. - _Giovanni Resta_, Aug 08 2018 %H A082180 Chai Wah Wu, <a href="/A082180/b082180.txt">Table of n, a(n) for n = 1..3301</a> (terms 1..193 from David A. Corneth, terms 194..1320 from Giovanni Resta) %H A082180 Wikipedia, <a href="https://en.wikipedia.org/wiki/Wolstenholme%27s_theorem">Wolstenholme's theorem</a> %p A082180 select(n-> not isprime(n) and modp(binomial(2*n,n),n)=2,[$1..10000]); # _Muniru A Asiru_, Aug 01 2018 %t A082180 nn=20000;With[{comps=Complement[Range[nn],Prime[Range[PrimePi[nn]]]]}, Select[ comps,Mod[Binomial[2#,#],#]==2&]] (* _Harvey P. Dale_, May 24 2012 *) %t A082180 Select[Range@ 20000, CompositeQ@# && Mod[Binomial[2 #, #], #] == 2 &] (* _Robert G. Wilson v_, Aug 01 2018 *) %o A082180 (PARI) forcomposite(c=1, 2e4, if(Mod(binomial(2*c, c), c)==2, print1(c, ", "))) \\ _Felix Fröhlich_, Jul 30 2018 %o A082180 (PARI) upto(n) = {my(binomp = 2, res = List()); for(t = 2, n, binomp *= (4 - 2/t); %o A082180 if(!isprime(t) && binomp % t == 2, listput(res, t))); res} \\ _David A. Corneth_, Aug 05 2018 %o A082180 (GAP) Filtered([1..1000],n->not IsPrime(n) and Binomial(2*n,n) mod n =2); # _Muniru A Asiru_, Aug 01 2018 %Y A082180 Cf. A000108, A246131, A328497. %K A082180 nonn %O A082180 1,1 %A A082180 _Benoit Cloitre_, May 10 2003 %E A082180 More terms from _John W. Layman_, Jun 09 2004