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 A049782 #90 Aug 27 2023 19:25:43 %S A049782 0,0,1,2,4,4,6,2,1,4,1,10,10,6,4,10,13,10,9,14,13,12,21,10,14,10,10,6, %T A049782 17,4,2,26,1,30,34,10,5,28,10,34,4,34,16,34,19,44,18,10,48,14,13,10, %U A049782 13,10,34,34,28,46,28,34,22,2,55,26,49,34,65,30,67,34,68,10,55,42,64,66,34 %N A049782 a(n) = (0! + 1! + ... + (n-1)!) mod n. %C A049782 Kurepa's conjecture is that gcd(!n,n!) = 2, n > 1. It is easy to prove that this is equivalent to showing that gcd(p,!p) = 1 for all odd primes p. In Guy, 2nd edition, it is stated that Mijajlovic has tested up to p = 10^6. Subsequently Gallot tested up to 2^26. I have continued up to just above p = 2^27, in fact to p < 144000000. There were no examples found where gcd(p,!p) > 1. - Paul Jobling, Dec 02 2004 %C A049782 According to Kellner, the conjecture has been proved by Barsky and Benzaghou. - _T. D. Noe_, Dec 02 2004 %C A049782 Barsky and Benzaghou withdrew their proof in 2011. I've extended the search up to 10^9; no counterexample was found. - _Milos Tatarevic_, Feb 01 2013 %D A049782 R. K. Guy, Unsolved Problems in Number Theory, B44: is a(n) > 0 for n > 2? %H A049782 T. D. Noe, <a href="/A049782/b049782.txt">Table of n, a(n) for n = 1..10000</a> %H A049782 Romeo Mestrovic, <a href="https://doi.org/10.2298/FIL1510207M">The Kurepa-Vandermonde matrices arising from Kurepa's left factorial hypothesis</a>, Filomat 29:10 (2015), 2207-2215. DOI:10.2298/FIL1510207M %H A049782 Vladica Andrejic, Milos Tatarevic, <a href="http://arxiv.org/abs/1409.0800">Searching for a counterexample of Kurepa's Conjecture</a>, arXiv:1409.0800 [math.NT], 2014. %H A049782 D. Barsky and B. Benzaghou, <a href="http://dx.doi.org/10.5802/jtnb.432">Nombres de Bell et somme de factorielles</a>, Journal de Théorie des Nombres de Bordeaux, 16:1, No. 17, 2004. %H A049782 D. Barsky and B. Benzaghou, <a href="http://dx.doi.org/10.5802/jtnb.775">Erratum à l'article "Nombres de Bell et somme de factorielles"</a>, Journal de Théorie des Nombres de Bordeaux, 23:2 (2011), p. 527. %H A049782 Y. Gallot, <a href="http://yves.gallot.pagesperso-orange.fr/papers/lfact.pdf">More information</a>. %H A049782 Bernd C. Kellner, <a href="https://arxiv.org/abs/math/0410477">Some remarks on Kurepa's left factorial</a>, arXiv:math/0410477 [math.NT], 2004. %H A049782 Romeo Mestrovic, <a href="http://arxiv.org/abs/1312.7037">Variations of Kurepa's left factorial hypothesis</a>, arXiv preprint arXiv:1312.7037 [math.NT], 2013-2014. %H A049782 Stephen A. Silver, <a href="https://web.archive.org/web/20150315105524/http://www.argentum.freeserve.co.uk/maths/a049782.c">C program to generate this sequence</a>. %H A049782 M. Tatarevic, <a href="http://mtatar.wordpress.com/2011/07/30/kurepa/">Searching for a counterexample to the Kurepa's left factorial hypothesis (p < 10^9)</a>. %F A049782 a(n) = A003422(n) mod n = !n mod n. - _G. C. Greubel_, Dec 11 2019 %p A049782 a:= proc(n) local c, i, t; c, t:=1, 1; %p A049782 for i to n-1 do t:= (t*i) mod n; c:= c+t od; c mod n %p A049782 end: %p A049782 seq(a(n), n=1..100); # _Alois P. Heinz_, Feb 16 2013 %t A049782 Table[Mod[Sum[ i!, {i, 0, n-1}], n], {n, 80}] %t A049782 nn=80; With[{fcts=Accumulate[Range[0,nn]!]},Flatten[Table[Mod[Take[fcts,{n}], n], {n,nn}]]] (* _Harvey P. Dale_, Sep 22 2011 *) %o A049782 (Haskell) %o A049782 a049782 :: Int -> Integer %o A049782 a049782 n = (sum $ take n a000142_list) `mod` (fromIntegral n) %o A049782 -- _Reinhard Zumkeller_, Nov 02 2011 %o A049782 (PARI) a(n)=my(s=1,f=1); for(k=1,n, f=f*k%n; s+=f); s%n \\ _Charles R Greathouse IV_, Feb 07 2017 %o A049782 (Magma) [&+[Factorial(k-1): k in [1..n]] mod (n): n in [1..80]]; // _Vincenzo Librandi_, May 31 2019 %o A049782 (Sage) [mod(sum(factorial(k) for k in (0..n-1)), n) for n in (1..80)] # _G. C. Greubel_, Dec 11 2019 %o A049782 (GAP) List([1..80], n-> Sum([0..n-1], k-> Factorial(k)) mod n ); # _G. C. Greubel_, Dec 11 2019 %Y A049782 Cf. A000142, A057245. %Y A049782 Note that in the context of this sequence, !n is the left factorial A003422 not the subfactorial A000166. %K A049782 nonn,easy,nice %O A049782 1,4 %A A049782 _Clark Kimberling_ %E A049782 More terms from _Erich Friedman_, who observes that the first 500 terms are nonzero. Independently extended by _Stephen A. Silver_.