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

A265901 Square array read by descending antidiagonals: A(n,1) = A188163(n), and for k > 1, A(n,k) = A087686(1+A(n,k-1)).

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 8, 15, 12, 6, 16, 31, 27, 14, 9, 32, 63, 58, 30, 21, 10, 64, 127, 121, 62, 48, 24, 11, 128, 255, 248, 126, 106, 54, 26, 13, 256, 511, 503, 254, 227, 116, 57, 29, 17, 512, 1023, 1014, 510, 475, 242, 120, 61, 38, 18, 1024, 2047, 2037, 1022, 978, 496, 247, 125, 86, 42, 19, 2048, 4095, 4084, 2046, 1992, 1006, 502, 253, 192, 96, 45, 20
Offset: 1

Views

Author

Antti Karttunen, Dec 18 2015

Keywords

Comments

Square array read by descending antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
The topmost row (row 1) of the array is A000079 (powers of 2), and in general each row 2^k contains the sequence (2^n - k), starting from the term (2^(k+1) - k). This follows from the properties (3) and (4) of A004001 given on page 227 of Kubo & Vakil paper (page 3 in PDF).
Moreover, each row 2^k - 1 (for k >= 2) contains the sequence 2^n - n - (k-2), starting from the term (2^(k+1) - (2k-1)). To see why this holds, consider the definitions of sequences A162598 and A265332, the latter which also illustrates how the frequency counts Q_n for A004001 are recursively constructed (in the Kubo & Vakil paper).

Examples

			The top left corner of the array:
   1,  2,   4,   8,  16,   32,   64,  128,  256,   512,  1024, ...
   3,  7,  15,  31,  63,  127,  255,  511, 1023,  2047,  4095, ...
   5, 12,  27,  58, 121,  248,  503, 1014, 2037,  4084,  8179, ...
   6, 14,  30,  62, 126,  254,  510, 1022, 2046,  4094,  8190, ...
   9, 21,  48, 106, 227,  475,  978, 1992, 4029,  8113, 16292, ...
  10, 24,  54, 116, 242,  496, 1006, 2028, 4074,  8168, 16358, ...
  11, 26,  57, 120, 247,  502, 1013, 2036, 4083,  8178, 16369, ...
  13, 29,  61, 125, 253,  509, 1021, 2045, 4093,  8189, 16381, ...
  17, 38,  86, 192, 419,  894, 1872, 3864, 7893, 16006, 32298, ...
  18, 42,  96, 212, 454,  950, 1956, 3984, 8058, 16226, 32584, ...
  19, 45, 102, 222, 469,  971, 1984, 4020, 8103, 16281, 32650, ...
  20, 47, 105, 226, 474,  977, 1991, 4028, 8112, 16291, 32661, ...
  22, 51, 112, 237, 490,  999, 2020, 4065, 8158, 16347, 32728, ...
  23, 53, 115, 241, 495, 1005, 2027, 4073, 8167, 16357, 32739, ...
  25, 56, 119, 246, 501, 1012, 2035, 4082, 8177, 16368, 32751, ...
  28, 60, 124, 252, 508, 1020, 2044, 4092, 8188, 16380, 32764, ...
  ...
		

Crossrefs

Inverse permutation: A267102.
Transpose: A265903.
Cf. A265900 (main diagonal).
Cf. A162598 (row index of n in array), A265332 (column index of n in array).
Column 1: A188163.
Column 2: A266109.
Row 1: A000079 (2^n).
Row 2: A000225 (2^n - 1, from 3 onward).
Row 3: A000325 (2^n - n, from 5 onward).
Row 4: A000918 (2^n - 2, from 6 onward).
Row 5: A084634 (?, from 9 onward).
Row 6: A132732 (2^n - 2n + 2, from 10 onward).
Row 7: A000295 (2^n - n - 1, from 11 onward).
Row 8: A036563 (2^n - 3).
Row 9: A084635 (?, from 17 onward).
Row 12: A048492 (?, from 20 onward).
Row 13: A249453 (?, from 22 onward).
Row 14: A183155 (2^n - 2n + 1, from 23 onward. Cf. also A244331).
Row 15: A000247 (2^n - n - 2, from 25 onward).
Row 16: A028399 (2^n - 4).
Cf. also permutations A267111, A267112.

Programs

Formula

For the first column k=1, A(n,1) = A188163(n), for columns k > 1, A(n,k) = A087686(1+A(n,k-1)).

A356185 The difference between number of even and number of odd Grassmannian permutations of size n.

Original entry on oeis.org

1, 1, 0, 1, 0, 3, 2, 9, 8, 23, 22, 53, 52, 115, 114, 241, 240, 495, 494, 1005, 1004, 2027, 2026, 4073, 4072, 8167, 8166, 16357, 16356, 32739, 32738, 65505, 65504, 131039, 131038, 262109, 262108, 524251, 524250, 1048537, 1048536, 2097111, 2097110, 4194261, 4194260
Offset: 0

Views

Author

Per W. Alexandersson, Jul 28 2022

