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

A370369 a(n) = n! + Sum_{k=1..n-1} (n-k)*k! = n! + A014145(n-1); for n >= 2, number of m such that any two consecutive digits of the base-n expansion of m differ by 1 after arranging the digits in decreasing order.

Original entry on oeis.org

1, 3, 10, 37, 166, 919, 6112, 47305, 416098, 4091131, 44417044, 527456557, 6798432070, 94499679583, 1408924024696, 22425642181009, 379514672913322, 6804212771165635, 128827325000617948, 2568509718703606261, 53787877376348226574, 1180349932648067726887, 27086018941198865627200
Offset: 1

Views

Author

Jianing Song, Feb 16 2024

Keywords

Comments

Given n, the largest such number is Sum_{i=0..n-1} i*n^i = A062813(n). If zero is excluded, the number of such k with d digits in base n, 1 <= d <= n, is (n+1-d)*d! - (d-1)!.

Examples

			a(3) = 10 because such numbers are 0_3, 1_3, 2_3, 10_3, 12_3, 21_3, 102_3, 120_3, 201_3 and 210_3.
a(10) = 4091131 is the number of terms of A215014.
		

Crossrefs

Programs

  • PARI
    a(n) = n! + sum(k=1, n-1, (n-k)*k!)

A288777 Triangle read by rows in which column k lists the positive multiples of the factorial of k, with 1 <= k <= n.

Original entry on oeis.org

1, 2, 2, 3, 4, 6, 4, 6, 12, 24, 5, 8, 18, 48, 120, 6, 10, 24, 72, 240, 720, 7, 12, 30, 96, 360, 1440, 5040, 8, 14, 36, 120, 480, 2160, 10080, 40320, 9, 16, 42, 144, 600, 2880, 15120, 80640, 362880, 10, 18, 48, 168, 720, 3600, 20160, 120960, 725760, 3628800, 11, 20, 54, 192, 840, 4320, 25200, 161280, 1088640
Offset: 1

Views

Author

Omar E. Pol, Jun 15 2017

Keywords

Comments

T(n,k) is the number of k-digit numbers in base n+1 with distinct positive digits that form an integer interval when sorted.
T(9,k) is also the number of numbers with k digits in A288528.
The number of terms in A288528 is also A014145(9) = 462331, the same as the sum of the 9th row of this triangle.
Removing the left column of A137267 and of A137948 then this triangle appears in both cases.

Examples

			Triangle begins:
   1;
   2,  2;
   3,  4,  6;
   4,  6, 12,  24;
   5,  8, 18,  48, 120;
   6, 10, 24,  72, 240,  720;
   7, 12, 30,  96, 360, 1440,  5040;
   8, 14, 36, 120, 480, 2160, 10080,  40320;
   9, 16, 42, 144, 600, 2880, 15120,  80640,  362880;
  10, 18, 48, 168, 720, 3600, 20160, 120960,  725760, 3628800;
  11, 20, 54, 192, 840, 4320, 25200, 161280, 1088640, 7257600, 39916800;
  ...
For n = 9 and k = 2: T(9,2) is the number of numbers with two digits in A288528.
For n = 9 the row sum is 9 + 16 + 42 + 144 + 600 + 2880 + 15120 + 80640 + 362880 = 462331, the same as A014145(9) and also the same as the number of terms in A288528.
		

Crossrefs

Right border gives A000142, n>=1.
Middle diagonal gives A001563, n>=1.
Row sums give A014145, n>=1.
Column 1..4: A000027, A005843, A008588, A008606.

Programs

  • Mathematica
    Table[(n - k + 1) k!, {n, 11}, {k, n}] // Flatten (* Michael De Vlieger, Jun 15 2017 *)

Formula

T(n,k) = (n-k+1)*k! = (n-k+1)*A000142(k) = A004736(n,k)*A166350(n,k).
T(n,k) = Sum_{j=1..n} A166350(j,k).
T(n,k) = A288778(n,k) + A000142(k-1).

