|
Search: id:A055976
|
|
|
| A055976 |
|
Remainder when (n-1)! + 1 is divided by n. |
|
+0 2
|
|
| 0, 0, 0, 3, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1
(list; graph; listen)
|
|
|
OFFSET
|
1,4
|
|
|
COMMENT
|
Related to Wilson's theorem. a(n) = 0 iff n = 1 or a prime; a(n) = 1 iff n 4 is composite > 4; a(n) = 3 iff n = 4.
|
|
REFERENCES
|
Albert H. Beiler, Recreations in The Theory of Numbers, The Queen of Mathematics Entertains, Second Edition, Dover Publications, Inc., New York, 1966, Page 50.
|
|
MATHEMATICA
|
Do[Print[Mod[(n-1)!+1, n]], {n, 1, 100}]
|
|
CROSSREFS
|
Sequence in context: A140807 A091959 A046094 this_sequence A093684 A101270 A155522
Adjacent sequences: A055973 A055974 A055975 this_sequence A055977 A055978 A055979
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Robert G. Wilson v (rgwv(AT)rgwv.com), Jul 23 2000
|
|
|
Search completed in 0.002 seconds
|