Keywords

Comments

A permutation is Grassmann if it has at most one descent. A closed-form formula was proved by J. B. Gil and J. A. Tomasko.

Examples

			For n=3, 123, 231, 312 are even Grassmann permutations, and 132, 213 are the odd ones. Hence a(3) = 1.
		

Crossrefs

Bisections give: A005803 (even part), A183155 (odd part).

Programs

  • Mathematica
    Table[2^Floor[1 + (n - 1)/2] - n, {n, 1, 80}]

Formula

a(n) = 2^(1+floor((n-1)/2))-n.
From Alois P. Heinz, Jul 28 2022: (Start)
G.f.: -(4*x^3-3*x^2-x+1)/((2*x^2-1)*(x-1)^2).
a(n) = A000325(n) - A233411(n) = A060546(n) - n = 2^ceiling(n/2) - n.
a(n) = A000325(n) - 2*A032085(n) = A000325(n) - 2*A122746(n-2) for n>=2. (End)

A183154 T(n,k) is the number of order-preserving partial isometries (of an n-chain) of fixed k (fix of alpha is the number of fixed points of alpha).

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 9, 3, 3, 1, 23, 4, 6, 4, 1, 53, 5, 10, 10, 5, 1, 115, 6, 15, 20, 15, 6, 1, 241, 7, 21, 35, 35, 21, 7, 1, 495, 8, 28, 56, 70, 56, 28, 8, 1, 1005, 9, 36, 84, 126, 126, 84, 36, 9, 1, 2027, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1
Offset: 0

Views

Author

Abdullahi Umar, Dec 28 2010

Keywords

Examples

			T (4,2) = 6 because there are exactly 6 order-preserving partial isometries (on a 4-chain) of fix 2, namely: (1,2)-->(1,2); (2,3)-->(2,3); (3,4)-->(3,4); (1,3)-->(1,3); (2,4)-->(2,4); (1,4)-->(1,4) - the mappings are coordinate-wise.
Triangle starts as:
1;
1, 1;
3, 2, 1;
9, 3, 3, 1;
23, 4, 6, 4, 1;
53, 5, 10, 10, 5, 1;
115, 6, 15, 20, 15, 6, 1;
		

Crossrefs

Programs

  • Maple
    A183155 := proc(n) 2^(n+1)-2*n-1 ; end proc:
    A183154 := proc(n,k) if k =0 then A183155(n); else binomial(n,k) ; end if; end proc: # R. J. Mathar, Jan 06 2011
  • Mathematica
    T[n_, k_] := If[k == 0, 2^(n + 1) - 2n - 1, Binomial[n, k]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 17 2018 *)
  • PARI
    A183155(n)=2^(n+1) - (2*n+1);
    T(n,k)=if(k==0, A183155(n), binomial(n,k));
    for(n=0,17,for(k=0,n,print1(T(n,k),", "));print()) \\ Joerg Arndt, Dec 30 2010

Formula

T(n,0) = A183155(n) and T(n,k) = binomial(n,k) if k > 0.

A244331 Number of binary digits in the high-water marks of the terms of the continued fraction of the base-2 Champernowne constant.

Original entry on oeis.org

0, 1, 3, 9, 23, 53, 115, 241, 495, 1005, 2027, 4073, 8167, 16357, 32739, 65505, 131039, 262109, 524251, 1048537, 2097111, 4194261, 8388563, 16777169
Offset: 1

Views

Author

John K. Sikora, Jun 27 2014

Keywords

Comments

Conjecture: partial sums of A296965 (equivalent to observation about A183155 below). - Sean A. Irvine, Jul 16 2022

Crossrefs

Programs

  • Ruby
    puts (4..24).collect{|n| 2**n-2*n+1}
    
  • Ruby
    puts (4..24).collect {|n| (1..n).inject(0) {|sum, m| sum+m*2**(m-1)}-n-2*((1..(n-1)).inject(0) {|sum1, m1| sum1+m1*2**(m1-1)}-(n-1))-3*n+4}

Formula

It appears that for n >= 4, a(n) = 2^n - 2*n + 1 = A183155(n-1).
Also it appears that if we define NCD(N) = (Sum_{m=1..N} m*2^(m-1)) - N, then for n >= 4, a(n) = NCD(n) - 2*NCD(n-1) - 3*n + 4.

A132824 Row sums of triangle A132823.

Original entry on oeis.org

1, 2, 2, 4, 10, 24, 54, 116, 242, 496, 1006, 2028, 4074, 8168, 16358, 32740, 65506, 131040, 262110, 524252, 1048538, 2097112, 4194262, 8388564, 16777170, 33554384, 67108814, 134217676, 268435402, 536870856, 1073741766, 2147483588, 4294967234, 8589934528
Offset: 0

Views

Author

Gary W. Adamson, Sep 02 2007

Keywords

Examples

			a(4) = 10 = sum of row 4 terms of triangle A132823: (1 + 2 + 4 + 2 + 1).
