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

A072456 Annihilating primes for A000522.

Original entry on oeis.org

3, 7, 11, 17, 47, 53, 61, 67, 73, 79, 89, 101, 139, 151, 157, 191, 199, 229, 233, 241, 263, 269, 277, 283, 311, 317, 337, 347, 359, 367, 379, 397, 433, 449, 467, 487, 503, 521, 541, 563, 569, 571, 577, 593, 607, 613, 619, 647, 659, 673, 683, 691, 727, 743, 769, 773, 809, 823, 827, 911, 919, 929, 953, 971, 991
Offset: 1

Views

Author

N. J. A. Sloane, Aug 02 2002

Keywords

Comments

Primes p such that A072453(p) = 0.

Crossrefs

Programs

  • Perl
    use warnings;
      use strict;
      use ntheory ":all";
      use Math::GMPz;
      use Memoize;  memoize 'a000522';
      sub a000522 {
        my($n, $sum, $fn) = (shift, 0, Math::GMPz->new(1));
        do {  $sum += $fn;  $fn *= ($n-$_);  } for 0 .. $n;
        $sum;
      }
      sub a072453 {
        my $n = shift;
        vecsum( map { a000522($_) % $n == 0 } 0 .. $n-1 );
      }
      forprimes { print "$\n" unless a072453($) } 1000;
    # Dana Jacobsen, Feb 16 2016

Extensions

More terms from Vladeta Jovovic, Aug 02 2002
Offset corrected by Amiram Eldar, May 15 2020

A124781 a(n) = gcd(A093101(n), A093101(n+2)) where A093101(n) = gcd(n!, A(n)) and A(n) = A000522(n) = Sum_{k=0..n} n!/k!.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 26, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 13, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 26, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 65, 2, 1, 2, 1, 10, 1, 2, 1, 74, 5, 2, 1, 26, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 13, 2, 1, 2, 5, 2, 1, 2, 1
Offset: 0

Views

Author

Jonathan Sondow, Nov 07 2006

Keywords

Comments

a(n) divides n+3 because A(n+2) = (n+2)(n+1)*A(n) + n+3.

Examples

			a(3) = gcd(d(3),d(5)) = gcd(gcd(3!,16), gcd(5!,326)) = gcd(2,2) = 2.
		

Crossrefs

