A053662 Numbers k such that 2k+1 divides k!+1.
3, 5, 9, 21, 23, 33, 39, 51, 63, 65, 81, 89, 95, 99, 113, 131, 173, 183, 191, 209, 215, 221, 239, 245, 251, 261, 281, 285, 299, 303, 309, 315, 341, 345, 363, 369, 371, 393, 411, 419, 431, 443, 473, 495, 509, 525, 543, 545, 561, 575, 593, 645, 659, 683, 711
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Programs
-
GAP
Filtered([1..1000], n-> (Factorial(n)+1) mod (2*n+1)=0) # G. C. Greubel, May 18 2019
-
Magma
[n: n in [1..1000] | (Factorial(n)+1) mod (2*n+1) eq 0 ]; // G. C. Greubel, May 18 2019
-
Maple
A053662:=n->`if`(n!+1 mod (2*n+1) = 0, n, NULL): seq(A053662(n), n=1..1000); # Wesley Ivan Hurt, Dec 01 2015
-
Mathematica
Drop[Union[Table[If[IntegerQ[(n!+1)/(2n+1)], n], {n, 1, 1000}]], -1] (* Ed Pegg Jr, Dec 05 2001 *) Select[Range[1000], Mod[#! +1, 2*# +1] == 0 &] (* G. C. Greubel, May 18 2019 *)
-
PARI
for(n=1,10^3, if((n!+1)%(2*n+1)==0, print1(n,", ")) ) \\ G. C. Greubel, May 18 2019
-
Sage
[n for n in (1..1000) if Mod(factorial(n)+1, 2*n+1)==0 ] # G. C. Greubel, May 18 2019
Formula
a(n) >> n log n. - Charles R Greathouse IV, Apr 16 2024
Comments