a(3) = 4 = (1, 3, 3, 1) dot (1, 1, -1, 3) = (1 + 3 -3 + 3).
		

Crossrefs

Essentially the same as A132732.

Programs

Formula

Binomial transform of [1, 1, -1, 3, -1, 3, -1, 3, -1, 3, ...].
For n > 0, a(n) = 2 + 2^n - 2*n = 1 + A183155(n-1). - R. J. Mathar, Apr 04 2012
From Colin Barker, Jun 06 2014: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3) for n > 3.
G.f.: -(4*x^3-x^2-2*x+1)/((x-1)^2*(2*x-1)). (End)
For n > 1, a(n) = A132732(n-1). - Jeppe Stig Nielsen, Dec 29 2017
From Elmo R. Oliveira, Apr 03 2025: (Start)
E.g.f.: exp(x)*(exp(x) - 2*(x - 1)) - 2.
a(n) = 2*A000325(n-1) for n >= 1. (End)

A298636 Square array T(m,n) = number of ways to draw m-1 horizontal lines [a(i),b(i)] with 0 <= a(i) < b(i) <= n such that if two lines start or end on the same coordinate, no intermediate line crosses this coordinate (see comments); m, n >= 1.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 9, 1, 1, 10, 36, 23, 1, 1, 15, 100, 181, 53, 1, 1, 21, 225, 845, 775, 115, 1, 1, 28, 441, 2890, 5957, 2956, 241, 1, 1, 36, 784, 8036, 30862, 36148, 10426, 495, 1, 1, 45, 1296, 19278, 122276, 278530, 195934, 34899, 1005, 1, 1, 55, 2025, 41406, 398874, 1560118
Offset: 1

Views

Author

M. F. Hasler, Jan 23 2018

Keywords

Comments

Following the OEIS standard, the array is read by falling antidiagonals, i.e., T(1,1), T(1,2), T(2,1), T(1,3), ....
"Horizontal line [a(i),b(i)]" means a line from (a(i),i) to (b(i),i). "No intermediate line crosses..." means that, if {a(i),b(i)} and {a(j),b(j)} have x in common for some j > i, then for all i < k < j, either a(k) >= x or b(k) <= x.
Equivalently, number of (m-1) X n binary (0,1) matrices where each row has exactly one run of 1's and any two of these runs may not start or end at the same column border, unless no run in the intermediate rows crosses (= extends to both sides of) this border.
This construction is relevant for enumerating the tight pavings defined by Knuth in A285357, see his Christmas Tree Lecture video there.

Examples

			The table starts (cf. "table" link):
  1   1    1     1     1      1     1 ...
  1   3    6    10    15     21    28 ...  (= A000217 = n -> n(n+1)/2)
  1   9   36   100   225    441   784 ...  (= A000537 = A000217^2)
  1  23  181   845  2890   8036 19278...
  1  53  775  5957 30862 122276  ...
  1 115 2956 36148  ...
  ...
Column 2 is A183155.
The T(2,3) = 6 drawings are { [0-1], [0-2], [0-3], [1-2], [1-3], [2-3] }.
The T(3,2) = 9 drawings are { [0-1; 0-1], [0-1; 0-2], [0-1; 1-2], [0-2; 0-1], [0-2, 0-2], [0-2; 1-2], [1-2; 0-1], [1-2; 0-2], [1-2; 1-2] }.
The "no line crosses" condition becomes effective only for m > 3. For m = 4, it excludes drawings like, e.g., [0-1; 0-2; 0-1], [0-1; 0-2; 1-2], ...
Therefore, T(4,2) is less than 3*3*3 = 27: The T(4,2) = 23 drawings are:
{ [0-1; 0-1; 0-1], [0-1; 0-1; 0-2], [0-1; 0-2; 0-2], [0-2; 0-1; 0-1],
  [0-2; 0-1; 0-2], [0-2; 0-2; 0-1], [0-2; 0-2; 0-2], [0-1; 0-1; 1-2],
  [0-2; 0-1; 1-2], [0-2; 0-2; 1-2], [0-1; 1-2; 0-1], [0-1; 1-2; 0-2],
  [0-2; 1-2; 0-1], [0-2; 1-2; 0-2], [0-1; 1-2; 1-2], [0-2; 1-2; 1-2],
  [1-2; 0-1; 0-1], [1-2; 0-1; 0-2], [1-2; 0-2; 0-2], [1-2; 0-1; 1-2],
  [1-2; 1-2; 0-1], [1-2; 1-2; 0-2], [1-2; 1-2; 1-2] }
		

Crossrefs

Programs

  • PARI
    A298636(m, n, show=0, c=0)={ my(S, N, u=vector(m-1,i,1)); forvec(a=vector(m-1, i, [0, n-1]), S=Set(a); N=vector(n-1); for(i=1,#a, a[i] && N[a[i]]=if(N[a[i]],concat(N[a[i]],i),i)); forvec(b=vector(m-1, j, [a[j]+1, n]), S=N; for(i=1,#b, b[i]i || b[r]
    				
Showing 1-6 of 6 results.