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.

A216369 a(n) = !(n-1) mod n.

This page as a plain text file.
%I A216369 #10 Feb 15 2017 09:41:00
%S A216369 0,0,1,2,4,2,6,6,1,6,1,2,10,8,4,6,13,8,9,6,13,10,21,14,14,16,10,22,17,
%T A216369 26,2,6,1,4,34,26,5,10,10,6,4,8,16,10,19,2,18,38,48,36,13,42,13,44,34,
%U A216369 22,28,12,28,26,22,60,55,38,49,32,65,38,67,36,68,62
%N A216369 a(n) = !(n-1) mod n.
%C A216369 !n is a subfactorial number (A000166).
%H A216369 Indranil Ghosh, <a href="/A216369/b216369.txt">Table of n, a(n) for n = 1..10000</a>
%e A216369 a(7)=6 because !(7-1) = 265, and 265 == 6 mod 7.
%p A216369 with(numtheory): f:=n->sum(n!*(((-1)^k)*1/k!), k=0..n):for n from 1 to 150 do:  x:=irem(f(n-1),n): printf(`%d, `, x):od:
%Y A216369 Cf. A000166, A124625.
%K A216369 nonn
%O A216369 1,4
%A A216369 _Michel Lagneau_, Sep 05 2012