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!)
A226718 n! mod tetrahedral(n), that is A000142(n) mod A000292(n). 2
0, 2, 6, 4, 15, 48, 0, 0, 45, 120, 66, 168, 0, 0, 120, 288, 153, 360, 0, 0, 231, 528, 0, 0, 0, 0, 378, 840, 435, 960, 0, 0, 0, 0, 630, 1368, 0, 0, 780, 1680, 861, 1848, 0, 0, 1035, 2208, 0, 0, 0, 0, 1326, 2808, 0, 0, 0, 0, 1653, 3480, 1770, 3720, 0, 0, 0, 0, 2145, 4488 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = n! mod (n*(n+1)*(n+2)/6).
For n>4: if neither n+1 nor n+2 is prime, then a(n)=0. Otherwise, a(n)=n(n+1)/2 for odd n and a(n)=n(n+2) for even n. - Ivan Neretin, May 18 2015
MAPLE
A226718 := proc(n)
n! mod ( n*(n+1)*(n+2)/6) ;
end proc: # R. J. Mathar, Jun 18 2013
MATHEMATICA
Table[Mod[n!, n (n + 1) (n + 2)/6], {n, 66}] (* Ivan Neretin, May 18 2015 *)
PROG
(Python)
f = 1
for i in range(1, 100):
f *= i
print str(f % (i*(i+1)*(i+2)/6))+', ',
CROSSREFS
Sequence in context: A130190 A110346 A095754 * A181159 A127320 A098917
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Jun 15 2013
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 16 17:36 EDT 2024. Contains 371749 sequences. (Running on oeis4.)