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

A056199 a(n) = n * a(n-1) - Sum_{k=1..n-2} a(k) with a(1) = 0 and a(2) = 1.

Original entry on oeis.org

0, 1, 3, 11, 51, 291, 1971, 15411, 136371, 1345971, 14651571, 174318771, 2249992371, 31309422771, 467200878771, 7441464174771, 126003940206771, 2260128508782771, 42808495311726771, 853775831370606771, 17884089888607086771, 392550999147809646771
Offset: 1

Views

Author

Robert G. Wilson v, Sep 26 1996

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [&+[Factorial(i)/3: i in [1..n]]: n in [2..25]]; // Vincenzo Librandi, Jan 17 2019
  • Maple
    a:= proc(n) option remember; `if`(n<4, n*(n-1)/2,
          (n+1)*a(n-1) -n*a(n-2))
        end:
    seq(a(n), n=1..23);  # Alois P. Heinz, Aug 11 2019
  • Mathematica
    a[1]=0; a[2]=1; a[n_Integer] := n*a[n-1]-Sum[a[k], {k, 1, n-2}]; Table[a[n], {n, 1, 22}]
    Join[{0}, Table[Plus@@(Range[n]!) / 3, {n, 2, 25}]] (* Vincenzo Librandi, Jan 17 2019 *)

Formula

