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.

Previous Showing 21-30 of 91 results. Next

A061057 Factorial splitting: write n! = x*y with x <= y and x maximal; sequence gives value of y-x.

Original entry on oeis.org

0, 1, 1, 2, 2, 6, 2, 18, 54, 30, 36, 576, 127, 840, 928, 3712, 20160, 93696, 420480, 800640, 1305696, 7983360, 55056804, 65318400, 326592000, 2286926400, 2610934480, 13680979200, 18906930876, 674165366496, 326850970500, 16753029012720, 16880461678080
Offset: 1

Views

Author

Ed Pegg Jr, May 28 2001

Keywords

Comments

Difference between central divisors of n!. - Jaume Oliver Lafont, Mar 13 2009
For n > 1, n! will never be a square, because of primes in the last half of the factors. Therefore the divisors of n! come in pairs (x,y) with x*y = n! and x < y. The sequence gives the difference y-x between the pair nearest to the square root of n!. - Alois P. Heinz, Jul 06 2009
a(n) = 2 iff n belongs to A146968. - Max Alekseyev, Feb 06 2010

Examples

			2! = 1*2, with difference of 1.
3! = 2*3, with difference of 1.
4! = 4*6, with difference of 2.
5! = 10*12, with difference of 2.
6! = 24*30, with difference of 6.
7! = 70*72 with difference of 2.
The corresponding central divisors are two units apart (equivalently, n!+1=A038507(n) is a square) for n = 4, 5, 7 (see A146968).
		

Crossrefs

