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.

A293246 a(n) is the smallest k > 1 such that A000166(k) is divisible by n!.

This page as a plain text file.
%I A293246 #23 May 20 2019 10:09:23
%S A293246 2,2,3,7,25,121,241,1681,13441,40321,403201,2016001,3225601,41932801,
%T A293246 609638401
%N A293246 a(n) is the smallest k > 1 such that A000166(k) is divisible by n!.
%C A293246 a(n) is the smallest k > 1 such that round(k!/e) is divisible by n!.
%C A293246 Terms are 0! + 1, 1! + 1, 2! + 1, 3! + 1, 4! + 1, 5! + 1, 6!/3 + 1, 7!/3 + 1, ...
%e A293246 a(3) = 7 because the smallest nonzero subfactorial number that is divisible by 3! is A000166(7) = 1854.
%p A293246 f:= proc(n) local k, t, p;
%p A293246 p:= n!;
%p A293246 t:= 0;
%p A293246 for k from 2 do
%p A293246   t:= k*t + (-1)^k mod p;
%p A293246   if t = 0 then return k fi
%p A293246 od:
%p A293246 end proc:
%p A293246 seq(f(n),n=0..13); # _Robert Israel_, Oct 03 2017
%Y A293246 Cf. A000142, A000166.
%K A293246 nonn,more
%O A293246 0,1
%A A293246 _Altug Alkan_, Oct 03 2017
%E A293246 a(8)-a(14) from _Robert Israel_, Oct 03 2017