login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Ivan Neretin, Table of n, a(n) for n = 1..10000

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

Cf. A000142, A000292, A119690.

Sequence in context: A130190 A110346 A095754 * A181159 A127320 A098917

Adjacent sequences:  A226715 A226716 A226717 * A226719 A226720 A226721

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 30 12:10 EDT 2020. Contains 333125 sequences. (Running on oeis4.)