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.

A119690 n! mod n*(n+1)/2.

This page as a plain text file.
%I A119690 #16 Sep 08 2022 08:45:25
%S A119690 0,2,0,4,0,6,0,0,0,10,0,12,0,0,0,16,0,18,0,0,0,22,0,0,0,0,0,28,0,30,0,
%T A119690 0,0,0,0,36,0,0,0,40,0,42,0,0,0,46,0,0,0,0,0,52,0,0,0,0,0,58,0,60,0,0,
%U A119690 0,0,0,66,0,0,0,70,0,72,0,0,0,0,0,78,0,0,0,82,0,0,0,0,0,88,0,0,0,0,0,0
%N A119690 n! mod n*(n+1)/2.
%C A119690 All terms are even.
%C A119690 It appears that f(n)=(n!)^(2k+1) modulo n(n+1)/2 is n if n is one less than an odd prime, else f(n) is 0, for any integer k. See A175567 for related results involving an even power of n!. - _John W. Layman_, Jul 12 2010
%F A119690 a(n) = n if n+1 is an odd prime, a(n) = 0 otherwise.
%p A119690 P:=proc(n) local i, j, k; j:=1; k:=0; for i from 1 by 1 to n do j:=j*i; k:=k+i; print(j mod k); od; end: P(100);
%o A119690 (Magma) [ Factorial(n) mod (n*(n+1) div 2): n in [1..100] ];
%Y A119690 Cf. A006093, A010051, A175567, A175553.
%K A119690 easy,nonn
%O A119690 1,2
%A A119690 _Paolo P. Lava_ and _Giorgio Balzarotti_, Jun 09 2006