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

A247981 Primes dividing nonzero terms in A003095: the iterates of x^2 + 1 starting at 0.

Original entry on oeis.org

2, 5, 13, 41, 137, 149, 229, 293, 397, 509, 661, 677, 709, 761, 809, 877, 881, 1217, 1249, 1277, 1601, 2053, 2633, 3637, 3701, 4481, 4729, 5101, 5449, 5749, 5861, 7121, 7237, 7517, 8009, 8089, 8117, 8377, 9661, 14869, 14897, 18229, 19609, 20369, 20441, 21493, 22349, 23917, 24781, 24977, 25717
Offset: 1

Views

Author

Keywords

Comments

Relative density in the primes is 0, see Jones theorem 5.5.

Examples

			2 and 13 are in the sequence since A003095(4) = 26. 3 is not in the sequence since it does not divide any member of A003095.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[d=0; t=0; Do[t=Mod[t^2+1,Prime[j]]; If[t==0,d=1],{k,1,Prime[j]}]; If[d==1,Prime[j],0],{j,1,1000}],#!=0&] (* Vaclav Kotesovec, Oct 04 2014 *)
  • PARI
    is(p)=my(v=List([1]),t=1); while(t,t=(t^2+1)%p; for(i=1,#v, if(v[i]==t, return(0))); listput(v,t)); isprime(p)

Formula

a(n) << exp(k^n) for some constant k > 0, see Jones theorem 6.1. In particular this sequence is infinite. - Charles R Greathouse IV, Sep 28 2014

A076949 Decimal expansion of c, the constant such that lim n -> infinity A003095(n)/c^(2^n) = 1.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Nov 27 2002

Keywords

Examples

			1.2259024435287485386279474959130085213212293209696612823177009072552339975...
		

Crossrefs

Programs

  • Magma
    function A003095(n)
      if n eq 0 then return 0;
      else return 1 + A003095(n-1)^2;
      end if; return A003095;
    end function;
    function S(n)
      if n eq 1 then return Log(2)/2;
      else return S(n-1) + Log(1 + 1/A003095(n)^2)/2^n;
      end if; return S;
    end function;
    SetDefaultRealField(RealField(120)); Exp(S(12)/2); // G. C. Greubel, Nov 29 2022
    
  • Mathematica
    A003095[n_]:= A003095[n]= If[n==0, 0, 1 + A003095[n-1]^2];
    S[n_]:= S[n]= If[n==1, Log[2]/2, S[n-1] + Log[1 + 1/A003095[n]^2]/2^n];
    RealDigits[Exp[S[13]/2], 10, 120][[1]] (* G. C. Greubel, Nov 29 2022 *)
  • SageMath
    @CachedFunction
    def A003095(n): return 0 if (n==0) else 1 + A003095(n-1)^2
    @CachedFunction
    def S(n): return log(2)/2 if (n==1) else S(n-1) + log(1 + 1/(A003095(n))^2)/2^n
    numerical_approx( exp(S(12)/2), digits=120) # G. C. Greubel, Nov 29 2022

Formula

Equals sqrt(A077496). - Vaclav Kotesovec, Dec 17 2014

A273044 Discriminator of A003095.

Original entry on oeis.org

1, 2, 5, 9, 10, 10, 17, 29, 29, 29, 47, 47, 47, 61, 71, 71, 71, 101, 109, 121, 121, 121, 121, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 274, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278
Offset: 1

Views

Author

Jeffrey Shallit, May 13 2016

Keywords

Comments

The discriminator of a sequence is the least integer k such that the first n terms are pairwise incongruent, modulo k.

Crossrefs

Programs

  • Maple
    N:= 1000: # to get a(1)..a(n)
    nmax:= 0:
    for m from 1 while nmax <= N do
      a:= 1 mod m; A:= {a};
      for n from 1 while nops(A) = n do
        a:= a^2 +1 mod m;
        A:= A union {a};
      od:
      for k from nmax+1 to n-1 do v[k]:= m od:
      nmax:= max(nmax, n-1);
    od:
    seq(v[k], k=1..N); # Robert Israel, May 13 2016

Extensions

a(31)-a(56) from Robert Israel, May 13 2016

A328700 Numbers k dividing nonzero terms in A003095.

Original entry on oeis.org

1, 2, 5, 10, 13, 26, 41, 65, 82, 130, 137, 149, 205, 229, 274, 293, 298, 397, 410, 458, 509, 533, 586, 661, 677, 685, 709, 745, 761, 794, 809, 877, 881, 1018, 1066, 1145, 1217, 1249, 1277, 1322, 1354, 1370, 1418, 1465, 1490, 1522, 1601, 1618, 1754, 1762, 1781, 1937, 1985, 2053, 2290
Offset: 1

Views

Author

Jianing Song, Oct 26 2019

Keywords

Comments

k is a term if and only if A328699(k) = 0, in which case all the indices m such that k divides A003095(m) are m = t*A248218(k), t = 0, 1, 2, 3, ...

Examples

			41 divides A003095(7) = 210066388901, so 41 is in this sequence. In addition, 41 divides A003095(m) if and only if 7 divides m.
29 is not a term: {A003095(n) mod 29} = {0, 1, 2, 5, 26, 10, 14, 23, 8, 7, 21, 7, 21, 7, 21, ...}, so 29 does not divides A003095(m) for any m > 0.
		

Crossrefs

The primes in this sequence are given by A247981.

Programs

  • PARI
    v(n) = my(v=[0],k,flag=1); for(i=2, n+1, k=(v[#v]^2+1)%n; v=concat(v, k); for(j=1, i-1, if(v[j]==k, flag=0)); if(flag==0, break())); v;
    is(n) = !(v(n)[#v(n)]);

A125046 Partial sums of A003095.

Original entry on oeis.org

0, 1, 3, 8, 34, 711, 459041, 210066847942, 44127887746116242835744, 1947270476915296449559747573381595046695626949, 3791862310265926082868235028027893277370233154194659061677030600277515827791936222020978975
Offset: 0

Views

Author

Jonathan Vos Post, Jan 08 2007

Keywords

Crossrefs

Programs

Formula

a(n) = a(n-1)^2 - 2a(n-1)a(n-2)+a(n-2)^2 + a(n-1) + 1 for n > 1. [Charles R Greathouse IV, Dec 29 2011]
a(n) ~ c^(2^n), where c = A076949 = 1.225902443528748538627947495913... . - Vaclav Kotesovec, Dec 18 2014

A034870 Even-numbered rows of Pascal's triangle.

Original entry on oeis.org

1, 1, 2, 1, 1, 4, 6, 4, 1, 1, 6, 15, 20, 15, 6, 1, 1, 8, 28, 56, 70, 56, 28, 8, 1, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1, 1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1
Offset: 0

Views

Author

Keywords

Comments

The sequence of row lengths of this array is [1,3,5,7,9,11,13,...]= A005408(n), n>=0.
Equals X^n * [1,0,0,0,...] where X = an infinite tridiagonal matrix with (1,1,1,...) in the main and subsubdiagonal and (2,2,2,...) in the main diagonal. X also = a triangular matrix with (1,2,1,0,0,0,...) in each column. - Gary W. Adamson, May 26 2008
a(n,m) has the following interesting combinatoric interpretation. Let s(n,m) equal the set of all base-4, n-digit numbers with n-m more 1-digits than 2-digits. For example s(2,1) = {10,01,13,31} (note that numbers like 1 are left-padded with 0's to ensure that they have 2 digits). Notice that #s(2,1) = a(2,1) with # indicating cardinality. This is true in general. a(n,m)=#s(n,m). In words, a(n,m) gives the number of n-digit, base-4 numbers with n-m more 1 digits than 2 digits. A proof is provided in the Links section. - Russell Jay Hendel, Jun 23 2015

Examples

			Triangle begins:
  1;
  1,  2,  1;
  1,  4,  6,   4,   1;
  1,  6, 15,  20,  15,   6,   1;
  1,  8, 28,  56,  70,  56,  28,   8,   1;
  1, 10, 45, 120, 210, 252, 210, 120,  45,  10,  1;
  1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1;
		

Crossrefs

Cf. A000302 (row sums, powers of 4), alternating row sums are 0, except for n=0 which gives 1.

Programs

  • Haskell
    a034870 n k = a034870_tabf !! n !! k
    a034870_row n = a034870_tabf !! n
    a034870_tabf = map a007318_row [0, 2 ..]
    -- Reinhard Zumkeller, Apr 19 2012, Apr 02 2011
    
  • Magma
    /* As triangle: */ [[Binomial(n,k): k in [0..n]]: n in [0.. 15 by 2]]; // Vincenzo Librandi, Jul 16 2015
    
  • Maple
    T := (n,k) -> simplify(GegenbauerC(`if`(kPeter Luschny, May 08 2016
  • Mathematica
    Flatten[Table[Binomial[n,k],{n,0,20,2},{k,0,n}]] (* Harvey P. Dale, Dec 15 2014 *)
  • Maxima
    taylor(1/(1-x*(y+1)^2),x,0,10,y,0,10); /* Vladimir Kruchinin, Nov 22 2020 */
    
  • Sage
    flatten([[binomial(2*n, k) for k in (0..2*n)] for n in (0..12)]) # G. C. Greubel, Mar 18 2022

Formula

T(n, m) = binomial(2*n, m), 0<= m <= 2*n, 0<=n, else 0.
G.f. for column m=2*k sequence: (x^k)*Pe(k, x)/(1-x)^(2*k+1), k>=0; for column m=2*k-1 sequence (x^k)*Po(k, x)/(1-x)^(2*k), k>=1, with the row polynomials Pe(k, x) := sum(A091042(k, m)*x^m, m=0..k) and Po(k, x) := 2*sum(A091044(k, m)*x^m, m=0..k-1); see also triangle A091043.
From Paul D. Hanna, Apr 18 2012: (Start)
Let A(x) be the g.f. of the flattened sequence, then:
G.f.: A(x) = Sum_{n>=0} x^(n^2) * (1+x)^(2*n).
G.f.: A(x) = Sum_{n>=0} x^n*(1+x)^(2*n) * Product_{k=1..n} (1 - (1+x)^2*x^(4*k-3)) / (1 - (1+x)^2*x^(4*k-1)).
G.f.: A(x) = 1/(1 - x*(1+x)^2/(1 + x*(1-x^2)*(1+x)^2/(1 - x^5*(1+x)^2/(1 + x^3*(1-x^4)*(1+x)^2/(1 - x^9*(1+x)^2/(1 + x^5*(1-x^6)*(1+x)^2/(1 - x^13*(1+x)^2/(1 + x^7*(1-x^8)*(1+x)^2/(1 - ...))))))))), a continued fraction.
(End)
From Peter Bala, Jul 14 2015: (Start)
Denote this array by P. Then P * transpose(P) is the square array ( binomial(2*n + 2*k, 2*k) )n,k>=0, which, read by antidiagonals, is A086645.
Transpose(P) is a generalized Riordan array (1, (1 + x)^2) as defined in the Bala link.
Let p(x) = (1 + x)^2. P^2 gives the coefficients in the expansion of the polynomials ( p(p(x)) )^n, P^3 gives the coefficients in the expansion of the polynomials ( p(p(p(x))) )^n and so on.
Row sums are 2^(2*n); row sums of P^2 are 5^(2*n), row sums of P^3 are 26^(2*n). In general, the row sums of P^k, k = 0,1,2,..., are equal to A003095(k)^(2*n).
The signed version of this array ( (-1)^k*binomial(2*n,k) )n,k>=0 is a left-inverse for A034839.
A034839 * P = A080928. (End)
T(n, k) = GegenbauerC(m, -n, -1) where m = k if kPeter Luschny, May 08 2016
G.f.: 1/(1-x*(y+1)^2). - Vladimir Kruchinin, Nov 22 2020

A001699 Number of binary trees of height n; or products (ways to insert parentheses) of height n when multiplication is non-commutative and non-associative.

Original entry on oeis.org

1, 1, 3, 21, 651, 457653, 210065930571, 44127887745696109598901, 1947270476915296449559659317606103024276803403, 3791862310265926082868235028027893277370233150300118107846437701158064808916492244872560821
Offset: 0

Views

Author

Keywords

Comments

Approaches 1.5028368...^(2^n), see A077496. Row sums of A065329 as square array. - Henry Bottomley, Oct 29 2001. Also row sum of square array A073345 (AK).

Examples

			G.f. = 1 + x + 3*x^2 + 21*x^3 + 651*x^4 + 457653*x^5 + ... - _Michael Somos_, Jun 02 2019
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 307.
  • I. M. H. Etherington, On non-associative combinations, Proc. Royal Soc. Edinburgh, 59 (Part 2, 1938-39), 153-162.
  • I. M. H. Etherington, Some problems of non-associative combinations (I), Edinburgh Math. Notes, 32 (1940), pp. i-vi. Part II is by A. Erdelyi and I. M. H. Etherington, and is on pages vii-xiv of the same issue.
  • T. K. Moon, Enumerations of binary trees, types of trees and the number of reversible variable length codes, submitted to Discrete Applied Mathematics, 2000.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Row sums of A065329.
Column sums of A335919, A335920.

Programs

  • Maple
    s := proc(n) local i,j,ans; ans := [ 1 ]; for i to n do ans := [ op(ans),2*(add(j,j=ans)-ans[ i ])*ans[ i ]+ans[ i ]^2 ] od; RETURN(ans); end; s(10);
  • Mathematica
    a[0] = 1; a[n_] := a[n] = 2*a[n-1]*Sum[a[k], {k, 0, n-2}] + a[n-1]^2; Table[a[n], {n, 0, 9}] (* Jean-François Alcover, May 16 2012 *)
    a[ n_] := If[ n < 2, Boole[n >= 0], With[{u = a[n - 1], v = a[n - 2]}, u (u + v + u/v)]]; (* Michael Somos, Jun 02 2019 *)
  • PARI
    {a(n) = if( n<=1, n>=0, a(n-1) * (a(n-1) + a(n-2) + a(n-1) / a(n-2)))}; /* Michael Somos, 2000 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def a(n): return 1 if n <= 1 else a(n-1) * (a(n-1) + a(n-2) + a(n-1)//a(n-2))
    print([a(n) for n in range(10)]) # Michael S. Branicky, Nov 10 2022 after Michael Somos

Formula

a(n+1) = 2*a(n)*(a(0) + ... + a(n-1)) + a(n)^2.
a(n+1) = a(n)^2 + a(n) + a(n)*sqrt(4*a(n)-3), if n > 0.
a(n) = A003095(n+1) - A003095(n) = A003095(n)^2 - A003095(n) + 1. - Henry Bottomley, Apr 26 2001; offset of LHS corrected by Anindya Bhattacharyya, Jun 21 2013
a(n) = A059826(A003095(n-1)).
From Peter Bala, Feb 03 2017: (Start)
a(n) = Product_{k = 1..n} A213437(k).
a(n) + a(n-1) = A213437(n+1) - A213437(n). (End)
a(n) = -a(n-2)^3 + a(n-1)^2 + 3*a(n-1)*a(n-2) + 2*a(n-2)^2 + 2*a(n-1) - 4*a(n-2) (see Narváez link for proof). - Boštjan Gec, Oct 10 2024

Extensions

Minor edits by Vaclav Kotesovec, Oct 04 2014

A038044 Shifts left under transform T where Ta is a DCONV a.

Original entry on oeis.org

1, 1, 2, 4, 9, 18, 40, 80, 168, 340, 698, 1396, 2844, 5688, 11456, 22948, 46072, 92144, 184696, 369392, 739536, 1479232, 2959860, 5919720, 11842696, 23685473, 47376634, 94753940, 189519576, 379039152, 758102900, 1516205800
Offset: 1

Views

Author

Keywords

Crossrefs

Positions of odd terms are given by A003095. Other self-convolved sequences: A000108, A007460 - A007464, A025192, A061922, A062177.
Column k=1 of A144324 and A144823. - Alois P. Heinz, Nov 04 2012
Cf. A038040.
Cf. A000010.

Programs

  • Haskell
    import Data.Function (on)
    a038044 n = a038044_list !! (n-1)
    a038044_list = 1 : f 1 [1] where
       f x ys = y : f (x + 1) (y:ys) where
         y = sum $ zipWith ((*) `on` a038044) divs $ reverse divs
             where divs = a027750_row x
    -- Reinhard Zumkeller, Jan 21 2014
  • Maple
    with(numtheory); EIGENbyDIRCONV := proc(upto_n) local n,a,j,i,s,m; a := [1]; for i from 1 to upto_n do s := 0; m := convert(divisors(i),set); n := nops(m); for j from 1 to n do s := s+(a[m[j]]*a[m[(n-j)+1]]); od; a := [op(a),s]; od; RETURN(a); end;
  • Mathematica
    dc[b_, c_] := Module[{p}, p[n_] := p[n] = Sum[b[d]*c[n/d], {d, If[n<0, {}, Divisors[n]]}]; p]; A[n_, k_] := Module[{f, b, t}, b[1] = dc[f, f]; For[t = 2, t <= k, t++, b[t] = dc[b[t-1], b[t-1]]]; f = Function[m, If[m == 1, 1, b[k][m-1]]]; f[n]]; a[n_] := A[n, 1]; Array[a, 40] (* Jean-François Alcover, Mar 20 2017, after A144324 *)

Formula

From Benoit Cloitre, Aug 29 2004: (Start)
a(n+1) = Sum_{d|n} a(d)*a(n/d), a(1) = 1.
a(prime(k)+1) = 2*a(prime(k));
a(n) is asymptotic to c*2^n where c=0.353030198... (End)
G.f.: A(x) = Sum_{n>=1} a(n)*x^n = x * (1 + Sum_{i>=1} Sum_{j>=1} a(i)*a(j)*x^(i*j)). - Ilya Gutkovskiy, May 01 2019 [modified by Ilya Gutkovskiy, May 09 2019]
a(n+1) = Sum_{k=1..n} a(gcd(n,k))*a(n/gcd(n,k))/phi(n/gcd(n,k)) where phi = A000010. - Richard L. Ollerton, May 19 2021

A309049 Number T(n,k) of (binary) max-heaps on n elements from the set {0,1} containing exactly k 0's; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 3, 4, 4, 2, 1, 1, 1, 4, 6, 6, 5, 2, 1, 1, 1, 4, 7, 8, 7, 5, 2, 1, 1, 1, 5, 10, 12, 11, 8, 5, 2, 1, 1, 1, 5, 11, 16, 17, 13, 9, 5, 2, 1, 1, 1, 6, 15, 23, 27, 24, 16, 10, 5, 2, 1, 1, 1, 6, 16, 27, 34, 34, 27, 18, 11, 5, 2, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 09 2019

Keywords

Comments

Also the number T(n,k) of (binary) min-heaps on n elements from the set {0,1} containing exactly k 1's.
The sequence of column k satisfies a linear recurrence with constant coefficients of order A063915(k).

Examples

			T(6,0) = 1: 111111.
T(6,1) = 3: 111011, 111101, 111110.
T(6,2) = 4: 110110, 111001, 111010, 111100.
T(6,3) = 4: 101001, 110010, 110100, 111000.
T(6,4) = 2: 101000, 110000.
T(6,5) = 1: 100000.
T(6,6) = 1: 000000.
T(7,4) = T(7,7-3) = A000108(3) = 5: 1010001, 1010010, 1100100, 1101000, 1110000.
Triangle T(n,k) begins:
  1;
  1, 1;
  1, 1,  1;
  1, 2,  1,  1;
  1, 2,  2,  1,  1;
  1, 3,  3,  2,  1,  1;
  1, 3,  4,  4,  2,  1,  1;
  1, 4,  6,  6,  5,  2,  1,  1;
  1, 4,  7,  8,  7,  5,  2,  1,  1;
  1, 5, 10, 12, 11,  8,  5,  2,  1, 1;
  1, 5, 11, 16, 17, 13,  9,  5,  2, 1, 1;
  1, 6, 15, 23, 27, 24, 16, 10,  5, 2, 1, 1;
  1, 6, 16, 27, 34, 34, 27, 18, 11, 5, 2, 1, 1;
  ...
		

Crossrefs

Columns k=0-10 give: A000012, A110654, A114220 (for n>0), A326504, A326505, A326506, A326507, A326508, A326509, A326510, A326511.
Row sums give A091980(n+1).
T(2n,n) gives A309050.
Rows reversed converge to A000108.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, (g-> (f-> expand(
          x^n+b(f)*b(n-1-f)))(min(g-1, n-g/2)))(2^ilog2(n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):
    seq(T(n), n=0..14);
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Function[g, Function[f, Expand[x^n + b[f]*b[n - 1 - f]]][Min[g - 1, n - g/2]]][2^Floor[Log[2, n]]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n]];
    T /@ Range[0, 14] // Flatten (* Jean-François Alcover, Oct 04 2019, after Alois P. Heinz *)

Formula

Sum_{k=0..n} k * T(n,k) = A309051(n).
Sum_{k=0..n} (n-k) * T(n,k) = A309052(n).
Sum_{k=0..2^n-1} T(2^n-1,k) = A003095(n+1).
Sum_{k=0..2^n-1} (2^n-1-k) * T(2^n-1,k) = A024358(n).
Sum_{k=0..n} (T(n,k) - T(n-1,k)) = A168542(n).
T(m,m-n) = A000108(n) for m >= 2^n-1 = A000225(n).
T(2^n-1,k) = A202019(n+1,k+1).

A000774 a(n) = n!*(1 + Sum_{i=1..n} 1/i).

Original entry on oeis.org

1, 2, 5, 17, 74, 394, 2484, 18108, 149904, 1389456, 14257440, 160460640, 1965444480, 26029779840, 370643938560, 5646837369600, 91657072281600, 1579093018675200, 28779361764249600, 553210247226470400, 11185850044938240000, 237335752951879680000
Offset: 0

Views

Author

Keywords

Comments

Number of {12,12*,21}-avoiding signed permutations in the hyperoctahedral group.
Let M be the n X n matrix with M( i, i ) = i+1, other entries = 1. Then a(n) = det(M); example: a(3) = 17 = det([2, 1, 1; 1, 3, 1; 1, 1, 4]). - Philippe Deléham, Jun 13 2005.
With offset 1: number of permutations of the n-set into at most two cycles. - Joerg Arndt, Jun 22 2009
A ball goes with probability 1/(k+1) from place k to a place j with j=0..k; a(n)/n! is the average number of steps from place n to place 0. - Paul Weisenhorn, Jun 03 2010
a(n) is a multiple of A025527(n). - Charles R Greathouse IV, Oct 16 2012

Examples

			(1-x)^-1 * (1 - log(1-x)) = 1 + 2*x + 5/2*x^2 + 17/6*x^3 + ...
G.f.: 1+x = 1/(1+x) + 2*x/((1+x)*(1+2*x)) + 5*x^2/((1+x)*(1+2*x)*(1+3*x)) + 17*x^3/((1+x)*(1+2*x)*(1+3*x)*(1+4*x)) + 74*x^4/((1+x)*(1+2*x)*(1+3*x)*(1+4*x)*(1+5*x)) +...
		

Crossrefs

Cf. A000254, A000776. Same as A081046 apart from signs.

Programs

  • Maple
    A000774 := proc(n) local i,j; j := 0; for i to n do j := j+1/i od; (j+1)*n! end;
    ZL :=[S, {S = Set(Cycle(Z),3 > card)}, labelled]: seq(combstruct[count](ZL, size=n), n=1..20); # Zerinvary Lajos, Mar 25 2008
    a[0]:=1: p:=1: for n from 1 to 20 do
    a[n]:=n*a[n-1]+p: p:=p*n: end do: # Paul Weisenhorn, Jun 03 2010
  • Mathematica
    Table[n!(1+Sum[1/i,{i,n}]),{n,0,30}] (* Harvey P. Dale, Oct 03 2011 *)
  • PARI
    a(n)=n!*(1+sum(j=1,n, 1/j ));
    
  • PARI
    {a(n)=if(n==0, 1, polcoeff(1+x-sum(k=0, n-1, a(k)*x^k/prod(j=1, k+1, (1+j*x+x*O(x^n)) )), n))} /* Paul D. Hanna, Mar 01 2012 */

Formula

E.g.f.: A(x) = (1-x)^-1 * (1 - log(1-x)).
a(n+1) = (n+1)*a(n) + n!. - Jon Perry, Sep 26 2004
a(n) = A000254(n) + n!. - Mark van Hoeij, Jul 06 2010
G.f.: 1+x = Sum_{n>=0} a(n) * x^n / Product_{k=1..n+1} (1 + k*x). - Paul D. Hanna, Mar 01 2012
a(n) = Sum_{k=0..n} (k+1)*|s(n,k)|, where s(n,k) are Stirling numbers of the first kind (A008275). - Peter Luschny, Oct 16 2012
Conjecture: a(n) +(-2*n+1)*a(n-1) +(n-1)^2*a(n-2)=0. - R. J. Mathar, Nov 26 2012
Showing 1-10 of 61 results. Next