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!)
A120387 c(n) mod b(n) where c(n) = (n-1)! and b(n) = Sum_{i=1..n} i. 1
0, 1, 2, 6, 9, 15, 20, 0, 0, 45, 54, 66, 77, 0, 0, 120, 135, 153, 170, 0, 0, 231, 252, 0, 0, 0, 0, 378, 405, 435, 464, 0, 0, 0, 0, 630, 665, 0, 0, 780, 819, 861, 902, 0, 0, 1035, 1080, 0, 0, 0, 0, 1326, 1377, 0, 0, 0, 0, 1653, 1710, 1770, 1829, 0, 0, 0, 0, 2145, 2210, 0, 0, 2415 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
For n>1: if neither n nor n+1 is prime, then a(n)=0. Otherwise, a(n)=n(n-1)/2 - 1 for odd n and a(n)=n(n-1)/2 for even n. - Ivan Neretin, May 29 2015
EXAMPLE
a(5) = (5-1)! mod (1+2+3+4+5) = 24 mod 15 = 9.
MAPLE
P:=proc(n) local i, k; for i from 1 by 1 to n do print((i-1)! mod sum('k', 'k'=0..i)); od; end: P(100);
CROSSREFS
Sequence in context: A363373 A353083 A049634 * A325761 A176039 A260699
KEYWORD
easy,nonn
AUTHOR
Paolo P. Lava, Jun 30 2006
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 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)