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 136 results. Next

A180632 Minimum length of a string over the alphabet A = {1,2,...,n} that contains every permutation of A as a substring exactly once, also known as length of the minimal super-permutation.

Original entry on oeis.org

0, 1, 3, 9, 33, 153
Offset: 0

Views

Author

Michael Hamm, Sep 13 2010

Keywords

Comments

Obviously bounded below by n! + n - 1 and above by 2(n! - (n - 1)!) + 1.
A better lower bound is n! + (n - 1)! + (n - 2)! + n - 3 (A376269) and a better upper bound is A007489(n). - Nathaniel Johnston, Apr 22 2013
The above mentioned lower bound was essentially shown in 2011 by an anonymous poster on the internet and, filling in some minor details, brought into a formal form by Houston, Pantone and Vatter (see reference). - Peter Luschny, Oct 27 2018
Was conjectured to be equal to A007489, but it is now known that a(n) < A007489(n) for all n > 5. - Robin Houston, Aug 22 2014
Different from the minimal supersequence, in which each permutations of n letters can appear as a subsequence instead of a sub-string (i.e., with noncontiguous characters). Refer to A062714. - Maurizio De Leo, Mar 02 2015
In October 2018 Greg Egan found new records for n=7, 8, 9: a(7) <= 5908, a(8) <= 46205, and a(9) <= 408966. More generally, for any n >= 7, a(n) <= n! + (n-1)! + (n-2)! + (n-3)! + n - 3. - Peter Luschny, Oct 26 2018; corrected by Max Alekseyev, Jan 07 2019
In February 2019, Bogdan Coanda found an example showing that a(7) <= 5907. Later the same month, Greg Egan found an example showing a(7) <= 5906. - Robin Houston, Mar 11 2019
a(6) <= 872 = A007489(6) - 1 [Houston 2014]. - M. F. Hasler, Jul 28 2020

Examples

			For n = 1, 2, 3, 4, the (unique, up to relabeling the symbols) minimal words are:
1
121
123121321
123412314231243121342132413214321
For n = 5, there are exactly 8 distinct (up to relabeling the symbols) minimal words.
Comment from _N. J. A. Sloane_, Mar 27 2015: From the Houston (2014 arXiv) paper, a superpermutation of length 872 (not known to be minimal, but shorter than the old upper bound of 873):
  1234561234516234512634512364513264513624513642513645213645123465123415 6234152634152364152346152341652341256341253641253461253416253412653412 3564123546123541623541263541236541326543126453162435162431562431652431 6254316245316425314625314265314256314253614253164523146523145623145263 1452361452316453216453126435126431526431256432156423154623154263154236 1542316542315642135642153624153621453621543621534621354621345621346521 3462513462153642156342165342163542163452163425163421564325164325614325 6413256431265432165432615342613542613452613425613426513426153246513246 5312463512463152463125463215463251463254163254613254631245632145632415 6324516324561324563124653214653241653246153264153261453261543265143625 1436521435621435261435216435214635214365124361524361254361245361243561 2436514235614235164235146235142635142365143265413625413652413562413526 41352461352416352413654213654123
		

References

  • D. Ashlock and J. Tillotson. Construction of small superpermutations and minimal injective superstrings. Congressus Numerantium, 93 (1993), 91-98.

Crossrefs

Row lengths of A332089 (for n >= 1).

Extensions

Edited and expanded by Nathaniel Johnston, Apr 22 2013
a(5) computed by Benjamin Chaffin and verified by Nathaniel Johnston, Aug 13 2014
Definition edited by Maurizio De Leo, Mar 02 2015; and by Max Alekseyev, Jan 07 2019

A336415 Number of divisors of n! with equal prime multiplicities.

Original entry on oeis.org

1, 1, 2, 4, 6, 10, 13, 21, 24, 28, 33, 49, 53, 85, 94, 100, 104, 168, 173, 301, 307, 317, 334, 590, 595, 603, 636, 642, 652, 1164, 1171, 2195, 2200, 2218, 2283, 2295, 2301, 4349, 4478, 4512, 4519, 8615, 8626, 16818, 16836, 16844, 17101, 33485, 33491, 33507, 33516, 33582
Offset: 0

