login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135996 Difference between 2^n and the largest factorial <= 2^n. 2
0, 0, 2, 2, 10, 8, 40, 8, 136, 392, 304, 1328, 3376, 3152, 11344, 27728, 25216, 90752, 221824, 161408, 685696, 1734272, 565504, 4759808, 13148416, 29925632, 27192064, 94300928, 228518656, 57869312, 594740224, 1668482048, 3815965696, 2362913792 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = 2^n - A048764(2^n). - R. J. Mathar, Mar 16 2008
EXAMPLE
a(6) = 2^6 - 4! = 40
a(7) = 2^7 - 5! = 8
a(8) = 2^8 - 5! = 136
MAPLE
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
MATHEMATICA
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 *)
CROSSREFS
Cf. A000142.
Sequence in context: A293060 A293061 A129898 * A141610 A019241 A168295
KEYWORD
easy,nonn
AUTHOR
Ctibor O. Zizka, Mar 03 2008, Mar 16 2008
EXTENSIONS
More terms from R. J. Mathar, Mar 16 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:58 EDT 2024. Contains 371798 sequences. (Running on oeis4.)