The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A210253 Number of distinct residues of all factorials mod 2^n. 2
1, 2, 3, 4, 5, 6, 8, 8, 9, 10, 11, 13, 14, 16, 16, 16, 17, 18, 19, 20, 22, 24, 24, 25, 26, 27, 29, 30, 32, 32, 32, 32, 33, 34, 35, 36, 37, 40, 40, 41, 42, 43, 45, 46, 48, 48, 48, 49, 50, 51, 52, 54, 56, 56, 57, 58, 59, 61, 62, 64, 64, 64, 64, 64, 65, 66, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Theorem. For n>=1, a(n) = A007843(n) - A210255(n).
LINKS
EXAMPLE
Let n=2. We have modulo 4: 0!=1!==1, 2!==3!==2, for n>=4, n!==0. Thus the distinct residues are 0,1,2. Therefore, a(2) = 3.
MAPLE
a:= proc(n) local p, m, i, s;
p:= 2^n;
m:= 1;
s:= {};
for i to p while m<>0 do m:= m*i mod p; s:=s union {m} od;
nops(s)
end:
seq(a(n), n=0..100); # Alois P. Heinz, Mar 20 2012
MATHEMATICA
a[n_] := Module[{p = 2^n, m = 1, i, s = {}}, For[i = 1, i <= p && m != 0, i++, m = Mod[m i, p]; s = Union[s, {m}]]; Length[s]];
a /@ Range[0, 100] (* Jean-François Alcover, Nov 12 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A145518 A256221 A359099 * A130916 A003965 A351988
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Mar 19 2012
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 May 23 06:14 EDT 2024. Contains 372760 sequences. (Running on oeis4.)