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

A064546 Remainder when (n!)^2 is divided by n^n.

Original entry on oeis.org

0, 0, 9, 64, 1900, 5184, 695310, 15089664, 346348629, 8189440000, 170553548176, 4519967588352, 202522159449675, 8500218417954816, 265594041953296875, 3543051899458551808, 454740628232312103872, 5853583711033675481088, 1445271811400044958489895, 91546885417441689600000000
Offset: 1

Views

Author

Floor van Lamoen, Oct 09 2001

Keywords

Examples

			a(5) = 1900 because (5!)^2 = 14400 = 1900 (mod 5^5 = 3125).
		

Crossrefs

Programs

  • Mathematica
    A064546[n_] := PowerMod[n!, 2, n^n];
    Array[A064546, 20] (* Paolo Xausa, Aug 05 2025 *)
  • PARI
    { for (n=1, 100, write("b064546.txt", n, " ", (n!)^2 % n^n) ) } \\ Harry J. Smith, Sep 18 2009

Formula

a(n) = (n!)^2 mod n^n.

A215460 a(n) = floor(n!^2 / n^n).

Original entry on oeis.org

1, 1, 1, 2, 4, 11, 30, 96, 339, 1316, 5584, 25733, 128025, 683949, 3905083, 23731187, 152934464, 1041782238, 7479469995, 56448098958, 446768591341, 3700276748921, 32007269639380, 288630046441757, 2708888570942365, 26419890078249485, 267389254029561667, 2804508541393392135, 30446382653772707171, 341729529206733994569
Offset: 1

Views

Author

Alex Ratushnyak, Aug 11 2012

Keywords

Examples

			a(4) = floor((4!)^2 / (4^4)) = floor(24^2 / 256) = floor(2.25) = 2.
		

Crossrefs

Programs

  • Mathematica
    A215460[n_] := Quotient[n!^2, n^n];
    Array[A215460, 30] (* Paolo Xausa, Aug 05 2025 *)
  • Python
    f = 1
    for n in range(1,33):
        print(f*f // n**n)
        f *= n+1

Extensions

More terms from Paolo Xausa, Aug 05 2025

A211341 a(n) = (n^n mod n!)/n.

Original entry on oeis.org

0, 0, 1, 4, 1, 96, 289, 512, 25281, 265600, 2391001, 36972288, 405301681, 21023744, 54720993825, 1244339070976, 13293650868481, 324381631315968, 2266027617084841, 14819020931072000, 896776708870156401
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A063709.

Programs

  • Mathematica
    Table[Mod[n^n, n!]/n, {n,50}] (* G. C. Greubel, Feb 25 2017 *)

Formula

a(n) = A063709(n)/n. - Michel Marcus, Feb 25 2017
Showing 1-3 of 3 results.