a(1)=0, a(n) = (1/3)*Sum_{k=1..n} k! for n > 1. - Benoit Cloitre, Nov 12 2005
a(n) = A007489(n)/3 for n >= 2. - Philippe Deléham, Feb 10 2007
G.f.: x*(W(0)/(2-2*x)/3 -1/3), where W(k) = 1 + 1/( 1 - x*(k+2)/( x*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 20 2013
G.f.: 1/(3*(1-x)*Q(0)) - 1/3, m=+2, where Q(k) = 1 - 2*x*(2*k+1) - m*x^2*(k+1)*(2*k+1)/( 1 - 2*x*(2*k+2) - m*x^2*(k+1)*(2*k+3)/Q(k+1) ) ; (continued fraction). - Sergei N. Gladkovskii, Sep 24 2013
Given g.f. A(x) = x^2*F(x), then F(x) = (1-x)/(1 - 4*x + 4*x^2) * (1 + x^2*F'(x)). - Paul D. Hanna, Jan 16 2019
a(n) = (n+1)*a(n-1) - n*a(n-2) for n >= 4, a(n) = n*(n-1)/2 for n < 4. - Alois P. Heinz, Aug 11 2019

Extensions

New name using a formula from Robert G. Wilson v. - Paul D. Hanna, Jan 17 2019

A120695 Set partitions reversed interpreted as factorial base numbers.

Original entry on oeis.org

0, 1, 3, 5, 9, 15, 11, 17, 23, 33, 57, 39, 63, 87, 35, 59, 83, 41, 65, 89, 47, 71, 95, 119, 153, 273, 177, 297, 417, 159, 279, 399, 183, 303, 423, 207, 327, 447, 567, 155, 275, 395, 179, 299, 419, 203, 323, 443, 563, 161, 281, 401, 185, 305, 425, 209, 329, 449
Offset: 0

Views

Author

Keywords

Examples

			The third set partition is {1,2}, 21 in base factorial is 5, so a(3) = 5.
Triangle begins:
   0;
   1;
   3,  5;
   9, 15, 11, 17, 23;
  33, 57, 39, 63, 87, 35, 59, 83, 41, 65, 89, 47, 71, 95, 119;
		

Crossrefs

Cf. A000110 (row lengths), A120698, A120696 (sorted), A120697, A071155.
Column k=0 gives A007489.

Programs

  • Maple
    b:= proc(n, m, t) option remember; `if`(n=0, [0], [seq(map(
           x-> x+j*t!, b(n-1, max(m, j), t+1))[], j=1..m+1)])
        end:
    T:= n-> b(n, 0, 1)[]:
    seq(T(n), n=0..5);  # Alois P. Heinz, Apr 04 2016

A127054 Rectangular table, read by antidiagonals, defined by the following rule: start with all 1's in row zero; from then on, row n+1 equals the partial sums of row n excluding terms in columns k = m*(m+1)/2 (m>=1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 10, 9, 4, 1, 1, 34, 33, 15, 5, 1, 1, 154, 153, 65, 23, 6, 1, 1, 874, 873, 339, 119, 32, 7, 1, 1, 5914, 5913, 2103, 719, 186, 42, 8, 1, 1, 46234, 46233, 15171, 5039, 1230, 267, 54, 9, 1, 1, 409114, 409113, 124755, 40319, 9258, 1891, 380
Offset: 0

Views

Author

Paul D. Hanna, Jan 04 2007

Keywords

Comments

Variant of table A125781. Generated by a method similar to Moessner's factorial triangle (A125714).

Examples

			Rows are partial sums excluding terms in columns k = {1,3,6,10,...}:
row 2 = partial sums of [1, 3, 5,6, 8,9,10, 12,13,14,15, ...];
row 3 = partial sums of [1, 9, 23,32, 54,67,81, 113,131,150,170, ...];
row 4 = partial sums of [1, 33, 119,186, 380,511,661, 1045,1283,...].
The terms that are excluded in the partial sums are shown enclosed in
parenthesis in the table below. Rows of this table begin:
1,(1), 1, (1), 1, 1, (1), 1, 1, 1, (1), 1, 1, 1, 1, (1), 1, ...;
1,(2), 3, (4), 5, 6, (7), 8, 9, 10, (11), 12, 13, 14, 15, (16), ...;
1,(4), 9, (15), 23, 32, (42), 54, 67, 81, (96), 113, 131, 150, ...;
1,(10), 33, (65), 119, 186, (267), 380, 511, 661, (831), 1045, ...;
1,(34), 153, (339), 719, 1230, (1891), 2936, 4219, 5765, (7600), ...;
1,(154), 873, (2103), 5039, 9258, (15023), 25148, 38203, 54625, ..;
1,(874), 5913, (15171), 40319, 78522, (133147), 238124, 379339, ...;
1,(5914), 46233, (124755), 362879, 742218, (1305847), 2477468, ...;
1,(46234), 409113, (1151331), 3628799, 7742058, (14059423), ...;
1,(409114), 4037913, (11779971), 39916799, 88369098, (164977399),...;
Columns include:
k=1: A003422 (Left factorials: !n = Sum k!, k=0..n-1);
k=2: A007489 (Sum of k!, k=1..n);
k=3: A097422 (Sum{k=1 to n} H(k) k!, where H(k) = sum{j=1 to k} 1/j);
k=4: A033312 (n! - 1);
k=5: Partial sums of A001705;
k=6: partial sums of A000399 (Stirling numbers of first kind s(n,3)).
		

Crossrefs

Cf. variants: A125781, A125714; antidiagonal sums: A127055; diagonal: A127056; columns: A003422, A007489, A097422, A033312.

Programs

  • Maple
    {T(n,k)=local(A=0,b=2,c=0,d=0);if(n==0,A=1, until(d>k,if(c==b*(b-1)/2,b+=1,A+=T(n-1,c);d+=1);c+=1));A}

A129867 Row sums of triangular array T: T(j,k) = k*(j-k)! for k < j, T(j,k) = 1 for k = j; 1 <= k <= j.

Original entry on oeis.org

1, 2, 5, 14, 47, 200, 1073, 6986, 53219, 462332, 4500245, 48454958, 571411271, 7321388384, 101249656697, 1502852293010, 23827244817323, 401839065437636, 7182224591785949, 135607710526966262, 2696935204638786575
Offset: 1

Views

Author

Paul Curtz, May 24 2007

Keywords

Comments

T read by rows is in A130469.
First differences are 1, 3, 9, 33, 153, 873, 5913, ... (see A007489), second differences are 2, 6, 24, 120, 720, 5040, ... (see A000142 ).
First terms of the sequences of m-th differences are 1, 2, 4, 14, 64, ... (see A055790, A047920, A068106).
Antidiagonal sums are 1, 1, 3, 8, 29, 135, ... (see A130470) with first differences 0, 2, 5, 21, 106, ... (see A130471).
Equals the row sums of irregular triangle A182961. - Paul D. Hanna, Mar 05 2012

Examples

			First seven rows of T are
[   1 ]
[   1,   1 ]
[   2,   2,   1 ]
[   6,   4,   3,   1 ]
[  24,  12,   6,   4,   1 ]
[ 120,  48,  18,   8,   5,   1 ]
[ 720, 240,  72,  24,  10,   6,   1 ]
		

Crossrefs

Programs

  • Magma
    m:=21; [ &+([ k*Factorial(j-k): k in [1..j-1] ] cat [ 1 ]): j in [1..m] ]; // Klaus Brockhaus, May 28 2007

Extensions

Edited and extended by Klaus Brockhaus, May 28 2007

A138524 a(n) = Sum_{k=1..n} (2*k)!.

Original entry on oeis.org

2, 26, 746, 41066, 3669866, 482671466, 87660962666, 21010450850666, 6423384156578666, 2439325392333218666, 1126440053169940898666, 621574841786409380258666, 403913035968392044964258666, 305292257647682252546468258666
Offset: 1

Views

Author

Leroy Quet, Mar 23 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[(2*i)!, {i,n}], {n,15}] (* Stefan Steinerberger, Mar 25 2008 *)
    Accumulate[(2*Range[20])!] (* Harvey P. Dale, Nov 12 2016 *)
  • PARI
    for(n=1,25, print1(sum(k=1,n, (2*k)!), ", ")) \\ G. C. Greubel, Sep 29 2017
    
  • Python
    from math import factorial
    def a(n): return sum(factorial(2*k) for k in range(1, n+1))
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Feb 26 2021

Formula

A007623(a(n)) = A163662(n). - Amiram Eldar, Apr 07 2022

Extensions

More terms from Stefan Steinerberger and Robert G. Wilson v, Mar 25 2008

A220660 Irregular table, where the n-th row consists of numbers 0..(n!-1).

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39
Offset: 1

Views

Author

Antti Karttunen, Dec 18 2012

Keywords

Comments

Used for computing A030298: a(n) tells the zero-based ranking of the n-th permutation in A030298 (A030299(n)) in the lexicographical ordering of all finite permutations of the same size.

Examples

			Rows of this irregular table begin as:
0;
0, 1;
0, 1, 2, 3, 4, 5;
		

Crossrefs

Programs

Formula

a(n) = n - A007489(A084556(n)-1) - 1.
a(n) = A220661(n)-1.

A220664 First differences of A030299.

Original entry on oeis.org

11, 9, 102, 9, 81, 18, 81, 9, 913, 9, 81, 18, 81, 9, 702, 9, 171, 27, 72, 18, 693, 18, 72, 27, 171, 9, 702, 9, 81, 18, 81, 9, 8024, 9, 81, 18, 81, 9, 702, 9, 171, 27, 72, 18, 693, 18, 72, 27, 171, 9, 702, 9, 81, 18, 81, 9, 5913, 9, 81, 18, 81, 9, 1602, 9, 261
Offset: 1

Views

Author

Antti Karttunen, Dec 17 2012

Keywords

Comments

From M. F. Hasler, Jan 12 2013: (Start)
Note [updated Mar 03 2013]: The definition of sequence A030299 has been slightly modified in Jan. 2013, and as a consequence the following properties remain valid beyond the first A007489(9)-1 = 409112 terms, which had not been the case before, when A030299 had been defined through concatenation of the lexicographically ordered permutations, which in case of elements >= 10 broke up the nice mathematical properties (esp. of the sequence A219664 = 9*A217626 cited below).
This sequence taken modulo 9 is zero except (possibly) at indices where a run of permutations ends in A030299. (These indices are given by A007489(n), n>0.) There it equals (mod 9) the "n" of the following run. E.g., a(1)=2 (mod 9), and A030299(1+1)=12 is the start of the run for n=2; a(3)=3 (mod 9) and A030299(3+1)=123 is the start of the run for n=3, a(9)=4 (mod 9) and A030299(9+1)=1234 is the start of the run for n=4, etc.
The subsequence between these indices (A007489(n)+1,...,A007489(n+1)-1), always starts with the same terms, listed in A219664 = 9*A217626 (= A209280 = A107346 where the latter are defined). (End)

Examples

			A030299 starts (1, 12, 21, 123, 132, 213, 231, 312, ...), the first differences thereof yield (11, 9, 102, 9, 81, 18, 81, ...).
		

Crossrefs

The repeating part is given by A219664, equal to A107346 for indices < 5!.

Programs

  • Maple
    (l-> seq(l[j]-l[j-1], j=2..nops(l)))([seq(map(x-> parse(cat(x[])),
         combinat[permute](n))[], n=0..5)])[];  # Alois P. Heinz, Nov 09 2021
  • PARI
    {A030299=concat( vector( 5,k, vecsort( vector( (#k=vector(k, j, 10^j)~\10)!, i, numtoperm(#k, i-1)*k )))); A220664=vecextract(A030299,"^1")-vecextract(A030299,"^-1")} \\ M. F. Hasler, Jan 12 2013
    
  • Python
    from itertools import permutations
    def pmap(s, m): return sum(s[i-1]*10**(m-i) for i in range(1, len(s)+1))
    def agen():
        m = 1
        while True:
            for s in permutations(range(1, m+1)): yield pmap(s, m)
            m += 1
    def aupton(terms):
        alst, g = [], agen()
        t = next(g)
        while len(alst) < terms:
            t, prevt = next(g), t
            alst += [t - prevt]
        return alst
    print(aupton(65)) # Michael S. Branicky, Nov 09 2021
  • Scheme
    (define (A220664 n) (- (A030299 (+ 1 n)) (A030299 n)))
    

Formula

a(n) = A030299(n+1) - A030299(n).
a(n) = A219664(n-A007489(k)), for A007489(k) < n < A007489(k+1). - M. F. Hasler, Jan 13 2013

A231721 Partial sums of phitorials: a(n) = A001088(1)+A001088(2)+...+A001088(n).

Original entry on oeis.org

1, 2, 4, 8, 24, 56, 248, 1016, 5624, 24056, 208376, 945656, 9793016, 62877176, 487550456, 3884936696, 58243116536, 384392195576, 6255075618296, 53220543000056, 616806151581176, 6252662237392376, 130241496125238776, 1122152167228009976, 20960365589283433976
Offset: 1

Views

Author

Antti Karttunen, Nov 27 2013

Keywords

Comments

a(n) gives the index to the first term in each subrange of A231716. Specifically, for all n>=1, A231716(a(n)) = A007489(n).

Crossrefs

Cf. A001088 ("phitorials"), A231722, A231716, A007489.

Programs

  • Mathematica
    Accumulate[FoldList[Times,EulerPhi[Range[30]]]] (* Harvey P. Dale, Apr 02 2018 *)

Formula

a(n) = 1 if n=1, otherwise A001088(n)+a(n-1).
a(n) = A231722(n)+1. [Follows from the definitions]

A236856 Partial sums of A003418 starting summing from A003418(1), with a(0) = 0.

Original entry on oeis.org

0, 1, 3, 9, 21, 81, 141, 561, 1401, 3921, 6441, 34161, 61881, 422241, 782601, 1142961, 1863681, 14115921, 26368161, 259160721, 491953281, 724745841, 957538401, 6311767281, 11665996161, 38437140561, 65208284961, 145521718161, 225835151361, 2554924714161
Offset: 0

Views

Author

Antti Karttunen, Feb 27 2014

Keywords

Comments

Similar comments about the trailing digits apply here as in A173185.
a(n) gives the position of the last element of row n in irregular tables like A238280.
From a(2)=3 onward all terms are divisible by three.
a(n) is divisible by 73 for n >= 72. Therefore a(n)/3 is prime for only 13 values of n: 3, 4, 6, 8, 9, 12, 16, 22, 23, 31, 35, 48 and 53. - Amiram Eldar, Sep 19 2022

Crossrefs

One less than A173185.

Programs

  • Mathematica
    Prepend[Accumulate @ Table[LCM @@ Range[n], {n, 1, 30}], 0] (* Amiram Eldar, Sep 19 2022 *)
  • Scheme
    (define (A236856 n) (if (< n 2) n (+ (A236856 (- n 1)) (A003418 n))))

Formula

a(n) = A173185(n)-1.

A275849 Number of unoccupied slopes in factorial base representation of n: a(n) = A084558(n) - A060502(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 15 2016

Keywords

Crossrefs

Cf. A007489 (the indices of zeros).

Programs

Formula

a(n) = A084558(n) - A060502(n).
Other identities. For all n >= 0:
a(n) = A275850(A225901(n)).
a(n) = A060501(n)-1. [To be proved.]
Previous Showing 51-60 of 136 results. Next