cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A175624 a(n) = n! modulo n*(n+1)*(n+2)/3.

Original entry on oeis.org

1, 2, 6, 24, 50, 48, 0, 0, 210, 120, 352, 168, 0, 0, 800, 288, 1122, 360, 0, 0, 2002, 528, 0, 0, 0, 0, 4032, 840, 4930, 960, 0, 0, 0, 0, 8400, 1368, 0, 0, 11440, 1680, 13202, 1848, 0, 0, 17250, 2208, 0, 0, 0, 0, 24752, 2808, 0, 0, 0, 0, 34162, 3480, 37760, 3720, 0, 0, 0, 0
Offset: 1

Views

Author

John W. Layman, Jul 27 2010

Keywords

Comments

It appears that a(1)=1, a(2)=2, a(3)=6, and, for n>3, a(n) = n*(n+2) if n+1 is prime, else a(n) = n*(n+1)*(n+5)/6 if n+2 is prime, else a(n)=0. This has been verified for n up to 1000.

Crossrefs

Programs

  • Magma
    [Factorial(n) mod (2*Binomial(n+2,3)): n in [1..80]]; // G. C. Greubel, Apr 12 2024
    
  • Mathematica
    Table[Mod[(n!), (n^3 + 3 n^2 + 2 n)/3], {n, 100}] (* Vincenzo Librandi, Jul 10 2014 *)
  • PARI
    a(n) = n! % (n*(n+1)*(n+2)/3); \\ Michel Marcus, Jul 09 2014
    
  • SageMath
    [factorial(n)%(2*binomial(n+2,3)) for n in range(1,81)] # G. C. Greubel, Apr 12 2024
Showing 1-1 of 1 results.