Views

Author

Gus Wiseman, Jul 22 2020

Keywords

Comments

A number k has "equal prime multiplicities" (or is "uniform") iff its prime signature is constant, meaning that k is a power of a squarefree number.

Examples

			The a(n) uniform divisors of n for n = 1, 2, 6, 8, 30, 36 are the columns:
  1  2  6  8  30  36
     1  3  6  15  30
        2  4  10  16
        1  3   8  15
           2   6  10
           1   5   9
               4   8
               3   6
               2   5
               1   4
                   3
                   2
                   1
In 20!, the multiplicity of the third prime (5) is 4 but the multiplicity of the fourth prime (7) is 2. Hence there are 2^3 - 1 = 3 divisors with all exponents 3 (we subtract |{1}| = 1 from that count as 1 has no exponent 3). - _David A. Corneth_, Jul 27 2020
		

Crossrefs

The version for distinct prime multiplicities is A336414.
The version for nonprime perfect powers is A336416.
Uniform partitions are counted by A047966.
Uniform numbers are A072774, with nonprime terms A182853.
Numbers with distinct prime multiplicities are A130091.
Divisors with distinct prime multiplicities are counted by A181796.
Maximum divisor with distinct prime multiplicities is A327498.
Uniform divisors are counted by A327527.
Maximum uniform divisor is A336618.
1st differences are given by A048675.

