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

A002627 a(n) = n*a(n-1) + 1, a(0) = 0.

Original entry on oeis.org

0, 1, 3, 10, 41, 206, 1237, 8660, 69281, 623530, 6235301, 68588312, 823059745, 10699776686, 149796873605, 2246953104076, 35951249665217, 611171244308690, 11001082397556421, 209020565553572000, 4180411311071440001, 87788637532500240022
Offset: 0

Views

Author

Keywords

Comments

This sequence shares divisibility properties with A000522; each of the primes in A072456 divide only a finite number of terms of this sequence. - T. D. Noe, Jul 07 2005
Sum of the lengths of the first runs in all permutations of [n]. Example: a(3)=10 because the lengths of the first runs in the permutation (123),(13)2,(3)12,(2)13,(23)1 and (3)21 are 3,2,1,1,2 and 1, respectively (first runs are enclosed between parentheses). Number of cells in the last columns of all deco polyominoes of height n. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. a(n) = Sum_{k=1..n} k*A092582(n,k). - Emeric Deutsch, Aug 16 2006
Starting with offset 1 = eigensequence of an infinite lower triangular matrix with (1, 2, 3, ...) as the right border, (1, 1, 1, ...) as the left border, and the rest zeros. - Gary W. Adamson, Apr 27 2009
Sums of rows of the triangle in A173333, n > 0. - Reinhard Zumkeller, Feb 19 2010
if s(n) is a sequence defined as s(0) = x, s(n) = n*s(n-1)+k, n > 0 then s(n) = n!*x + a(n)*k. - Gary Detlefs, Feb 20 2010
Number of arrangements of proper subsets of n distinct objects, i.e., arrangements which are not permutations (where the empty set is considered a proper subset of any nonempty set); see example. - Daniel Forgues, Apr 23 2011
For n >= 0, A002627(n+1) is the sequence of sums of Pascal-like triangle with one side 1,1,..., and the other side A000522. - Vladimir Shevelev, Feb 06 2012
a(n) = q(n,1) for n >= 1, where the polynomials q are defined at A248669. - Clark Kimberling, Oct 11 2014
a(n) is the number of quasilinear weak orderings on {1,...,n}. - J. Devillet, Dec 22 2017

Examples

			[a(0), a(1), ...] = GAMMA(m+1,1)*exp(1) - GAMMA(m+1) = [exp(-1)*exp(1)-1, 2*exp(-1)*exp(1)-1, 5*exp(-1)*exp(1)-2, 16*exp(-1)*exp(1)-6, 65*exp(-1)*exp(1)-24, 326*exp(-1)*exp(1)-120, ...]. - _Stephen Crowley_, Jul 24 2009
From _Daniel Forgues_, Apr 25 2011: (Start)
  n=0: {}: #{} = 0
  n=1: {1}: #{()} = 1
  n=2: {1,2}: #{(),(1),(2)} = 3
  n=3: {1,2,3}: #{(),(1),(2),(3),(1,2),(2,1),(1,3),(3,1),(2,3),(3,2)} = 10
(End)
x + 3*x^2 + 10*x^3 + 41*x^4 + 206*x^5 + 1237*x^6 + 8660*x^7 + 69281*x^8 + ...
		

References

  • D. Singh, The numbers L(m,n) and their relations with prepared Bernoulli and Eulerian numbers, Math. Student, 20 (1952), 66-70.
  • 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

Second diagonal of A059922, cf. A056542.
Conjectured to give records in A130147.

