cp's OEIS Frontend

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.

A053662 Numbers k such that 2k+1 divides k!+1.

This page as a plain text file.
%I A053662 #32 Jun 07 2024 08:02:56
%S A053662 3,5,9,21,23,33,39,51,63,65,81,89,95,99,113,131,173,183,191,209,215,
%T A053662 221,239,245,251,261,281,285,299,303,309,315,341,345,363,369,371,393,
%U A053662 411,419,431,443,473,495,509,525,543,545,561,575,593,645,659,683,711
%N A053662 Numbers k such that 2k+1 divides k!+1.
%C A053662 k+1 divides k!+1 gives primes-1 by Wilson's Theorem. For the present sequence, there are 309 terms below 5000, compared with 669 primes (309/669 = 0.461...). There are 553 terms below 10000, compared with 1229 primes (553/1229 = 0.449...). - _Ed Pegg Jr_, Dec 05 2001
%H A053662 G. C. Greubel, <a href="/A053662/b053662.txt">Table of n, a(n) for n = 1..10000</a>
%F A053662 a(n) >> n log n. - _Charles R Greathouse IV_, Apr 16 2024
%p A053662 A053662:=n->`if`(n!+1 mod (2*n+1) = 0, n, NULL): seq(A053662(n), n=1..1000); # _Wesley Ivan Hurt_, Dec 01 2015
%t A053662 Drop[Union[Table[If[IntegerQ[(n!+1)/(2n+1)], n], {n, 1, 1000}]], -1] (* _Ed Pegg Jr_, Dec 05 2001 *)
%t A053662 Select[Range[1000], Mod[#! +1, 2*# +1] == 0 &] (* _G. C. Greubel_, May 18 2019 *)
%o A053662 (PARI) for(n=1,10^3, if((n!+1)%(2*n+1)==0, print1(n,", ")) ) \\ _G. C. Greubel_, May 18 2019
%o A053662 (Magma) [n: n in [1..1000] | (Factorial(n)+1) mod (2*n+1) eq 0 ]; // _G. C. Greubel_, May 18 2019
%o A053662 (Sage) [n for n in (1..1000) if Mod(factorial(n)+1, 2*n+1)==0 ] # _G. C. Greubel_, May 18 2019
%o A053662 (GAP) Filtered([1..1000], n-> (Factorial(n)+1) mod (2*n+1)=0) # _G. C. Greubel_, May 18 2019
%Y A053662 Cf. A005097, A006093, A053663.
%K A053662 easy,nonn
%O A053662 1,1
%A A053662 _Chris K. Caldwell_, Feb 16 2000