Programs

  • Mathematica
    Table[Length[Select[Divisors[n!],SameQ@@Last/@FactorInteger[#]&]],{n,0,15}]
  • PARI
    a(n) = sumdiv(n!, d, my(ex=factor(d)[,2]); (#ex==0) || (vecmin(ex) == vecmax(ex))); \\ Michel Marcus, Jul 24 2020
    
  • PARI
    a(n) = {if(n<2, return(1)); my(f = primes(primepi(n)), res = 1, t = #f); f = vector(#f, i, val(n, f[i])); for(i = 1, f[1], while(f[t] < i, t--; ); res+=(1<David A. Corneth, Jul 27 2020

Formula

a(n) = A327527(n!).

Extensions

Terms a(31) and onwards from David A. Corneth, Jul 27 2020

A227157 Numbers k whose factorial base representation A007623(k) does not contain any nonleading zeros.

Original entry on oeis.org

1, 3, 5, 9, 11, 15, 17, 21, 23, 33, 35, 39, 41, 45, 47, 57, 59, 63, 65, 69, 71, 81, 83, 87, 89, 93, 95, 105, 107, 111, 113, 117, 119, 153, 155, 159, 161, 165, 167, 177, 179, 183, 185, 189, 191, 201, 203, 207, 209, 213, 215, 225, 227, 231, 233, 237, 239, 273
Offset: 1

Views

Author

Antti Karttunen, Jul 04 2013

Keywords

Comments

a(A003422(n)) = A007489(n).
a(A007489(n)) = (n+1)!-1 thus A007489(n) gives the number of terms less than (n+1)! in this sequence.
Equivalently, there are n! terms in the sequence with their magnitude in range n!..(n+1)!.
Also numbers k such that A304036(k) = 1 for k > 0. - Seiichi Manyama, May 06 2018

Crossrefs

The sequence gives all n for which A208575(n) is not zero. Complement of A227187. Subsets: A071156 (apart from zero), A231716, A231720.

Programs

  • Mathematica
    q[n_] := Module[{k = n, m = 2, c = 0, r}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, If[r == 0, c++]; m++]; c == 0]; Select[Range[300], q] (* Amiram Eldar, Jan 23 2024 *)

A084556 n occurs n! times.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 0

Views

Author

Antti Karttunen, Jun 02 2003

Keywords

Comments

Also minimum i such that A007489(i) >= n.
For n>=1, a(n) gives the length of the n-th permutation in the sequences like A030298 & A030496.

Crossrefs

First differences of A084555. Used to compute A084557. Differs from A084506 first time at the 130th term, where A084506(130) = 6, while A084556(130) = 5. Cf. also A002024, A072643, A072649, A090529.

Programs

  • Mathematica
    Flatten[ Table[#, {#!}] & /@ Range[0, 5]]

A335407 Number of anti-run permutations of the prime indices of n!.

Original entry on oeis.org

1, 1, 1, 2, 0, 2, 3, 54, 0, 30, 105, 6090, 1512, 133056, 816480, 127209600, 0, 10090080, 562161600, 69864795000, 49989139200, 29593652088000, 382147120555200, 41810689605484800, 4359985823793600, 3025062801079038720, 49052072750637116160, 25835971971637227375360
Offset: 0

Views

Author

Gus Wiseman, Jul 01 2020

Keywords

Comments

An anti-run is a sequence with no adjacent equal parts.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Conjecture: Only vanishes at n = 4 and n = 8.
a(16) = 0. Proof: 16! = 2^15 * m where bigomega(m) = A001222(m) = 13. We can't separate 15 1's with 13 other numbers. - David A. Corneth, Jul 04 2020

Examples

			The a(0) = 1 through a(6) = 3 anti-run permutations:
  ()  ()  (1)  (1,2)  .  (1,2,1,3,1)  (1,2,1,2,1,3,1)
               (2,1)     (1,3,1,2,1)  (1,2,1,3,1,2,1)
                                      (1,3,1,2,1,2,1)
		

Crossrefs

The version for Mersenne numbers is A335432.
Anti-run compositions are A003242.
Anti-run patterns are counted by A005649.
Permutations of prime indices are A008480.
Anti-runs are ranked by A333489.
Separable partitions are ranked by A335433.
Inseparable partitions are ranked by A335448.
Anti-run permutations of prime indices are A335452.
Strict permutations of prime indices are A335489.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[n!]],!MatchQ[#,{_,x_,x_,_}]&]],{n,0,10}]
  • PARI
    \\ See A335452 for count.
    a(n)={count(factor(n!)[,2])} \\ Andrew Howroyd, Feb 03 2021

Formula

a(n) = A335452(A000142(n)). - Andrew Howroyd, Feb 03 2021

Extensions

Terms a(14) and beyond from Andrew Howroyd, Feb 03 2021

A014288 a(n) = floor(Sum_{k=0..n} k!/2), or floor( A003422(n+1)/2 ).

Original entry on oeis.org

0, 1, 2, 5, 17, 77, 437, 2957, 23117, 204557, 2018957, 21977357, 261478157, 3374988557, 46964134157, 700801318157, 11162196262157, 189005910310157, 3390192763174157, 64212742967590157, 1280663747055910157, 26826134832910630157, 588826498721714470157
Offset: 0

Views

Author

Keywords

Comments

The first term a(0) would be a fraction if the floor( ... ) function were omitted; for n >= 2, all terms from A003422 are even. - M. F. Hasler, Dec 16 2007

Crossrefs

Programs

  • Magma
    [Floor((&+[Factorial(j): j in [0..n]])/2): n in [0..30]]; // G. C. Greubel, Sep 05 2022
    
  • Maple
    a:= proc(n) a(n):= `if`(n<3, n, (n+1)*a(n-1)-n*a(n-2)) end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Feb 01 2013
  • Mathematica
    f[x_] := {Floor[1 + (n - x[[2]])*x[[1]]], x[[2]] + 1};
    a[0] = 0; a[n_] := Nest[f, {1, 0}, n][[1]]/2 (* Joseph E. Cooper III (easonrevant(AT)gmail.com), Aug 19 2008 *) (* updated by Jean-François Alcover, Jun 01 2015 *)
    a[n_]:=-(1/2) Subfactorial[-1]-1/2(-1)^n Gamma[2+n] Subfactorial[-2-n]; Table[a[n] //FullSimplify,{n,0,25}] (* Gerry Martens, May 29 2015 *)
  • PARI
    A014288(n)=sum(k=0,n,k!)>>1 \\ M. F. Hasler, Dec 16 2007
    
  • Python
    from math import factorial
    def A014288(n): return sum(factorial(k) for k in range(n+1))>>1 # Chai Wah Wu, Nov 01 2023
  • SageMath
    [sum(factorial(j) for j in (0..n))//2 for n in (0..30)] # G. C. Greubel, Sep 05 2022
    

Formula

a(0)=0, a(1)=1, a(2)=2, a(n) = (n+1)*a(n-1) - n*a(n-2). - Benoit Cloitre, Sep 07 2002
a(0) = 0, a(n) = (1/2)*floor(1 + 1*floor(1 + 2*floor(1 + ... + (n-1)*floor(1+n*floor(1))). - Joseph E. Cooper III (easonrevant(AT)gmail.com), Aug 19 2008
G.f.: G(0)/(1-x)/2 -1/2, where G(k)= 1 + (2*k + 1)*x/( 1 - 2*x*(k+1)/(2*x*(k+1) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 24 2013
G.f.: A(x) = (Sum_{n>=0} x^n*n!)/(2-2*x) - 1/2 = G(0)/(4*(1-x)) - 1/2, where G(k) = 1 + 1/(1 - x/(x + 1/(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 02 2013
a(n) ~ n!/2. - Vaclav Kotesovec, Aug 10 2013
E.g.f.: -1/2 + (exp(x)/2)*Sum_{k>=0} (k! - k*Gamma(k,x)). - Robert Israel, Jun 01 2015
a(n) = ((n+1)!*ExpIntegral(n+2,-1)+Ei(1)+Pi*i)/(2*e). - Ammar Khatab, Aug 14 2020

Extensions

Edited by M. F. Hasler, Dec 16 2007

A325618 Numbers m such that there exists an integer partition of m whose reciprocal factorial sum is 1.

Original entry on oeis.org

1, 4, 11, 18, 24, 31, 37, 44, 45, 50, 52, 57, 58, 65, 66, 70, 71, 73, 76, 78, 79, 83, 86, 87, 89, 91, 92, 94, 96, 97, 99, 100, 102, 104, 107, 108, 109, 110, 112, 113, 114, 115, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 130, 131
Offset: 1

Views

Author

Gus Wiseman, May 13 2019

Keywords

Comments

The reciprocal factorial sum of an integer partition (y_1,...,y_k) is 1/y_1! + ... + 1/y_k!.
Conjecture: 137 is the greatest integer not in this sequence. - Charlie Neder, May 14 2019

Examples

			The sequence of terms together with an integer partition of each whose reciprocal factorial sum is 1 begins:
   1: (1)
   4: (2,2)
  11: (3,3,3,2)
  18: (3,3,3,3,3,3)
  24: (4,4,4,4,3,3,2)
  31: (4,4,4,4,3,3,3,3,3)
  37: (4,4,4,4,4,4,4,4,3,2)
  44: (4,4,4,4,4,4,4,4,3,3,3,3)
  45: (5,5,5,5,5,4,4,4,3,3,2)
  50: (4,4,4,4,4,4,4,4,4,4,4,4,2)
		

Crossrefs

Extensions

a(11)-a(55) from Charlie Neder, May 14 2019

A104344 a(n) = Sum_{k=1..n} k!^2.

Original entry on oeis.org

1, 5, 41, 617, 15017, 533417, 25935017, 1651637417, 133333531817, 13301522971817, 1606652445211817, 231049185247771817, 39006837228880411817, 7639061293780877851817, 1717651314017980301851817, 439480788011413032845851817, 126953027293558583218061851817
Offset: 1

Views

Author

Eric W. Weisstein, Mar 02 2005

Keywords

Crossrefs

Sum_{k=1..n} (k!)^m: A007489 (m=1), this sequence (m=2), A138564 (m=3), A289945 (m=4), A316777 (m=5), A289946 (m=6).

Programs

  • Mathematica
    Table[Sum[(k!)^2,{k,n}],{n,15}] (* Harvey P. Dale, Jul 21 2011 *)
    Accumulate[(Range[20]!)^2] (* Much more efficient than the above program. *) (* Harvey P. Dale, Aug 15 2022 *)
  • PARI
    a(n) = sum(k=1, n, k!^2); \\ Michel Marcus, Jul 16 2017

Formula

a(n) = A061062(n) - 1. - Michel Marcus, Feb 28 2014

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Sep 24 2009

A166350 Triangle read by rows: T(n,m) = m!, n >= 1.

Original entry on oeis.org

1, 1, 2, 1, 2, 6, 1, 2, 6, 24, 1, 2, 6, 24, 120, 1, 2, 6, 24, 120, 720, 1, 2, 6, 24, 120, 720, 5040, 1, 2, 6, 24, 120, 720, 5040, 40320, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 1, 2, 6, 24, 120, 720, 5040, 40320
Offset: 1

Views

Author

Paul Curtz, Oct 12 2009

Keywords

Examples

			Triangle begins:
  1;
  1, 2;
  1, 2, 6;
  1, 2, 6, 24;
  1, 2, 6, 24, 120;
  1, 2, 6, 24, 120, 720;
  1, 2, 6, 24, 120, 720, 5040;
  ...
		

Crossrefs

Cf. A014454.
Row sums give A007489.

Programs

  • Haskell
    import Data.List (inits)
    a166350 n k = a166350_tabl !! (n-1) !! (n-1)
    a166350_row n = a166350_tabl !! (n-1)
    a166350_tabl = tail $ inits $ tail a000142_list
    -- Reinhard Zumkeller, Nov 11 2013
  • Mathematica
    Flatten[Table[Range[n]!,{n,11}]] (* Harvey P. Dale, Jan 06 2012 *)
    Module[{nn=20,fs},fs=Range[nn]!;Table[Take[fs,n],{n,nn}]]//Flatten (* Harvey P. Dale, Jun 14 2020 *)

Formula

T(n,m) = A000142(m).

Extensions

Definition clarified - R. J. Mathar, Oct 14 2009

A275736 a(n) has base-2 representation with ones in those digit-positions where n contains ones in its factorial base representation, and zeros in all the other positions.

Original entry on oeis.org

0, 1, 2, 3, 0, 1, 4, 5, 6, 7, 4, 5, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 1, 8, 9, 10, 11, 8, 9, 12, 13, 14, 15, 12, 13, 8, 9, 10, 11, 8, 9, 8, 9, 10, 11, 8, 9, 0, 1, 2, 3, 0, 1, 4, 5, 6, 7, 4, 5, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 1, 4, 5, 6, 7, 4, 5, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 1, 4, 5, 6, 7, 4, 5, 0
Offset: 0

Views

Author

Antti Karttunen, Aug 09 2016

Keywords

Comments

Each natural numbers occurs an infinite number of times.
Can be used when computing A275727.

Examples

			22 has factorial base representation "320" (= A007623(22)), which does not contain any "1". Thus a(22) = 0, as the empty sum is 0.
35 has factorial base representation "1121" (= A007623(35)). Here 1's occur in the following positions, when counted from right (starting with 0 for the least significant position): 0, 2 and 3. Thus a(35) = 2^0 + 2^2 + 2^3 = 1*4*8 = 13.
		

Crossrefs

Left inverse of A059590.
Cf. A255411 (indices of zeros).
Cf. also A275732.

Programs

  • Mathematica
    nn = 120; m = 1; While[Factorial@ m < nn, m++]; m; Map[FromDigits[#, 2] &[IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] /. k_ /; k != 1 -> 0] &, Range[0, nn]] (* Michael De Vlieger, Aug 11 2016, Version 10.2 *)

Formula

If A257261(n) = 0, then a(n) = 0, otherwise a(n) = A000079(A257261(n)-1) + a(A275730(n, A257261(n)-1)). [Here A275730(n,p) is a bivariate function that "clears" the digit at zero-based position p in the factorial base representation of n].
Other identities and observations. For all n >= 0:
a(n) = A048675(A275732(n)).
A000120(a(n)) = A257511(n).
a(A007489(n)) = A000225(n).
a(A059590(n)) = n.
a(A255411(n)) = 0.
Previous Showing 21-30 of 136 results. Next