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-5 of 5 results.

A175567 (n!)^2 modulo n(n+1)/2.

Original entry on oeis.org

0, 1, 0, 6, 0, 15, 0, 0, 0, 45, 0, 66, 0, 0, 0, 120, 0, 153, 0, 0, 0, 231, 0, 0, 0, 0, 0, 378, 0, 435, 0, 0, 0, 0, 0, 630, 0, 0, 0, 780, 0, 861, 0, 0, 0, 1035, 0, 0, 0, 0, 0, 1326, 0, 0, 0, 0, 0, 1653, 0, 1770, 0, 0, 0, 0, 0, 2145, 0, 0, 0, 2415, 0, 2556, 0, 0, 0, 0, 0, 3003, 0, 0, 0, 3321
Offset: 1

Views

Author

John W. Layman, Jul 12 2010

Keywords

Comments

It appears that if n is one less than an odd prime then (n!)^2 modulo n(n+1)/2 is n(n-1)/2 else 0. This result appears to hold for any even power of n!. See A119690 for similar results related to odd powers of n!.

Crossrefs

Programs

  • Mathematica
    Table[Mod[(n!)^2, (n^2 + n)/2], {n, 100}] (* Vincenzo Librandi, Jul 10 2014 *)
    Table[PowerMod[n!,2,(n(n+1))/2],{n,100}] (* Harvey P. Dale, Aug 27 2016 *)
  • PARI
    a(n) = (n!)^2 % (n*(n+1)/2); \\ Michel Marcus, Jul 09 2014

A226718 n! mod tetrahedral(n), that is A000142(n) mod A000292(n).

Original entry on oeis.org

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
Offset: 1

Views

Author

Alex Ratushnyak, Jun 15 2013

Keywords

Crossrefs

Programs

  • 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 *)
  • Python
    f = 1
    for i in range(1, 100):
        f *= i
        print(f % (i*(i+1)*(i+2)//6), end=', ')

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

A120387 c(n) mod b(n) where c(n) = (n-1)! and b(n) = Sum_{i=1..n} i.

Original entry on oeis.org

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
Offset: 1

Views

Author

Paolo P. Lava, Jun 30 2006

Keywords

Examples

			a(5) = (5-1)! mod (1+2+3+4+5) = 24 mod 15 = 9.
		

Crossrefs

Programs

  • 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);

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

A166260 a(n) = A089026(n) - 1.

Original entry on oeis.org

0, 1, 2, 0, 4, 0, 6, 0, 0, 0, 10, 0, 12, 0, 0, 0, 16, 0, 18, 0, 0, 0, 22, 0, 0, 0, 0, 0, 28, 0, 30, 0, 0, 0, 0, 0, 36, 0, 0, 0, 40, 0, 42, 0, 0, 0, 46, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 58, 0, 60, 0, 0, 0, 0, 0, 66, 0, 0, 0, 70, 0, 72, 0, 0, 0, 0, 0, 78, 0, 0, 0, 82, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Mats Granvik, Oct 10 2009

Keywords

Comments

Same as A061006 except for a(4) = 0 (Wilson's Theorem). - Georg Fischer, Oct 12 2018

Crossrefs

Cf. A119690. - R. J. Mathar, Oct 16 2009

Programs

  • PARI
    a(n) = if (isprime(n), n-1, 0); \\ Michel Marcus, Oct 12 2018

Formula

a(n) = (n-1) * A010051(n). - Wesley Ivan Hurt, Oct 12 2018

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-5 of 5 results.