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 41-50 of 96 results. Next

A173323 a(n) = 3*n! - 1.

Original entry on oeis.org

2, 2, 5, 17, 71, 359, 2159, 15119, 120959, 1088639, 10886399, 119750399, 1437004799, 18681062399, 261534873599, 3923023103999, 62768369663999, 1067062284287999, 19207121117183999, 364935301226495999, 7298706024529919999, 153272826515128319999, 3372002183332823039999
Offset: 0

Views

Author

Vincenzo Librandi, Feb 16 2010

Keywords

Crossrefs

Cf. sequences of the type k*n!-1: A033312 (k=1), A020543 (k=2), this sequence, A173321 (k=4), A173317 (k=5), A173316 (k=6).

Programs

Formula

a(0)=2, a(n) = n*a(n-1)+n-1. - Vincenzo Librandi, Sep 30 2013
D-finite with recurrence a(n) +(-n-2)*a(n-1) +(2*n-1)*a(n-2) +(-n+2)*a(n-3)=0. - R. J. Mathar, Mar 07 2022
E.g.f.: 3/(1 - x) - exp(x). - Stefano Spezia, Oct 14 2024

A176487 Triangle read by rows: T(n,k) = binomial(n,k) + A008292(n+1,k+1) - 1.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 13, 13, 1, 1, 29, 71, 29, 1, 1, 61, 311, 311, 61, 1, 1, 125, 1205, 2435, 1205, 125, 1, 1, 253, 4313, 15653, 15653, 4313, 253, 1, 1, 509, 14635, 88289, 156259, 88289, 14635, 509, 1, 1, 1021, 47875, 455275, 1310479, 1310479, 455275, 47875, 1021, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 19 2010

Keywords

Examples

			Triangle begins as:
  1;
  1,    1;
  1,    5,     1;
  1,   13,    13,      1;
  1,   29,    71,     29,       1;
  1,   61,   311,    311,      61,       1;
  1,  125,  1205,   2435,    1205,     125,      1;
  1,  253,  4313,  15653,   15653,    4313,    253,     1;
  1,  509, 14635,  88289,  156259,   88289,  14635,   509,    1;
  1, 1021, 47875, 455275, 1310479, 1310479, 455275, 47875, 1021,   1;
		

Crossrefs

