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.

A126868 a(n) = (n+1)!! mod n.

This page as a plain text file.
%I A126868 #12 Dec 28 2024 00:07:01
%S A126868 0,1,2,3,3,3,6,1,6,5,1,3,8,7,0,1,13,9,1,15,0,11,1,9,0,13,0,7,17,15,1,
%T A126868 1,0,17,0,27,6,19,0,25,9,21,1,11,0,23,46,33,0,25,0,39,30,27,0,49,0,29,
%U A126868 58,15,50,31,0,1,0,33,1,51,0,35,1,9,27,37,0,19,0,39,78,65,0,41,82,63,0,43
%N A126868 a(n) = (n+1)!! mod n.
%H A126868 James C. McMahon, <a href="/A126868/b126868.txt">Table of n, a(n) for n = 1..10000</a>
%e A126868 n=3 (n+1)!! = 4!! = 8; (8 mod 3) = 2.
%e A126868 n=4 (n+1)!! = 5!! = 15; (15 mod 4) = 3.
%p A126868 P:=proc(n) local i,j,k,w; for i from 1 by 1 to n do k:=i+1; w:=i-1; while w>0 do k:=k*w; w:=w-2; od; j:=(k mod i); print(j); od; end: P(100);
%t A126868 Table[Mod[(n+1)!!,n],{n,86}] (* _James C. McMahon_, Dec 27 2024 *)
%o A126868 (PARI) df(n) = prod(i=0, (n-1)\2, n - 2*i );
%o A126868 a(n) = df(n+1) % n; \\ _Michel Marcus_, Aug 22 2016
%Y A126868 Cf. A006882, A000165, A001147, A119688.
%K A126868 easy,nonn
%O A126868 1,3
%A A126868 _Paolo P. Lava_ and _Giorgio Balzarotti_, Mar 16 2007