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.

A135996 Difference between 2^n and the largest factorial <= 2^n.

This page as a plain text file.
%I A135996 #7 Sep 18 2015 04:09:08
%S A135996 0,0,2,2,10,8,40,8,136,392,304,1328,3376,3152,11344,27728,25216,90752,
%T A135996 221824,161408,685696,1734272,565504,4759808,13148416,29925632,
%U A135996 27192064,94300928,228518656,57869312,594740224,1668482048,3815965696,2362913792
%N A135996 Difference between 2^n and the largest factorial <= 2^n.
%F A135996 a(n) = 2^n - A048764(2^n). - _R. J. Mathar_, Mar 16 2008
%e A135996 a(6) = 2^6 - 4! = 40
%e A135996 a(7) = 2^7 - 5! = 8
%e A135996 a(8) = 2^8 - 5! = 136
%p A135996 A048764 := proc(n) local a; for a from 1 do if a! > n then RETURN((a-1)!); fi ; od: end: A135996 := proc(n) 2^n-A048764(2^n) ; end: seq(A135996(n),n=0..60) ; # _R. J. Mathar_, Mar 16 2008
%t A135996 d2n[n_]:=Module[{n2=2^n,fcts=Reverse[Range[100]!]},n2-Select[fcts,#<= n2&,1]]; Flatten[Array[d2n,40,0]] (* _Harvey P. Dale_, Aug 22 2012 *)
%Y A135996 Cf. A000142.
%K A135996 easy,nonn
%O A135996 0,3
%A A135996 _Ctibor O. Zizka_, Mar 03 2008, Mar 16 2008
%E A135996 More terms from _R. J. Mathar_, Mar 16 2008