Programs

  • Maple
    A060777 := proc(n) local d,nd ; d := sort(convert(numtheory[divisors](n!),list)) ; nd := nops(d) ; op(floor(1+nd/2),d) ; end:
    A060776 := proc(n) local d,nd ; d := sort(convert(numtheory[divisors](n!),list)) ; nd := nops(d) ; op(floor(nd/2),d) ; end:
    A061057 := proc(n) A060777(n)-A060776(n) ; end:
    seq(A061057(n),n=2..27) ; # R. J. Mathar, Mar 14 2009
  • Mathematica
    Do[ With[ {k = Floor[ Sqrt[ x! ] ] - Do[ If[ Mod[ x!, Floor[ Sqrt[ x! ] ] - n ] == 0, Return[ n ] ], {n, 0, 10000000} ]}, Print[ {x, "! =", k, x!/k, x!/k - k} ] ], {x, 3, 22} ]
    f[n_] := Block[{k = Floor@ Sqrt[n! ]}, While[ Mod[n!, k] != 0, k-- ]; n!/k - k]; Table[f@n, {n, 2, 32}] (* Robert G. Wilson v, Jul 11 2009 *)
    Table[d=Divisors[n!]; len=Length[d]; If[OddQ[len], 0, d[[1 + len/2]] - d[[len/2]]], {n, 34}] (* Vincenzo Librandi, Jan 02 2016 *)
  • PARI
    for(k=2,25,d=divisors(k!);print(d[#d/2+1]-d[#d/2])) \\ Jaume Oliver Lafont, Mar 13 2009
    
  • Python
    from math import isqrt, factorial
    from sympy import divisors
    def A061057(n):
        k = factorial(n)
        m = max(d for d in divisors(k,generator=True) if d <= isqrt(k))
        return k//m-m # Chai Wah Wu, Apr 06 2022

Formula

a(n) = A060777(n) - A060776(n).
a(n) = A056737(A000142(n)). - Pontus von Brömssen, Jul 15 2023

Extensions

More terms from Dean Hickerson, Jun 13 2001
Edited by N. J. A. Sloane Jul 07 2009 at the suggestion of R. J. Mathar and Alois P. Heinz
a(41) from Robert G. Wilson v, Oct 03 2014

A089479 Triangle T(n,k) read by rows, where T(n,k) = number of times the permanent of a real n X n (0,1)-matrix takes the value k, for n >= 0, 0 <= k <= n!.

Original entry on oeis.org

0, 1, 1, 1, 9, 6, 1, 265, 150, 69, 18, 9, 0, 1, 27713, 13032, 10800, 4992, 4254, 1440, 1536, 576, 648, 24, 288, 96, 48, 0, 72, 0, 0, 0, 16, 0, 0, 0, 0, 0, 1, 10363361, 3513720, 4339440, 2626800, 3015450, 1451400, 1872800, 962400, 1295700, 425400, 873000
Offset: 0

Views

Author

Hugo Pfoertner, Nov 05 2003

Keywords

Comments

The last element of each row is 1, corresponding to the n X n "all 1" matrix with permanent = n!. The first 4 rows were provided by Wouter Meeussen. The 6th row was computed by Gordon F. Royle: 13906734081, 2722682160, 4513642920, 3177532800, 4466769300, 2396826720, 3710999520, 2065521600, 3253760550, 1468314000, 2641593600, 1350475200, 2210277600, 1034061120,... .

Examples

			Triangle begins:
    0,     1;
    1,     1;
    9,     6,     1;
  265,   150,    69,   18,    9,    0,    1;
27713, 13032, 10800, 4992, 4254, 1440, 1536, 576, 648, 24, 288,
                   96, 48, 0, 72, 0, 0, 0, 16, 0, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

T(n,0) = A088672(n), T(n,1) = A089482(n). The n-th row of the table contains A087983(n) nonzero entries. For n>2 A089477(n) gives the position of the first zero entry in the n-th row.
Cf. A089480 (occurrence counts for permanents of non-singular (0,1)-matrices), A089481 (occurrence counts for permanents of singular (0,1)-matrices).
Cf. A000290, A038507 (row lengths), A002416 (row sums).

Formula

From Geoffrey Critzer, Dec 20 2023: (Start)
Sum_{k=1..n!} T(n,k) = A227414(n).
For n>2, T(n,n!-(n-1)!) = n^2, the number of matrices with exactly one 0 entry. (End)

Extensions

Edited by Alois P. Heinz, Dec 20 2023

A002584 Largest prime factor of product of first n primes - 1, or 1 if no such prime exists.

Original entry on oeis.org

1, 5, 29, 19, 2309, 30029, 8369, 929, 46027, 81894851, 876817, 38669, 304250263527209, 92608862041, 59799107, 1143707681, 69664915493, 1146665184811, 17975352936245519, 2140320249725509
Offset: 1

Views

Author

Keywords

Comments

The products of the first primes are called primorial numbers. - Franklin T. Adams-Watters, Jun 12 2014

References

  • M. Kraitchik, On the divisibility of factorials, Scripta Math., 14 (1948), 24-26 (but beware errors).
  • M. Kraitchik, Introduction à la Théorie des Nombres. Gauthier-Villars, Paris, 1952, p. 2.
  • 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).

Crossrefs

Programs

  • Mathematica
    Prepend[Table[ Max[Transpose[FactorInteger[(Times @@ Prime[Range[i]]) - 1]][[1]]], {i, 2, 20}], 1]
    FactorInteger[#][[-1,1]]&/@Rest[FoldList[Times,1,Prime[Range[20]]]-1] (* Harvey P. Dale, Feb 27 2013 *)
  • PARI
    a(n)=if(n>1, my(f=factor(prod(i=1,f,prime(i)))[,1]); f[#f], 1) \\ Charles R Greathouse IV, Feb 08 2017

Formula

a(n) = A006530(A057588(n)). - Amiram Eldar, Feb 13 2020

Extensions

More terms from J. L. Selfridge
Further terms from Labos Elemer, Oct 25 2000

A052898 a(n) = 2*n! + 1.

Original entry on oeis.org

3, 3, 5, 13, 49, 241, 1441, 10081, 80641, 725761, 7257601, 79833601, 958003201, 12454041601, 174356582401, 2615348736001, 41845579776001, 711374856192001, 12804747411456001, 243290200817664001
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Crossrefs

Cf. sequences of the type k*n!+1: A038507 (k=1), this sequence, A173324 (k=3), A173322 (k=4), A173319 (k=5), A173314 (k=6).

Programs

  • Magma
    [2*Factorial(n) + 1: n in [0..20]]; // Vincenzo Librandi, Sep 29 2013
    
  • Magma
    [3] cat [n eq 1 select n+2 else n*Self(n-1)-n+1: n in [1..25] ]; // Vincenzo Librandi, Sep 29 2013
  • Maple
    spec := [S,{S=Union(Sequence(Z),Sequence(Z),Set(Z))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    a[0]:=3: for n from 1 to 21 do a[n]:=n*a[n-1]-n+1; od:
    seq(a[n], n=0..20). # Sergei N. Gladkovskii, Jul 04 2012
  • Mathematica
    lst={};s=-3;Do[s+=(n+=s*n);AppendTo[lst, s], {n, 0, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 10 2008 *)
    FoldList[#1*#2 - #2 + 1 &, 3, Range[19]] (* Robert G. Wilson v, Jul 07 2012 *)
    Table[2 n! + 1, {n, 0, 20}] (* Vincenzo Librandi, Sep 29 2013 *)

Formula

E.g.f.: (-2-exp(x)+x*exp(x))/(-1+x).
Recurrence: {a(2)=5, a(1)=3, (n^2+2*n+1)*a(n)+(-n^2-3*n-1)*a(n+1)+a(n+2)*n}
From Sergei N. Gladkovskii, Jul 04 2012: (Start)
a(0)=3; for n>0, a(n) = n*a(n-1)-n+1.
Let E(x) be the e.g.f., then
E(x)=(x*G(0)-2)/(x-1), where G(k)= 1 - 1/(x - x^3/(x^2 - (k+1)/G(k+1)));(continued fraction, 3rd kind, 3-step).
E(x)=x*G(0)/(x-1), where G(k)= 1 - 1/(x + 2*x*(x-1)*k!/(1 - 2*(x-1)*k! - x^2/(x^2 + 2*(x-1)*(k+1)!/G(k+1)))); (continued fraction, 3rd kind, 4-step).
(End).

Extensions

Definition replaced with the closed formula by Bruno Berselli, Sep 28 2013

A057713 Smallest prime divisor of Kummer numbers ( = primorials - 1), or 1 if no such prime exists.

Original entry on oeis.org

1, 5, 29, 11, 2309, 30029, 61, 53, 37, 79, 228737, 229, 304250263527209, 141269, 191, 87337, 27600124633, 1193, 163, 260681003321, 313, 163, 139, 23768741896345550770650537601358309, 66683, 2990092035859, 15649, 17515703, 719, 295201, 15098753, 10172884549, 20962699238647, 4871, 673, 311, 1409, 1291, 331, 1450184819, 23497, 711427, 521, 673, 519577, 1372062943, 56543, 811, 182309, 53077, 641, 349, 389
Offset: 1

Views

Author

Labos Elemer, Oct 25 2000

Keywords

Examples

			6th term in the sequence corresponds to 7th primorial = 510510 and 510509 = 61 * 8369, so a(7) = 61.
		

Crossrefs

Programs

  • Mathematica
    Map[If[PrimeQ@ #, #, FactorInteger[#][[1, 1]]] &, FoldList[#1 #2 &, Prime@ Range@ 36] - 1] (* Michael De Vlieger, Feb 18 2017 *)

Formula

a(n) = A020639(A057588(n)). - Amiram Eldar, Feb 13 2020

Extensions

More terms from Klaus Brockhaus, Larry Reeves (larryr(AT)acm.org) and Robert G. Wilson v, Apr 02 2001

A173314 a(n) = 6*n!+1.

Original entry on oeis.org

7, 7, 13, 37, 145, 721, 4321, 30241, 241921, 2177281, 21772801, 239500801, 2874009601, 37362124801, 523069747201, 7846046208001, 125536739328001, 2134124568576001, 38414242234368001, 729870602452992001
Offset: 0

Views

Author

Vincenzo Librandi, Feb 16 2010

Keywords

Examples

			For n=0, a(0)=7; n=1,a(1)=7; n=2, a(2)=13; n=3, a(3)=37; n=4, a(4)=145.
		

Crossrefs

Cf. sequences of the type k*n!+1: A038507 (k=1), A052898 (k=2), A173324 (k=3), A173322 (k=4), A173319 (k=5), this sequence (k=6).

Programs

  • Magma
    [6*Factorial(n) + 1: n in [0..25]]; // Vincenzo Librandi, Sep 29 2013
    
  • Magma
    [7] cat [n eq 1 select n+6 else n*Self(n-1)-n+1: n in [1..25] ]; // Vincenzo Librandi, Sep 29 2013
  • Mathematica
    Table[6 n! + 1, {n, 0, 25}] (* Vincenzo Librandi, Sep 29 2013 *)

Formula

a(0)=7, a(n) = n*a(n-1)-n+1. - Vincenzo Librandi, Sep 29 2013

A173322 a(n) = 4*n! + 1.

Original entry on oeis.org

5, 5, 9, 25, 97, 481, 2881, 20161, 161281, 1451521, 14515201, 159667201, 1916006401, 24908083201, 348713164801, 5230697472001, 83691159552001, 1422749712384001, 25609494822912001, 486580401635328001, 9731608032706560001, 204363768686837760001
Offset: 0

Views

Author

Vincenzo Librandi, Feb 16 2010

Keywords

Crossrefs

Cf. sequences of the type k*n!+1: A038507 (k=1), A052898 (k=2), A173324 (k=3), this sequence, A173319 (k=5), A173314 (k=6).

Programs

  • Magma
    [4*Factorial(n) + 1: n in [0..25]]; // Vincenzo Librandi, Sep 29 2013
    
  • Magma
    [5] cat [n eq 1 select n+4 else n*Self(n-1)-n+1: n in [1..25] ]; // Vincenzo Librandi, Sep 29 2013
  • Maple
    a:= proc(n) if n=0 then 5 else a(n) := n*a(n-1)-n+1 fi end: seq (a(n), n=0..25);  # Sergei N. Gladkovskii, Jul 04 2012
  • Mathematica
    4*Range[0,20]!+1 (* Harvey P. Dale, Jun 26 2012 *)
    Table[4 n! + 1, {n, 0, 21}] (* Vincenzo Librandi, Sep 29 2013 *)

Formula

a(0) = 5, a(n) = n*a(n-1)-n+1. - Sergei N. Gladkovskii, Jul 04 2012

A173324 a(n) = 3*n! + 1.

Original entry on oeis.org

4, 4, 7, 19, 73, 361, 2161, 15121, 120961, 1088641, 10886401, 119750401, 1437004801, 18681062401, 261534873601, 3923023104001, 62768369664001, 1067062284288001, 19207121117184001, 364935301226496001, 7298706024529920001, 153272826515128320001
Offset: 0

Views

Author

Vincenzo Librandi, Feb 16 2010

Keywords

Crossrefs

Cf. sequences of the type k*n!+1: A038507 (k=1), A052898 (k=2), this sequence, A173322 (k=4), A173319 (k=5), A173314 (k=6).

Programs

  • Magma
    [3*Factorial(n) + 1: n in [0..25]]; // Vincenzo Librandi, Sep 29 2013
    
  • Magma
    [4] cat [n eq 1 select n+3 else n*Self(n-1)-n+1: n in [1..25] ]; // Vincenzo Librandi, Sep 29 2013
  • Maple
    a:= proc(n) if n=0 then 4 else a(n):= n*a(n-1)-n+1 fi end: seq (a(n), n=0..25);  # Sergei N. Gladkovskii, Jul 04 2012
  • Mathematica
    Table[3 n! + 1, {n, 0, 30}] (* Vincenzo Librandi, Sep 29 2013 *)

Formula

a(0) = 4, a(n) = n*a(n-1)-n+1 for n>0. - Sergei N. Gladkovskii, Jul 04 2012

A229345 Number A(n,k) of lattice paths from {n}^k to {0}^k using steps that decrement one component or all components by the same positive integer; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 7, 22, 4, 1, 1, 25, 248, 188, 8, 1, 1, 121, 6506, 11380, 1712, 16, 1, 1, 721, 292442, 2359348, 577124, 16098, 32, 1, 1, 5041, 19450082, 1088626684, 991365512, 30970588, 154352, 64, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2013

Keywords

Examples

			A(2,2) = 22: [(2,2),(1,1),(0,0)], [(2,2),(1,1),(0,1),(0,0)], [(2,2),(1,1),(1,0),(0,0)], [(2,2),(0,0)], [(2,2),(1,2),(0,1),(0,0)], [(2,2),(1,2),(0,2),(0,1),(0,0)], [(2,2),(1,2),(0,2),(0,0)], [(2,2),(1,2),(1,1),(0,0)], [(2,2),(1,2),(1,1),(0,1),(0,0)], [(2,2),(1,2),(1,1),(1,0),(0,0)], [(2,2),(1,2),(1,0),(0,0)], [(2,2),(0,2),(0,1),(0,0)], [(2,2),(0,2),(0,0)], [(2,2),(2,1),(1,0),(0,0)], [(2,2),(2,1),(1,1),(0,0)], [(2,2),(2,1),(1,1),(0,1),(0,0)], [(2,2),(2,1),(1,1),(1,0),(0,0)], [(2,2),(2,1),(0,1),(0,0)], [(2,2),(2,1),(2,0),(1,0),(0,0)], [(2,2),(2,1),(2,0),(0,0)], [(2,2),(2,0),(1,0),(0,0)], [(2,2),(2,0),(0,0)].
Square array A(n,k) begins:
  1,  1,     1,        1,            1,                 1, ...
  1,  1,     3,        7,           25,               121, ...
  1,  2,    22,      248,         6506,            292442, ...
  1,  4,   188,    11380,      2359348,        1088626684, ...
  1,  8,  1712,   577124,    991365512,     4943064622568, ...
  1, 16, 16098, 30970588, 453530591824, 25162900228200976, ...
		

Crossrefs

Columns k=0-3 give: A000012, A011782, A132595(n+1), A229482.
Rows n=0-2 give: A000012, A038507 (for k>1), A229465.
Main diagonal gives: A229346.

Programs

  • Maple
    b:= proc(l) option remember; local m; m:= nops(l);
          `if`(m=0 or l[m]=0, 1,
          `if`(m>1, add(b(l-[j$m]), j=1..l[1]), 0)+
          add(add(b(sort(subsop(i=l[i]-j, l))), j=1..l[i]), i=1..m))
        end:
    A:= (n, k)-> b([n$k]):
    seq(seq(A(n, d-n), n=0..d), d=0..10);  # Alois P. Heinz, Sep 24 2013
  • Mathematica
    b[l_] := b[l] = With[{m = Length[l]}, If[m == 0 || l[[m]] == 0, 1, If[m > 1, Sum[b[l - Array[j&, m]], {j, 1, l[[1]]}],  0] + Sum[Sum[b[Sort[ReplacePart[l, i -> l[[i]] - j]]], {j, 1, l[[i]]}], {i, 1, m}]]]; a[n_, k_] := b[Array[n&, k]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 16 2013, translated from Maple *)

A054415 Smallest prime factor of n!-1 (for n>2), a(2)=1.

Original entry on oeis.org

1, 5, 23, 7, 719, 5039, 23, 11, 29, 13, 479001599, 1733, 87178291199, 17, 3041, 19, 59, 653, 124769, 23, 109, 51871, 625793187653, 149, 20431, 29, 239, 31, 265252859812191058636308479999999, 787, 263130836933693530167218012159999999, 8683317618811886495518194401279999999
Offset: 2

Views

Author

Henry Bottomley, May 10 2000

Keywords

Comments

The initial term a(2)=1 is not a prime, but it does not affect search results and may prevent submission of duplicates. - M. F. Hasler, Oct 31 2012

Examples

			a(3)=5 because 3!-1=5 which is prime; a(5)=7 because 5!-1=119=7*17 and 7<17
		

Crossrefs

Programs

  • Mathematica
    Do[ Print[ FactorInteger[ n! - 1, FactorComplete -> True][ [1, 1] ] ], {n, 3, 32} ]
  • PARI
    A054415(n)=if(n>2,factor(n!-1)[1,1],1)  \\ M. F. Hasler, Oct 31 2012

Formula

Erdős & Stewart show that a(n) > n + (l-o(l))log n/log log n except when n+1 is prime, and that a(n) > n + e(n)sqrt(n) for almost all n where e(n) is any function with lim e(n) = 0. - Charles R Greathouse IV, Dec 05 2012

Extensions

More terms from Robert G. Wilson v, Aug 01 2000
More terms from Amiram Eldar, Oct 07 2019
Previous Showing 21-30 of 91 results. Next