Programs

  • Mathematica
    (A[n_] := Sum[n!/k!, {k,0,n}]; d[n_] := GCD[n!,A[n]]; Table[GCD[d[n],d[n+2]], {n,0,100}])
    (* Second program, faster: *)
    Table[GCD @@ Map[GCD[#!, Floor[E*#!] - Boole[# == 0]] &, n + {0, 2}], {n, 0, 96}] (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    A000522(n) = sum(k=0, n, binomial(n, k)*k!); \\ This function from Joerg Arndt, Dec 14 2014
    A093101(n) = gcd(n!,A000522(n));
    m1=m2=1; for(n=0,4096,m=m1; m1=m2; m2 = A093101(n+2); m124781 = gcd(m,m2); write("b093101.txt", n, " ", m); write("b124781.txt", n, " ", m124781); write("b123901.txt", n, " ", (n+3)/m124781)); \\ Antti Karttunen, Jul 12 2017

Formula

a(n) = gcd(A093101(n), A093101(n+2)) = (n+3)/A123901(n).
a(n) = gcd(A(n), A(n+2), n!) where A(n)=1+n+n(n-1)+...+n!. - Jonathan Sondow, Nov 13 2006

Extensions

Replaced d(n) in the name with A093101(n). - Antti Karttunen, Jul 12 2017

A026243 a(n) = A000522(n) - 2.

Original entry on oeis.org

0, 3, 14, 63, 324, 1955, 13698, 109599, 986408, 9864099, 108505110, 1302061343, 16926797484, 236975164803, 3554627472074, 56874039553215, 966858672404688, 17403456103284419, 330665665962403998, 6613313319248079999, 138879579704209680020, 3055350753492612960483
Offset: 1

Views

Author

N. J. A. Sloane, based on a message from a correspondent who wishes to remain anonymous, Dec 21 2003

Keywords

Comments

Number of operations of addition and multiplication needed to evaluate a determinant of order n by cofactor expansion.

Examples

			To calculate a determinant of order 3:
    |a b c|       |e f|       |d f|       |d e|
D = |d e f| = a * |h i| - b * |g i| + c * |g h| =
    |g h i|
   = a * (e*i - f*h) - b * (d*i - f*g) + c * (d*h - e*g).
There are 9 multiplications * and 5 additions (+ or -), so 14 operations and a(3) = 14. - _Bernard Schott_, Apr 21 2019
		

Crossrefs

Cf. A000522, A007526. Equals A033312 + A038156.
Cf. A001339.

Programs

  • Maple
    a:= proc(n) a(n):= n*(a(n-1)+2)-1: end: a(1):= 0:
    seq (a(n), n=1..30);  # Alois P. Heinz, May 25 2012
  • Mathematica
    Table[E*Gamma[n+1, 1] - 2, {n, 1, 30}] (* Jean-François Alcover, May 18 2018 *)

Formula

a(n) = n*(a(n-1)+2)-1 for n>1, a(1) = 0. - Alois P. Heinz, May 25 2012
Conjecture: a(n) +(-n-2)*a(n-1) +(2*n-1)*a(n-2) +(-n+2)*a(n-3)=0. - R. J. Mathar, Jun 23 2013 [Confirmed by Altug Alkan, May 18 2018]
a(n) = floor(e*n!) - 2. - Bernard Schott, Apr 21 2019

A072453 Shadow transform of A000522.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 02 2002

Keywords

Crossrefs

Programs

  • Maple
    A000522 := proc(n)
        add(n!/k!,k=0..n) ;
    end proc:
    shadD := proc(a)
        local s,n ;
        s := {} ;
        for n from 0 to a-1 do
            if A000522(n) mod a = 0 then
                s := s union {n} ;
            end if;
        end do:
        s ;
    end proc:
    A072453 := proc(a)
        nops(shadD(a)) ;
    end proc: # R. J. Mathar, Jun 24 2013
    # second Maple program:
    b:= proc(n) option remember; n*b(n-1)+1 end: b(0):=1:
    a:= n-> add(`if`(irem(b(j), n)=0, 1, 0), j=0..n-1):
    seq(a(n), n=0..150);  # Alois P. Heinz, Jun 28 2018
  • Mathematica
    b[n_] := b[n] = n*b[n - 1] + 1 ; b[0] = 1;
    a[n_] := Sum[If[Mod[b[j], n] == 0, 1, 0], {j, 0, n - 1}];
    a /@ Range[0, 104] (* Jean-François Alcover, Jan 15 2020, after Alois P. Heinz *)

Extensions

More terms from Christian G. Bower, Jun 08 2005

A073591 a(n) = A000522(n) + 1.

Original entry on oeis.org

2, 3, 6, 17, 66, 327, 1958, 13701, 109602, 986411, 9864102, 108505113, 1302061346, 16926797487, 236975164806, 3554627472077, 56874039553218, 966858672404691, 17403456103284422, 330665665962404001, 6613313319248080002
Offset: 0

Views

Author

Vladeta Jovovic, Aug 28 2002

Keywords

Comments

a(n) is an upper bound on the Ramsey numbers in A003323. - D. G. Rogers, Aug 27 2006
There is a nice derivation of the recurrence relation given in the Walker reference.

Crossrefs

Programs

  • Maple
    a:= proc(n) a(n):= `if`(n=0, 2, n*a(n-1)-n+2) end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Feb 17 2014
  • Mathematica
    f[n_] := n*(f[n - 1] - 1) + 2;f[0]=2; ff[n_]:=(1/(1+n))(1+E*Gamma[1+n, 1]-E*(n^2)*Gamma[1+n, 1]+E*n*Gamma[2+n, 1]) (Spindler)
    Table[FunctionExpand[Gamma[n, 1] E] + 1, {n, 2, 29}] (* Vincenzo Librandi, Feb 17 2014 *)

Formula

Conjecture: a(n) +(-n-2)*a(n-1) +(2*n-1)*a(n-2) +(-n+2)*a(n-3)=0. - R. J. Mathar, Feb 16 2014
a(n) = n*(a(n-1) - 1) + 2. - Georg Fischer, Dec 24 2023 [from the Walker reference, p. 55]

A124780 a(n) = gcd(A(n), A(n+2)) where A(n) = A000522(n) = Sum_{k=0..n} n!/k!.

Original entry on oeis.org

1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 13, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 26, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 37, 2, 13, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 26, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 65, 2, 1, 2, 1, 10, 1, 2, 1, 74, 5, 2, 1, 26, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 13, 2, 1, 2, 5, 2, 1, 2, 1
Offset: 0

Views

Author

Jonathan Sondow, Nov 07 2006

Keywords

Comments

a(n) divides n+3 because A(n+2) = (n+2)(n+1)*A(n) + n+3.

Examples

			a(2) = gcd(A(2), A(4)) = gcd(5, 65) = 5.
		

Crossrefs

Programs

  • Mathematica
    (A[n_] := Sum[n!/k!, {k, 0, n}]; Table[GCD[A[n],A[n+2]], {n,0,100}])
    GCD[#[[1]],#[[3]]]&/@Partition[Table[Sum[n!/k!,{k,0,n}],{n,0,100}],3,1] (* Harvey P. Dale, Jun 14 2022 *)
  • PARI
    A000522(n) = sum(k=0, n, binomial(n, k)*k!); \\ This function from Joerg Arndt, Dec 14 2014
    A124780(n) = gcd(A000522(n),A000522(n+2)); \\ Antti Karttunen, Jul 07 2017

Formula

a(n) = gcd(A000522(n), A000522(n+2)) = (n+3)/A124782(n)

A124782 a(n) = (n+3)/gcd(A(n), A(n+2)) where A(n) = A000522(n) = Sum_{k=0..n} n!/k!.

Original entry on oeis.org

3, 2, 1, 3, 7, 4, 9, 1, 11, 6, 1, 7, 3, 8, 17, 9, 19, 2, 21, 11, 23, 12, 5, 1, 27, 14, 29, 3, 31, 16, 33, 17, 7, 18, 1, 19, 3, 4, 41, 21, 43, 22, 9, 23, 47, 24, 49, 5, 51, 2, 53, 27, 11, 28, 57, 29, 59, 6, 61, 31, 63, 32, 1, 33, 67, 34, 69, 7, 71, 36, 73, 1, 15, 38, 77, 3, 79, 8, 81, 41
Offset: 0

Views

Author

Jonathan Sondow, Nov 07 2006

Keywords

Comments

a(n) is an integer since A(n+2) = (n+2)(n+1)*A(n) + n+3.

Examples

			a(3) = (3+3)/gcd(A(3), A(5)) = 6/gcd(16, 326) = 6/2 = 3.
		

Crossrefs

Programs

Formula

a(n) = (n+3)/A124780(n) = (n+3)/gcd(A000522(n), A000522(n+2)).

A101799 a(n)= det[A000522(i+j+1)], i,j=0...n, is the Hankel determinant of order n+1 of the arrangements numbers, s. A000522; a(n) = product( (p!)^2,p=0..n )*(n+1)!*LaguerreL(n+1,0,-1), n=0,1..., where LaguerreL(n,lambda,x) are generalized Laguerre polynomials; a(n)=A055209(n)*A002720(n+1);.

Original entry on oeis.org

2, 7, 136, 30096, 128231424, 15917683507200, 81063451589345280000, 22675515428700722036736000000, 449302248871829829537656890982400000000, 790103237429135552913731284331032467210240000000000
Offset: 0

Views

Author

Karol A. Penson, Dec 16 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Det[Table[E*Gamma[i+j+2, 1] // FunctionExpand, {i, 0, n}, {j, 0, n}]];
    Table[a[n], {n, 0, 9}] (* Jean-François Alcover, May 23 2016 *)
    Table[BarnesG[n+2]^2 * (n+1)! * LaguerreL[n+1, 0, -1], {n, 0, 12}] (* Vaclav Kotesovec, May 11 2021 *)

Formula

a(n) ~ 2^(n+1/2) * Pi^(n+1) * n^(n^2 + 3*n + 25/12) / (A^2 * exp(3*n^2/2 + 3*n - 2*sqrt(n) + 1/3)), where A is the Glaisher-Kinkelin constant A074962. - Vaclav Kotesovec, May 11 2021

A121726 Sum sequence A000522 then subtract 0,1,2,3,4,5,...

Original entry on oeis.org

1, 2, 6, 21, 85, 410, 2366, 16065, 125665, 1112074, 10976174, 119481285, 1421542629, 18348340114, 255323504918, 3809950976993, 60683990530209, 1027542662934898, 18430998766219318, 349096664728623317, 6962409983976703317, 145841989688186383338, 3201192743180799343822
Offset: 1

Views

Author

Alford Arnold, Aug 17 2006

Keywords

Comments

Let aut(p) denote the size of the centralizer of the partition p (see A339016 for the definition). Then a(n) = Sum_{p in P} n!/aut(p), where P are the partitions of n with largest part k and length n + 1 - k. - Peter Luschny, Nov 19 2020

Examples

			A000522 begins     1 2 5 16 65 326 ...
with sums          1 3 8 24 89 415 ...
so sequence begins 1 2 6 21 85 410 ...
.
From _Peter Luschny_, Nov 19 2020: (Start):
The combinatorial interpretation is illustrated by this computation of a(5):
5! / aut([5])             = 120 / A339033(5, 1) = 120/5   = 24
5! / aut([4, 1])          = 120 / A339033(5, 2) = 120/4   = 30
5! / aut([3, 1, 1])       = 120 / A339033(5, 3) = 120/6   = 20
5! / aut([2, 1, 1, 1])    = 120 / A339033(5, 4) = 120/12  = 10
5! / aut([1, 1, 1, 1, 1]) = 120 / A339033(5, 5) = 120/120 =  1
--------------------------------------------------------------
                                                Sum: a(5) = 85
(End)
		

Crossrefs

Also the row sums of A092271.

Programs

  • Mathematica
    f[list_] :=Total[list]!/Apply[Times, list]/Apply[Times, Map[Length, Split[list]]!]; Table[Total[Map[f, Select[Partitions[n], Count[#, Except[1]] == 1 &]]] + 1, {n, 1, 20}] (* Geoffrey Critzer, Nov 07 2015 *)
  • PARI
    A000522(n)={ return( sum(k=0,n,n!/k!)) ; } A121726(n)={ return(sum(k=0,n-1,A000522(k))-n+1) ; } { for(n=1,25, print1(A121726(n),",") ; ) ; } \\ R. J. Mathar, Sep 02 2006
    
  • SageMath
    def A121726(n):
        def h(n, k):
            if n == k: return 1
            return factorial(n)//((n + 1 - k)*factorial(k - 1))
        return sum(h(n, k) for k in (1..n))
    print([A121726(n) for n in (1..23)])
    # Demonstrates the combinatorial view:
    def A121726(n):
        if n == 0: return 1
        f = factorial(n); S = 0
        for k in (0..n):
            for p in Partitions(n, max_part=k, inner=[k], length=n+1-k):
                S += (f // p.aut())
        return S
    print([A121726(n) for n in (1..23)]) # Peter Luschny, Nov 20 2020

Formula

a(n) = A006231(n) + 1 = A002104(n) - (n-1). - Franklin T. Adams-Watters, Aug 29 2006
E.g.f.: exp(x)*(log(1/(1-x)) - x + 1). - Geoffrey Critzer, Nov 07 2015

Extensions

More terms from Franklin T. Adams-Watters, Aug 29 2006
More terms from R. J. Mathar, Sep 02 2006

A138761 a(n) is the smallest member of A000522 divisible by 2^n, where A000522(m) = total number of arrangements of a set with m elements.

Original entry on oeis.org

1, 2, 16, 16, 16, 330665665962404000, 4216377920843140187197325631474390438452208808916276571342090223552
Offset: 0

Views

Author

Jonathan Sondow, Apr 01 2008

Keywords

Comments

a(n) < A000522(2^n) for n > 0; see Sondow and Schalm, Proposition A.13 part (ii).

Examples

			a(5) = A000522(19) = 330665665962404000 because that is the smallest member of A000522 divisible by 2^5.
		

References

  • J. Sondow and K. Schalm, Which partial sums of the Taylor series for e are convergents to e? (and a link to the primes 2, 5, 13, 37, 463), Gems in Experimental Mathematics (T. Amdeberhan, L. A. Medina, and V. H. Moll, eds.), Contemporary Mathematics, vol. 517, Amer. Math. Soc., Providence, RI, 2010.

Crossrefs

Programs

  • Mathematica
    a522[n_] := E Gamma[n + 1, 1];
    (* b = A127014 *)
    b[1] = 1; b[n_] := b[n] = For[k = b[n - 1], True, k++, If[Mod[a522[k], 2^n] == 0, Return[k]]];
    a[0] = 1; a[n_] := a522[b[n]];
    Table[a[n], {n, 0, 6}] (* Jean-François Alcover, Feb 20 2019 *)

Formula

a(n) = A000522(A127014(n)) = Sum_{k=0..A127014(n)} A127014(n)!/k! for n > 0.
Showing 1-10 of 288 results. Next