Programs

  • Haskell
    a002627 n = a002627_list !! n
    a002627_list = 0 : map (+ 1) (zipWith (*) [1..] a002627_list)
    -- Reinhard Zumkeller, Mar 24 2013
    
  • Magma
    I:=[1]; [0] cat [n le 1 select I[n] else n*Self(n-1)+1:n in [1..21]]; // Marius A. Burtea, Aug 07 2019
  • Maple
    A002627 := proc(n)
        add( (n-j)!*binomial(n,j), j=1..n) ;
    end proc:
    seq(A002627(n),n=0..21) ; # Zerinvary Lajos, Jul 31 2006
  • Mathematica
    FoldList[ #1*#2 + 1 &, 0, Range[21]] (* Robert G. Wilson v, Oct 11 2005 *)
    RecurrenceTable[{a[0]==0,a[n]==n*a[n-1]+1},a,{n,30}] (* Harvey P. Dale, Mar 29 2015 *)
  • Maxima
    makelist(sum(n!/k!,k,1,n),n,0,40); /* Emanuele Munarini, Jun 20 2014 */
    
  • PARI
    a(n)= n!*sum(k=1,n, 1/k!); \\ Joerg Arndt, Apr 24 2011
    

Formula

a(n) = n! * Sum_{k=1..n} 1/k!.
a(n) = A000522(n) - n!. - Michael Somos, Mar 26 1999
a(n) = floor( n! * (e-1) ), n >= 1. - Amarnath Murthy, Mar 08 2002
E.g.f.: (exp(x)-1)/(1-x). - Mario Catalani (mario.catalani(AT)unito.it), Feb 06 2003
Binomial transform of A002467. - Ross La Haye, Sep 21 2004
a(n) = Sum_{j=1..n} (n-j)!*binomial(n,j). - Zerinvary Lajos, Jul 31 2006
a(n) = 1 + Sum_{k=0..n-1} k*a(k). - Benoit Cloitre, Jul 26 2008
a(m) = Integral_{s=0..oo} ((1+s)^m - s^m)*exp(-s) = GAMMA(m+1,1) * exp(1) - GAMMA(m+1). - Stephen Crowley, Jul 24 2009
From Sergei N. Gladkovskii, Jul 05 2012: (Start)
a(n+1) = A000522(n) + A001339(n) - A000142(n+1);
E.g.f.: Q(0)/(1-x), where Q(k)= 1 + (x-1)*k!/(1 - x/(x + (x-1)*(k+1)!/Q(k+1))); (continued fraction). (End)
E.g.f.: x/(1-x)*E(0)/2, where E(k)= 1 + 1/(1 - x/(x + (k+2)/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 01 2013
1/(e - 1) = 1 - 1!/(1*3) - 2!/(3*10) - 3!/(10*41) - 4!/(41*206) - ... (see A056542 and A185108). - Peter Bala, Oct 09 2013
Conjecture: a(n) + (-n-1)*a(n-1) + (n-1)*a(n-2) = 0. - R. J. Mathar, Feb 16 2014
The e.g.f. f(x) = (exp(x)-1)/(1-x) satisfies the differential equation: (1-x)*f'(x) - (2-x)*f(x) + 1, from which we can obtain the recurrence:
a(n+1) = a(n) + n! + Sum_{k=1..n} (n!/k!)*a(k). The above conjectured recurrence can be obtained from the original recurrence or from the differential equation satisfied by f(x). - Emanuele Munarini, Jun 20 2014
Limit_{n -> oo} a(n)/n! = exp(1) - 1. - Carmine Suriano, Jul 01 2015
Product_{n>=2} a(n)/(a(n)-1) = exp(1) - 1. See A091131. - James R. Buddenhagen, Jul 21 2019
a(n) = Sum_{k=0..n-1} k!*binomial(n,k). - Ridouane Oudra, Jun 17 2025

Extensions

Comments from Michael Somos

A130535 a(0)=a(1)=1; a(n+2) = a(floor((n+1)/a(n+1))) + a(floor(n/a(n))).

Original entry on oeis.org

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

Views

Author

Leroy Quet, Aug 09 2007

Keywords

Comments

The sequence is unbounded. - Rémy Sigrist, Aug 08 2019

Crossrefs

Cf. A130147.

Programs

  • C
    See Links section.
  • Maple
    a[0]:=1: a[1]:=1: for n from 0 to 80 do a[n+2]:= a[floor((n+1)/a[n+1])]+a[floor(n/a[n])] end do: seq(a[n],n=0..80); # Emeric Deutsch, Aug 13 2007

Extensions

More terms from Emeric Deutsch, Aug 13 2007

A132424 a(0)=1 and, for n>0, a(n)=a(Floor((n-1)/a[n-1]))+2.

Original entry on oeis.org

1, 3, 3, 3, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 7, 5, 7, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 5, 7, 5, 7, 5, 7, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 0

Views

Author

John W. Layman, Aug 20 2007

Keywords

Comments

Records are 1, 3, 5, 7, 9, ... and occur at {0,1,4,21,148,1333,14664,190633,2859496,48611433,...}, which appears to be A286286.

Crossrefs

Cf. A286286.
See A130147 for a related sequence.

Programs

  • Maple
    a[0]:=1: for n from 1 to 20000 do a[n]:=2+a[floor((n-1)/a[(n-1)])] end do: # N. J. A. Sloane, May 15 2017

A288914 a(1) = 2; a(n) = a(floor(n/a(n-1))) + 1 for n > 1.

Original entry on oeis.org

2, 3, 3, 3, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 4, 4, 4, 4, 4, 5, 5, 5, 4, 5, 4, 5, 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, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Altug Alkan, Jun 19 2017

Keywords

Comments

Least values of k such that a(k) = n are 1, 2, 6, 24, 120, 720, 5040, ... (n > 1).
These appear to be (n-1)!. Verified for 2 <= n <= 11. - Robert Israel, Jun 22 2017

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember;
      procname(floor(n/procname(n-1)))+1
    end proc:
    f(1):= 2:
    map(f, [$1..200]);# Robert Israel, Jun 22 2017
  • Mathematica
    a = {2}; Do[AppendTo[a, a[[Floor[n/a[[n - 1]] ] ]] + 1], {n, 2, 105}]; a (* Michael De Vlieger, Jun 21 2017 *)
  • PARI
    q=vector(10000); q[1]=2; for(n=2, #q, q[n] = q[n\q[n-1]]+1); q

A130193 a(0)=1. a(n+1) = a(ceiling(n/a(n))) + 1.

Original entry on oeis.org

1, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 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, 6, 5, 6, 5, 6, 5, 5
Offset: 0

Views

Author

Leroy Quet, Aug 05 2007

Keywords

Comments

Records 1,2,3,4,5,... appear at n = 0, 1, 2, 5, 18, 87, 518, 3621,.. which appears to be essentially A094294. - R. J. Mathar, Sep 10 2015

Crossrefs

Programs

  • Maple
    A130193 := proc(n)
        option remember;
        if n = 0 then
            1;
        else
            1+procname(ceil((n-1)/procname(n-1))) ;
        end if;
    end proc:
    seq(A130193(n),n=0..50) ; # R. J. Mathar, Sep 10 2015

A335901 a(n) = 2*a(floor((n-1)/a(n-1))) with a(1) = 1.

Original entry on oeis.org

1, 2, 2, 2, 4, 2, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4, 8, 4, 4, 4, 4, 4, 8, 4, 8, 4, 4, 4, 4, 4, 8, 4, 8, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8, 4, 8, 4, 8, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8, 4, 8, 4, 8, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 1

Views

Author

Altug Alkan, following a suggestion from Andrew R. Booker, Jun 29 2020

Keywords

Comments

Least k such that a(k) = 2^n are 1, 2, 5, 21, 169, 2705, ... (Conjecture: This sequence is A117261).

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember;
      2*procname(floor((n-1)/procname(n-1))) end proc:
    f(1):= 1:
    map(f, [$1..105]); # Robert Israel, Jul 08 2020
  • Mathematica
    a[1] = 1; a[n_] := a[n] = 2 * a[Floor[(n-1)/a[n-1]]]; Array[a, 100] (* Amiram Eldar, Jun 29 2020 *)
  • PARI
    a=vector(10^3); a[1]=1; for(n=2, #a, a[n]=2*a[(n-1)\a[n-1]]); a

A335925 a(n) = a(floor((n-1)/a(n-1))) + 1 with a(1) = 1.

Original entry on oeis.org

1, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 3, 3, 4, 4, 4, 3, 4, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 4, 4, 4, 4, 4, 5, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 5, 5, 5, 5, 4, 5, 4, 5, 4
Offset: 1

Views

Author

Altug Alkan, Jun 30 2020

Keywords

Comments

Least k such that a(k) = n are 1, 2, 5, 16, 65, 326, 1957, ... (Conjecture: This sequence is A000522).

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[Floor[(n - 1)/a[n - 1]]] + 1 ; Array[a, 100] (* Amiram Eldar, Jun 30 2020 *)
  • PARI
    a=vector(10^2); a[1]=1; for(n=2, #a, a[n]=a[(n-1)\a[n-1]]+1); a;
Showing 1-7 of 7 results.