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-10 of 11 results. Next

A282706 Smallest prime factor of A020549(n) = (n!)^2 + 1.

Original entry on oeis.org

2, 2, 5, 37, 577, 14401, 13, 101, 17, 131681894401, 13168189440001, 1593350922240001, 101, 38775788043632640001, 29, 1344169, 149, 9049, 37, 710341, 41, 61, 337, 509, 384956219213331276939737002152967117209600000001, 941
Offset: 0

Views

Author

N. J. A. Sloane, Feb 26 2017

Keywords

Comments

By construction, for n >= 2, a(n) == 1 (mod 4) and a(n) > n.
From Robert Israel, Mar 08 2017: (Start)
a(n) = A020549(n) for n in A046029.
a(n) <= 2*n+1 if n is in A104636.
The first member of A104636 for which a(n) < 2*n+1 is 48.
a(a(n)-n-1) = a(n). (End)

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 147.

Crossrefs

Programs

  • Magma
    [2] cat [Min(PrimeFactors(Factorial(n)^2 + 1)):n in[1..25]]; // Vincenzo Librandi, Feb 28 2017
  • Maple
    f:= proc(n) local a;
      a:= min(map(proc(t) if t[1]::integer then t[1] fi end proc, ifactors((n!)^2+1,easy)[2]));
    if a = infinity then
       a:= traperror(timelimit(60, min(map(t -> t[1], ifactors((n!)^2+1)[2]))));
    fi;
      a
    end proc:
    map(f, [$0..36]); # Robert Israel, Mar 08 2017
  • Mathematica
    Join[{2}, Array[FactorInteger[(#!)^2 + 1][[1, 1]]&, {25}]] (* Vincenzo Librandi, Feb 28 2017 *)

Extensions

More terms from Vincenzo Librandi, Feb 28 2017

A083340 Numbers n such that A020549(n)=(n!)^2+1 is a semiprime.

Original entry on oeis.org

6, 7, 8, 12, 15, 16, 17, 18, 19, 28, 29, 41, 45, 53, 55, 61, 73
Offset: 1

Views

Author

Hugo Pfoertner, Apr 24 2003

Keywords

Comments

The smaller of the two prime factors is given in A083341. The next candidates for a continuation are 55 and 61. (55!)^2 + 1 is composite with 147 decimal digits and unknown factorization.
(55!)^2 + 1 has been factored using ECM into P52*P96 with P52 = A083341(15). (61!)^2 + 1 is composite with 168 decimal digits. - Hugo Pfoertner, Jul 13 2019
Using CADO-NFS, (61!)^2 + 1 has been factored into P58*P110 with P58 = A282706(61) in 17 days wall clock time using 56 million CPU seconds. a(18) >= 75. - Hugo Pfoertner, Aug 04 2019

Examples

			a(1)=6 because (6!)^2+1=518401=13*39877 is a semiprime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[60],PrimeOmega[(#!)^2+1]==2&] (* Harvey P. Dale, Dec 12 2018 *)

Extensions

a(15) from Hugo Pfoertner, Jul 13 2019
a(16), a(17) from Hugo Pfoertner, Aug 04 2019

A301346 Largest prime factor of A020549(n) = (n!)^2 + 1.

Original entry on oeis.org

2, 2, 5, 37, 577, 14401, 39877, 251501, 95629553, 131681894401, 13168189440001, 1593350922240001, 2271708245569901, 38775788043632640001, 2404319663572286441, 1272170577304043929, 2938007628841577533852349, 13980942259426143240713449, 1107848353183710355135404972973, 20831587158104092560535861261
Offset: 0

Views

Author

Seiichi Manyama, Mar 19 2018

Keywords

Comments

a(n) = A020549(n) for n in A046029.

Crossrefs

Programs

  • Maple
    a:= n-> max(numtheory[factorset](n!^2+1)):
    seq(a(n), n=0..20);  # Alois P. Heinz, Mar 19 2018
  • PARI
    a(n) = vecmax(factor(n!^2 + 1)[,1]); \\ Daniel Suteu, Jun 10 2022

Formula

a(n) = A006530(A020549(n)). - Altug Alkan, Mar 19 2018

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

Original entry on oeis.org

1, 1, 4, 36, 576, 14400, 518400, 25401600, 1625702400, 131681894400, 13168189440000, 1593350922240000, 229442532802560000, 38775788043632640000, 7600054456551997440000, 1710012252724199424000000, 437763136697395052544000000, 126513546505547170185216000000
Offset: 0

Views

Author

Keywords

Comments

Let M_n be the symmetrical n X n matrix M_n(i,j) = 1/Max(i,j); then for n > 0 det(M_n)=1/a(n). - Benoit Cloitre, Apr 27 2002
The n-th entry of the sequence is the value of the permanent of a k X k matrix A defined as follows: k is the n-th odd number; if we concatenate the rows of A to form a vector v of length n^2, v_{i}=1 if i=1 or a multiple of 2. - Simone Severini, Feb 15 2006
a(n) = number of set partitions of {1,2,...,3n-1,3n} into blocks of size 3 in which the entries of each block mod 3 are distinct. For example, a(2) = 4 counts 123-456, 156-234, 126-345, 135-246. - David Callan, Mar 30 2007
From Emeric Deutsch, Nov 22 2007: (Start)
Number of permutations of {1,2,...,2n} with no even entry followed by a smaller entry. Example: a(2)=4 because we have 1234, 1324, 3124 and 2314.
Number of permutations of {1,2,...,2n} with n even entries that are followed by a smaller entry. Example: a(2)=4 because we have 2143, 3421, 4213 and 4321.
Number of permutations of {1,2,...,2n-1} with no even entry followed by a smaller entry. Example: a(2)=4 because we have 123, 132, 312 and 231.
Number of permutations of {1,2,...,2n-1} with n-1 odd entries followed by a smaller entry. Example: a(2)=4 because we have 132, 312, 231 and 321.
(End)
G. Leibniz in his "Ars Combinatoria" established the identity P(n)^2 = P(n-1)[P(n+1)-P(n)], where P(n) = n!. (For example, see the Burton reference.) - Mohammad K. Azarian, Mar 28 2008
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = sigma_2(gcd(i,j)) for 1 <= i,j <= n, and n>0, where sigma_2 is A001157. - Enrique Pérez Herrero, Aug 13 2011
The o.g.f. of 1/a(n) is BesselI(0,2*sqrt(x)). See Abramowitz-Stegun (reference and link under A008277), p. 375, 9.6.10. - Wolfdieter Lang, Jan 09 2012
Number of n x n x n cubes C of zeros and ones such that C(x,y,z) and C(u,v,w) can be nonzero simultaneously only if either x!=u, y!=v, or z!=w. This generalizes permutations which can be considered as n x n squares P of zeros and ones such that P(x,y) and P(u,v) can be nonzero simultaneously only if either x!=u or y!=v. - Joerg Arndt, May 28 2012
a(n) is the number of functions f:[n]->[n(n+1)/2] such that, if round(sqrt(2f(x))) = round(sqrt(2f(y))), then x=y. - Dennis P. Walsh, Nov 26 2012
From Jerrold Grossman, Jul 22 2018: (Start)
a(n) is the number of n X n 0-1 matrices whose row sums and column sums are both {1,2,...,n}.
a(n) is the number of linear arrangements of 2n blocks of n different colors, 2 of each color, such that there are an even number of blocks between each pair of blocks of the same color.
(End)
Number of ways to place n instances of a digit inside an n X n X n cube so that no two instances lie on a plane parallel to a face of the cube (see Khovanova link, Lemma 6, p. 22). - Tanya Khovanova and Wayne Zhao, Oct 17 2018
Number of permutations P of length 2n which maximize Sum_{i=1..2n} |P_i - i|. - Fang Lixing, Dec 07 2018

Examples

			Consider the square array
  1,  2,  3,  4,  5,  6, ...
  2,  4,  6,  8, 10, 12, ...
  3,  6,  9, 12, 15, 18, ...
  4,  8, 12, 16, 20, 24, ...
  5, 10, 15, 20, 25, 30, ...
  ...
then a(n) = product of n-th antidiagonal. - _Amarnath Murthy_, Apr 06 2003
a(3) = 36 since there are 36 functions f:[3]->[6] such that, if round(sqrt(2f(x))) = round(sqrt(2f(y))), then x=y. The functions, denoted by <f(1),f(2),f(3)>, are <1,2,4>, <1,2,5>, <1,2,6>, <1,3,4>, <1,3,5>, <1,3,6> and their respective permutations. - _Dennis P. Walsh_, Nov 26 2012
1 + x + 4*x^2 + 36*x^3 + 576*x^4 + 14400*x^5 + 518400*x^6 + ...
		

References

  • Archimedeans Problems Drive, Eureka, 22 (1959), 15.
  • David Burton, "The History of Mathematics", Sixth Edition, Problem 2, p. 433.
  • J. Dezert, editor, Smarandacheials, Mathematics Magazine, Aurora, Canada, No. 4/2004 (to appear).
  • S. M. Kerawala, The enumeration of the Latin rectangle of depth three by means of a difference equation, Bull. Calcutta Math. Soc., 33 (1941), 119-127.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • F. Smarandache, Back and Forth Factorials, Arizona State Univ., Special Collections, 1972.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.62(b).

Crossrefs

First right-hand column of triangle A008955.
Row n=2 of A225816.
Cf. A000290.
With signs, a row of A288580.

Programs

  • GAP
    List([0..20],n->Factorial(n)^2); # Muniru A Asiru, Oct 24 2018
    
  • Haskell
    import Data.List (genericIndex)
    a001044 n = genericIndex a001044_list n
    a001044_list = 1 : zipWith (*) (tail a000290_list) a001044_list
    -- Reinhard Zumkeller, Sep 05 2015
    
  • Magma
    [Factorial(n)^2: n in [0..20]]; // Vincenzo Librandi, Oct 24 2018
    
  • Maple
    seq((n!)^2,n=0..20); # Dennis P. Walsh, Nov 26 2012
  • Mathematica
    Table[n!^2, {n, 0, 20}] (* Stefan Steinerberger, Apr 07 2006 *)
    Join[{1},Table[Det[DiagonalMatrix[Range[n]^2]],{n,20}]] (* Harvey P. Dale, Mar 31 2020 *)
  • PARI
    a(n)=n!^2 \\ Charles R Greathouse IV, Jun 15 2011
    
  • Python
    import math
    for n in range(0,20): print(math.factorial(n)**2, end=', ') # Stefano Spezia, Oct 29 2018

Formula

a(n) = Integral_{x>=0} 2*BesselK(0, 2*sqrt(x))*x^n. This integral represents the n-th moment of a positive function defined on the positive half-axis. - Karol A. Penson, Oct 09 2001
a(n) ~ 2*Pi*n*e^(-2*n)*n^(2*n). - Joe Keane (jgk(AT)jgk.org), Jun 07 2002
a(n) = polygorial(n, 4) = A000142(n)/A000079(n)*A000165(n) = (n!/2^n)*Product_{i=0..n-1} (2*i + 2) = n!*Pochhammer(1, n) = n!^2. - Daniel Dockery (peritus(AT)gmail.com), Jun 13 2003
a(n) = Sum_{k>=0} (-1)^k*C(n, k)^2*k!*(2*n-k)!. - Philippe Deléham, Jan 07 2004
a(n) = !n!1 = !n! = Product{i=0, 1, 2, ... .}_{0 < |n-i| <= n}(n-i) = n(n-1)(n-2)...(2)(1)(-1)(-2)...(-n+2)(-n+1)(-n) = [(-1)^n][(n!)^2]. - J. Dezert (Jean.Dezert(AT)onera.fr), Mar 21 2004
D-finite with recurrence: a(0) = 1, a(n) = n^2*a(n-1). - Arkadiusz Wesolowski, Oct 04 2011
From Sergei N. Gladkovskii, Jun 14 2012: (Start)
A(x) = Sum_{n>=0,N) a(n)*x^n = 1 + x/(U(0;N-2)-x); N >= 4; U(k)= 1 + x*(k+1)^2 - x*(k+2)^2/G(k+1); besides U(0;infinity)=x; (continued fraction).
Let B(x) = Sum_{n>=0} a(n)*x^n/((n!)*(n+s)!), then B(0) = 1/(1-x) for abs(x) < 1 and B(1)= -1/x * log(1-x) for abs(x)< 1.
(End).
G.f.: 1 + x*(G(0) - 1)/(x-1) where G(k) = 1 - (k+1)^2*(1 - x*G(k+1)). - Sergei N. Gladkovskii, Jan 15 2013
a(n) = det(S(i+2,j), 1 <= i,j <= n), where S(n,k) are Stirling numbers of the second kind. - Mircea Merca, Apr 04 2013
a(n) = (2*n+1)!*2^(-4*n)*Sum_{k=0..n} (-1)^k*C(2*n+1,n-k)/(2*k+1). - Mircea Merca, Nov 12 2013
a(n) = A000290(A000142(n)). - Michel Marcus, Nov 12 2013
Sum_{n>=0} 1/a(n) = A070910 [Gradsteyn, Rzyhik 0.246.1]. - R. J. Mathar, Feb 25 2014. Corrected by Ilya Gutkovskiy, Aug 16 2016
From Ivan N. Ianakiev, Aug 16 2016: (Start)
a(n) = a(n-1) + 2*((n-1)^2)*sqrt(a(n-1)*a(n-2)) + ((n-1)^4)*a(n-2), for n > 1.
a(n) = a(n-1) - 2*(n^2 - 1)*sqrt(a(n-1)*a(n-2)) + (n^2 - 1)*a(n-2), for n > 1.
(End).
From Ilya Gutkovskiy, Aug 16 2016: (Start)
a(n) = A184877(n)*A184877(n-1).
Sum_{n>=0} (-1)^n/a(n) = BesselJ(0,2) = A091681. (End)
Sum_{n>=0} a(n)/(2*n+1)! = 2*Pi/sqrt(27). - Daniel Suteu, Feb 06 2017
a(n) = [x^n] Product_{k=1..n} (1 + k^2*x). - Vaclav Kotesovec, Feb 19 2022
a(n) = (2*n+1)! * [x^(2*n+1)] 4*arcsin(x/2)/sqrt(4-x^2). - Ira M. Gessel, Dec 10 2024

Extensions

More terms from James Sellers, Sep 19 2000
More terms from Simone Severini, Feb 15 2006

A046029 Numbers k such that (k!)^2 + 1 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 9, 10, 11, 13, 24, 65, 76, 127162
Offset: 1

Views

Author

Keywords

Comments

a(14) > 780. - Ralf Stephan, Oct 21 2002
a(14) > 2500. - Gabriel Cunningham (gcasey(AT)mit.edu), Feb 23 2004
a(14) > 10000. - Charles R Greathouse IV, Nov 16 2006
a(14) > 16000. - Robert Price, Aug 13 2011
a(15) > 150000. - Ryan Propper, Jun 25 2025

Examples

			9 is a term because (9!)^2 + 1 is prime.
		

References

  • H. Ibstedt, A Few Smarandache Sequences, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 170-183.

Crossrefs

Programs

  • Magma
    [n: n in [0..90] |IsPrime(Factorial(n)^2+1)]; // Vincenzo Librandi, May 28 2015
  • Mathematica
    Do[ If[ PrimeQ[n!^2 + 1], Print[n]], {n, 500}] (* Robert G. Wilson v, Apr 14 2004 *)
    Select[Range[1000], PrimeQ[(#!^2 + 1)] &] (* Vincenzo Librandi, May 28 2015 *)

Extensions

a(14) from Ryan Propper, Jun 25 2025

A051739 Primes of the form (n!)^2 + 1.

Original entry on oeis.org

2, 5, 37, 577, 14401, 131681894401, 13168189440001, 1593350922240001, 38775788043632640001, 384956219213331276939737002152967117209600000001
Offset: 1

Views

Author

G. L. Honaker, Jr., Dec 06 1999

Keywords

Examples

			37 is a term because it is prime and is (3!)^2 + 1.
		

Crossrefs

Cf. A046029. Primes in A020549.

Programs

Extensions

More terms from James Sellers, Dec 08 1999

A036739 a(n) = (n!)^n+1.

Original entry on oeis.org

2, 2, 5, 217, 331777, 24883200001, 139314069504000001, 82606411253903523840000001, 6984964247141514123629140377600000001, 109110688415571316480344899355894085582848000000001, 395940866122425193243875570782668457763038822400000000000000000001
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) ~ (2*Pi)^(n/2) * n^(n^2 + n/2) / exp(n^2 - 1/12). - Vaclav Kotesovec, Mar 19 2018

Extensions

One more term from Harvey P. Dale, Apr 10 2012

A083341 Smaller factor of the n-th semiprime of the form (m!)^2 + 1.

Original entry on oeis.org

13, 101, 17, 101, 1344169, 149, 9049, 37, 710341, 2122590346576634509, 171707860473207588349837, 7686544942807799800864250520468090636146175134909, 2196283505473, 598350346949, 1211221552894876996541369232623365900407018851538797
Offset: 1

Views

Author

Hugo Pfoertner, Apr 25 2003

Keywords

Examples

			a(1) = 13 because (A083340(1)!)^2 + 1 = 518401 = 13*39877.
a(15) = 1211221552894876996541369232623365900407018851538797 because (A083340(15)!)^2 + 1 = (55!)^2 + 1 can be factored into P52*P96 with a(15) = P52.
		

Crossrefs

Cf. A020549, A083340, subsequence of A282706.

Programs

  • PARI
    for(n=1,29,my(f=(n!)^2+1);if(bigomega(f)==2,print1(vecmin(factor(f)[,1]),", "))) \\ Hugo Pfoertner, Jul 13 2019

Formula

Numbers p such that p*q = (A083340(n)!)^2 + 1, p, q prime, p < q.

Extensions

The 11th term of the sequence (49-digit factor of the 100-digit number (41!)^2+1) was found with Yuji Kida's multiple polynomial quadratic sieve UBASIC PPMPQS v3.5 in 13 days CPU time on an Intel PIII 550 MHz.
Missing a(4) and new a(14), a(15) added by Hugo Pfoertner, Jul 13 2019

A354862 a(n) = n! * Sum_{d|n} (n/d)! / d!.

Original entry on oeis.org

1, 5, 37, 601, 14401, 520801, 25401601, 1626189601, 131682257281, 13168407228481, 1593350922240001, 229442707280223361, 38775788043632640001, 7600054676241325858561, 1710012252750418295078401, 437763137119219420513804801, 126513546505547170185216000001
Offset: 1

Views

Author

Seiichi Manyama, Jun 09 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := n! * DivisorSum[n, (n/#)! / #! &]; Array[a, 17] (* Amiram Eldar, Aug 30 2023 *)
  • PARI
    a(n) = n!*sumdiv(n, d, (n/d)!/d!);
    
  • PARI
    my(N=20, x='x+O('x^N)); Vec(serlaplace(sum(k=1, N, k!*(exp(x^k)-1))))
    
  • Python
    from math import factorial
    from sympy import divisors
    def A354862(n):
        f = factorial(n)
        return sum(f*(a := factorial(n//d))//(b:= factorial(d)) + (f*b//a if d**2 < n else 0) for d in divisors(n,generator=True) if d**2 <= n) # Chai Wah Wu, Jun 09 2022

Formula

E.g.f.: Sum_{k>0} k! * (exp(x^k) - 1).
If p is prime, a(p) = 1 + (p!)^2 = A020549(p).

A048858 Number of prime factors of 1+(n!)^2 (with multiplicity).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 3, 2, 2, 2, 2, 2, 5, 3, 4, 3, 1, 3, 5, 7, 2, 2, 6, 4, 4, 5, 4, 3, 3, 3, 4, 4, 4, 2, 5, 5, 7, 2, 3, 8, 9, 3, 3, 4, 3, 2, 4, 2, 8, 6, 4, 3, 8, 2, 5, 4, 5, 1, 5, 5, 4, 5, 4
Offset: 0

Views

Author

Charles T. Le (charlestle(AT)yahoo.com)

Keywords

Crossrefs

Programs

Formula

a(n) = A001222(A020549(n)). - Michel Marcus, Aug 09 2021

Extensions

Corrected by Arkadiusz Wesolowski, Oct 17 2011
Corrected by Charles R Greathouse IV, Sep 20 2012
a(38)-a(54) from Giovanni Resta, Jun 26 2018
a(55)-a(61) from Jinyuan Wang, Aug 09 2021
a(62)-a(70) from Sean A. Irvine, Sep 30 2021
Showing 1-10 of 11 results. Next