A094344 Triangle T(n,k), 0<= k <= n, read by rows; given by [0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, ...] DELTA [1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, ...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 4, 1, 0, 6, 18, 13, 1, 0, 24, 96, 119, 46, 1, 0, 120, 600, 1059, 777, 199, 1, 0, 720, 4320, 9890, 10760, 5536, 1072, 1, 0, 5040, 35280, 99158, 142990, 111316, 44228, 6985, 1, 0, 40320, 322560, 1073692, 1926312, 2009578, 1217352, 395865, 53218, 1
Offset: 0

Views

Author

Philippe Deléham, Jun 02 2004

Keywords

Examples

			Triangle begins:
  1;
  0,  1;
  0,  1,  1;
  0,  2,  4,   1;
  0,  6, 18,  13,  1;
  0, 24, 96, 119, 46, 1;
  ...
		

Crossrefs

Row sums: A094664.
Columns: A000007, A000142, A001563.
Diagonals: A000012, A014145.

Formula

Sum_{k=0..n} T(n,k)*3^(n-k) = A128709(n). - Philippe Deléham, Mar 27 2007

Extensions

Row 9 completed by Michel Marcus, Jun 20 2023

A200545 Triangle T(n,k), read by rows, given by (1,0,2,1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,...) DELTA (0,1,0,1,0,1,0,1,0,1,0,1,0,1,...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 4, 1, 0, 1, 13, 9, 1, 0, 1, 46, 56, 16, 1, 0, 1, 199, 334, 160, 25, 1, 0, 1, 1072, 2157, 1408, 365, 36, 1, 0, 1, 6985, 15701, 12445, 4417, 721, 49, 1, 0, 1, 53218, 129214, 116698, 50944, 11452, 1288, 64, 1, 0, 1, 462331, 1191336, 1183216, 597026, 166716, 25956, 2136, 81, 1, 0
Offset: 0

Views

Author

Philippe Deléham, Nov 19 2011

Keywords

Comments

Row sums : A000142(n) = n!.

Examples

			Triangle begins :
1
1, 0
1, 1, 0
1, 4, 1, 0
1, 13, 9, 1, 0
1, 46, 56, 16, 1, 0
1, 199, 334, 160, 25, 1, 0
1, 1072, 2157, 1408, 365, 36, 1, 0
1, 6985, 15701, 12445, 4417, 721, 49, 1, 0
1, 53218, 129214, 116698, 50944, 11452, 1288, 64, 1, 0
		

Crossrefs

Programs

  • Mathematica
    DELTA[r_, s_, m_] := Module[{p, q, t, x, y}, q[k_] := x*r[[k + 1]] + y*s[[k + 1]]; p[0, ] = 1; p[, -1] = 0; p[n_ /; n >= 1, k_ /; k >= 0] := p[n, k] = p[n, k - 1] + q[k]*p[n - 1, k + 1] // Expand; t[n_, k_] := Coefficient[p[n, 0], x^(n - k)*y^k]; t[0, 0] = p[0, 0]; Table[t[n, k], {n, 0, m}, {k, 0, n}]];
    m = 10;
    DELTA[LinearRecurrence[{1, 1, -1}, {1, 0, 2}, m], LinearRecurrence[{0, 1}, {0, 1}, m], m] // Flatten (* Jean-François Alcover, Feb 21 2019 *)

Formula

Sum_{k=0..n} T(n,k)*x^k = (-1)^n*A172485(n+1), A146559(n), A000012(n), A000142(n), A003319(n), A111529(n), A111530(n), A111531(n), A111532(n), A111533(n) for x = -2,-1,0,1,2,3,4,5,6,7 respectively.
T(k+2,k)=(k+1)^2 = A000290(k+1).
T(n+1,1)= A014145(n).

A288528 Numbers with consecutive positive decimal digits after the digits are sorted.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 123, 132, 213, 231, 234, 243, 312, 321, 324, 342, 345, 354, 423, 432, 435, 453, 456, 465, 534, 543, 546, 564, 567, 576, 645, 654, 657, 675, 678, 687, 756, 765, 768, 786, 789, 798, 867, 876, 879, 897, 978, 987
Offset: 1

Views

Author

Omar E. Pol, Jun 15 2017

Keywords

Comments

The last term is a(462331) = 987654321.
Observation: the number of terms mentioned above is also A014145(9). Also the sum of the 9th row in the triangle A288777.
It appears that the number of terms with k digits in this sequence is also A288777(9,k), k>=1.

Crossrefs

Subsequence of A215014.
Supersequence of A138141.

Programs

  • Python
    def ok(n): return "".join(sorted(str(n))) in "123456789"
    print([k for k in range(999) if ok(k)]) # Michael S. Branicky, Aug 04 2022
    
  • Python
    # alternate for generating full sequence instantly
    from itertools import permutations
    frags = ["123456789"[i:j] for i in range(9) for j in range(i+1, 10)]
    afull = sorted(int("".join(s)) for f in frags for s in permutations(f))
    print(afull[:70]) # Michael S. Branicky, Aug 04 2022
Showing 1-5 of 5 results.