Programs

  • Magma
    A176487:= func< n, k | Binomial(n, k) + EulerianNumber(n+1, k) - 1 >;
    [A176487(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 31 2024
    
  • Maple
    A176487 := proc(n,k)
        binomial(n,k)+A008292(n+1,k+1)-1 ;
    end proc: # R. J. Mathar, Jun 16 2015
  • Mathematica
    Needs["Combinatorica`"];
    T[n_, k_, 0]:= Binomial[n, k];
    T[n_, k_, 1]:= Eulerian[1 + n, k];
    T[n_, k_, q_]:= T[n,k,q] = T[n,k,q-1] + T[n,k,q-2] - 1;
    Table[T[n,k,2], {n,0,12}, {k,0,n}]//Flatten
  • SageMath
    # from sage.all import * # (use for Python)
    from sage.combinat.combinat import eulerian_number
    def A176487(n,k): return binomial(n,k) +eulerian_number(n+1,k) -1
    print(flatten([[A176487(n,k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Dec 31 2024

Formula

T(n, k) = A007318(n,k) + A008292(n+1,k+1) - 1, 0 <= k <= n.
Sum_{k=0..n} T(n, k) = 2^n - n + A033312(n+1) (row sums).
T(n, k) = 2*A141689(n+1,k+1) - 1. - R. J. Mathar, Jan 19 2011
From G. C. Greubel, Dec 31 2024: (Start)
T(n, n-k) = T(n, k).
T(n, 1) = A036563(n+1).
Sum_{k=0..n} (-1)^k * T(n,k) = ((-1)^(n/2)*A000182(n/2 + 1) - 1)*(1 + (-1)^n)/2 + [n=0]. (End)

A179455 Triangle read by rows: number of permutation trees of power n and height <= k + 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 5, 6, 1, 15, 23, 24, 1, 52, 106, 119, 120, 1, 203, 568, 700, 719, 720, 1, 877, 3459, 4748, 5013, 5039, 5040, 1, 4140, 23544, 36403, 39812, 40285, 40319, 40320, 1, 21147, 176850, 310851, 354391, 362057, 362836, 362879, 362880
Offset: 0

Views

Author

Peter Luschny, Aug 11 2010

Keywords

Comments

Partial row sums of A179454. Special cases: A179455(n,1) = BellNumber(n) = A000110(n) for n > 1; A179455(n,n-1) = n! for n > 1 and A179455(n,n-2) = A033312(n) for n > 1. Column 3 is A187761(n) for n >= 3.
See the interpretation of Joerg Arndt in A187761: Maps such that f^[k](x) = f^[k-1](x) correspond to column k of A179455 (for n >= k). - Peter Luschny, Jan 08 2013

Examples

			As a (0,0)-based triangle with an additional column [1,0,0,0,...] at the left hand side:
1;
0, 1;
0, 1, 2;
0, 1, 5, 6;
0, 1, 15, 23, 24;
0, 1, 52, 106, 119, 120;
0, 1, 203, 568, 700, 719, 720;
0, 1, 877, 3459, 4748, 5013, 5039, 5040;
0, 1, 4140, 23544, 36403, 39812, 40285, 40319, 40320;
0, 1, 21147, 176850, 310851, 354391, 362057, 362836, 362879, 362880;
		

Crossrefs

Row sums are A264151.

Programs

  • Mathematica
    b[n_, t_, h_] := b[n, t, h] = If[n == 0 || h == 0, 1, Sum[Binomial[n - 1, j - 1]*b[j - 1, 0, h - 1]*b[n - j, t, h], {j, 1, n}]];
    T[0, 0] = 1; T[n_, k_] := b[n, 1, k];
    Table[T[n, k], {n, 0, 9}, {k, 0, If[n == 0, 0, n-1]}] // Flatten (* Jean-François Alcover, Jul 10 2019, after Alois P. Heinz in A179454 *)
  • Sage
    # Generating algorithm from Joerg Arndt.
    def A179455row(n):
        def generate(n, k):
            if n == 0 or k == 0: return 0
            for j in range(n-1, 0, -1):
                f = a[j] + 1
                while f <= j:
                    a[j] = f1 = fl = f
                    for i in range(k):
                        fl = f1
                        f1 = a[fl]
                    if f1 == fl: return j
                    f += 1
                a[j] = 0
            return 0
        count = [1 for j in range(n)] if n > 0 else [1]
        for k in range(n):
            a = [0 for j in range(n)]
            while generate(n, k) != 0:
                count[k] += 1
        return count
    for n in range(9): A179455row(n) # Peter Luschny, Jan 08 2013
    
  • Sage
    # uses[bell_transform from A264428]
    # Adds the column (1,0,0,0,..) to the left hand side and starts at n=0.
    def A179455_matrix(dim):
        b = [1]+[0]*(dim-1); L = [b]
        for k in range(dim):
            b = [sum(bell_transform(n, b)) for n in range(dim)]
            L.append(b)
        return matrix(ZZ, dim, lambda n, k: L[k][n] if k<=n else 0)
    print(A179455_matrix(10)) # Peter Luschny, Dec 06 2015

A255341 Numbers n such that there is exactly one 1 in their factorial base representation (A007623).

Original entry on oeis.org

1, 2, 5, 6, 10, 13, 14, 17, 19, 20, 23, 24, 28, 36, 40, 42, 46, 49, 50, 53, 54, 58, 61, 62, 65, 67, 68, 71, 73, 74, 77, 78, 82, 85, 86, 89, 91, 92, 95, 97, 98, 101, 102, 106, 109, 110, 113, 115, 116, 119, 120, 124, 132, 136, 138, 142, 168, 172, 180, 184, 186, 190, 192, 196, 204, 208, 210
Offset: 1

Views

Author

Antti Karttunen, Apr 27 2015

Keywords

Examples

			The factorial base representation (A007623) of 5 is "21", which contains exactly one 1, thus 5 is included in the sequence.
The f.b.r. of 23 is "321", with only one 1, thus 23 is included in the sequence.
The f.b.r. of 24 is "1000", with only one 1, thus 24 is included in the sequence.
		

Crossrefs

Subsequence of A256450.
Subsequences: A000142, A033312 (apart from its zero-terms).

Programs

  • Mathematica
    factBaseIntDs[n_] := Module[{m, i, len, dList, currDigit}, i = 1; While[n > i!, i++]; m = n; len = i; dList = Table[0, {len}]; Do[currDigit = 0; While[m >= j!, m = m - j!; currDigit++]; dList[[len - j + 1]] = currDigit, {j, i, 1, -1}]; If[dList[[1]] == 0, dList = Drop[dList, 1]]; dList]; s = Table[FromDigits[factBaseIntDs[n]], {n, 210}]; {0}~Join~Flatten@ Position[s, x_ /; DigitCount[x][[1]] == 1] (* Michael De Vlieger, Apr 27 2015, after Alonso del Arte at A007623 *)

A068480 Numbers n such that gcd(n!-1,2^n+1)>1.

Original entry on oeis.org

1, 29, 41, 53, 69, 105, 125, 141, 153, 165, 189, 233, 249, 273, 293, 321, 329, 405, 413, 429, 441, 453, 485, 581, 585, 629, 641, 653, 713, 729, 741, 761, 765, 809, 813, 849, 893, 905, 989, 993, 1005, 1013, 1041, 1049, 1089, 1121, 1125, 1133, 1169, 1205
Offset: 1

Views

Author

Benoit Cloitre, Mar 10 2002

Keywords

Crossrefs

Cf. A000051 (2^n+1), A033312 (n!-1).

Programs

  • GAP
    Filtered([1..1230],n->Gcd(Factorial(n)-1,2^n+1)>1); # Muniru A Asiru, Oct 16 2018
  • Maple
    select(n->gcd(factorial(n)-1,2^n+1)>1,[$1..1230]); # Muniru A Asiru, Oct 16 2018
  • Mathematica
    Select[Range[2500], GCD[#! - 1, 2^# + 1] > 1 &] (* G. C. Greubel, Oct 15 2018 *)
  • PARI
    isok(n) = gcd(n!-1, 2^n+1) > 1; \\ Michel Marcus, Oct 16 2018
    

A068483 Numbers n such that gcd(n!-1,2^n-1)>1.

Original entry on oeis.org

11, 15, 35, 75, 83, 111, 119, 135, 155, 179, 219, 231, 243, 323, 359, 375, 455, 459, 483, 491, 515, 519, 525, 531, 551, 611, 615, 639, 651, 663, 699, 719, 723, 735, 771, 779, 783, 803, 879, 915, 923, 939, 999, 1043, 1103, 1119, 1175, 1199, 1271, 1323
Offset: 1

Views

Author

Benoit Cloitre, Mar 10 2002

Keywords

Crossrefs

Cf. A000225 (2^n-1), A033312 (n!-1).

Programs

  • Mathematica
    Select[Range[2500], GCD[#! - 1, 2^# - 1] > 1 &] (* G. C. Greubel, Oct 15 2018 *)
  • PARI
    isok(n) = gcd(n!-1,2^n-1) > 1; \\ Michel Marcus, Oct 16 2018

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}

A207324 List of permutations of 1,2,3,...,n for n=1,2,3,..., in the order they are output by Steinhaus-Johnson-Trotter algorithm.

Original entry on oeis.org

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

Views

Author

R. J. Cano, Sep 14 2012

Keywords

Comments

This table is otherwise similar to A030298, but lists permutations in the order given by the Steinhaus-Trotter-Johnson algorithm. - Antti Karttunen, Dec 28 2012

Examples

			For the set of the first two natural numbers {1,2} the unique permutations possible are 12 and 21, concatenated with 1 for {1} the resulting sequence would be 1, 1, 2, 2, 1.
If we consider up to 3 elements {1,2,3}, we have 123, 132, 312, 321, 231, 213 and the concatenation gives: 1, 1, 2, 2, 1, 1, 2, 3, 1, 3, 2, 3, 1, 2, 3, 2, 1, 2, 3, 1, 2, 1, 3.
Up to N concatenations, the sequence will have a total of Sum_{k=1..N} (k! * k) = (N+1)! - 1 = A033312(N+1) terms.
		

Crossrefs

Cf. A001563 (row lengths), A001286 (row sums).
Pair (A130664(n),A084555(n)) = (1,1),(2,3),(4,5),(6,8),(9,11),(12,14),... gives the starting and ending offsets of the n-th permutation in this list.

Extensions

A231722 Partial sums of A001088 starting from its second term; a(1)=0, a(n) = A001088(2)+...+A001088(n).

Original entry on oeis.org

0, 1, 3, 7, 23, 55, 247, 1015, 5623, 24055, 208375, 945655, 9793015, 62877175, 487550455, 3884936695, 58243116535, 384392195575, 6255075618295, 53220543000055, 616806151581175, 6252662237392375, 130241496125238775, 1122152167228009975, 20960365589283433975
Offset: 1

Views

Author

Antti Karttunen, Nov 27 2013

Keywords

Comments

a(n+1) gives the index to the last term in each row of A231716. Specifically, for all n>=1, A231716(a(n+1)) = A033312(n+1).
a(n) = natural number which is written as the n-th repunit in "totient phi number system": 0, 1, 10, 11, 100, 101, 110, 111, 200, 201, 210, 211, 300, 301, 310, 311, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 1200, ..., and so on. Note how the 1st, the 3rd, the 7th and 23rd terms of this list are 1, 11, 111, and 1111.
In this number system the i-th digit from right (the least significant digit = digit_0) may contain integers in range 0..A000010(i+3)-1, and the value of the number is obtained as sum_{i=0..} digit_i * A001088(i+2).

Crossrefs

One less than A231721.
Cf. A000010 (Euler's totient function phi), A001088 (its partial products, "phitorials"), A231716, A033312.

Programs

  • Maple
    with(numtheory): A231722:=n->add(product(phi(k), k=1..i), i=2..n): seq(A231722(n), n=1..20); # Wesley Ivan Hurt, Aug 09 2014
  • Mathematica
    Table[Sum[Product[EulerPhi[k], {k, i}], {i, 2, n}], {n, 20}] (* Wesley Ivan Hurt, Aug 09 2014 *)
  • PARI
    a(n) = sum(i=2, n, prod(k=1, i, eulerphi(k))); \\ Michel Marcus, Aug 09 2014
  • Scheme
    (define (A231722 n) (- (A231721 n) 1))
    

Formula

a(n) = A231721(n)-1. [The terms are one less than the partial sums of "phitorials", A001088, cumulatively summed from their first term]

A275832 Size of the cycle containing element 1 in finite permutations listed in tables A060117 & A060118: a(n) = A007814(A275725(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 11 2016

Keywords

Examples

			For n=0, the permutation with rank 0 in list A060118 is "1" (identity permutation) where 1 is fixed (in a 1-cycle), thus a(0)=1.
For n=1, the permutation with rank 1 in list A060118 is "21" where 1 is in a transposition (a 2-cycle), thus a(1)=2.
For n=3, the permutation with rank 3 in list A060118 is "231" where 1 is in a 3-cycle, thus a(3)=3.
For n=16, the permutation with rank 16 in list A060118 is "3412" (1 is in the other of two disjoint transpositions (1 3) and (2 4)), thus a(16)=2.
For n=44, the permutation with rank 44 in list A060118 is "43251", where 1 is a part of 3-cycle, thus a(44)=3.
		

Crossrefs

Cf. A153880 (positions of 1's), A273670 (of terms larger than one), A275833 (of odd terms), A275834 (of even terms).

Programs

Formula

a(n) = A007814(A275725(n)).
Other identities:
For n >= 1, a(A033312(n)) = n.
For n >= 2, a(A000142(n)) = 1.
Previous Showing 41-50 of 96 results. Next