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 11-15 of 15 results.

A325699 Number of distinct even prime indices of n minus the number of distinct odd prime indices of n.

Original entry on oeis.org

0, -1, 1, -1, -1, 0, 1, -1, 1, -2, -1, 0, 1, 0, 0, -1, -1, 0, 1, -2, 2, -2, -1, 0, -1, 0, 1, 0, 1, -1, -1, -1, 0, -2, 0, 0, 1, 0, 2, -2, -1, 1, 1, -2, 0, -2, -1, 0, 1, -2, 0, 0, 1, 0, -2, 0, 2, 0, -1, -1, 1, -2, 2, -1, 0, -1, -1, -2, 0, -1, 1, 0, -1, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, May 17 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Crossrefs

Programs

  • Mathematica
    Table[Total[(-1)^PrimePi/@First/@If[n==1,{},FactorInteger[n]]],{n,100}]

Formula

G.f.: Sum_{k>=1} (-1)^k * x^prime(k) / (1 - x^prime(k)). - Ilya Gutkovskiy, Feb 12 2020
Additive with a(p^e) = (-1)^primepi(p). - Amiram Eldar, Jun 17 2024

A368175 Square array read by ascending antidiagonals: T(n,k) = Sum_{i=ceiling((k-n)/2)..floor((k+n-1)/2)} binomial(k,i), with n >= 1, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 2, 3, 3, 1, 2, 4, 6, 6, 1, 2, 4, 7, 10, 10, 1, 2, 4, 8, 14, 20, 20, 1, 2, 4, 8, 15, 25, 35, 35, 1, 2, 4, 8, 16, 30, 50, 70, 70, 1, 2, 4, 8, 16, 31, 56, 91, 126, 126, 1, 2, 4, 8, 16, 32, 62, 112, 182, 252, 252, 1, 2, 4, 8, 16, 32, 63, 119, 210, 336, 462, 462
Offset: 1

Views

Author

Paolo Xausa, Dec 14 2023

Keywords

Comments

T(n,k), for k >= 1, is the size of the largest possible set S of k-bit strings such that, if S_a < S_b are members of S, then W(S_b) < W(S_a) + n, where W is A000120.
T(1,k), for k >= 1, gives the number of rows in the Christmas tree pattern (cf. A367508) of order k. Furthermore, T(n,k), for k >= 1, gives the number of rows generated by iteratively applying k times the map described in A367508, starting from a single row of length n.

Examples

			Array begins:
  n\k|  0  1  2  3   4   5   6    7    8    9    10  ...
  ---+--------------------------------------------------
   1 |  1, 1, 2, 3,  6, 10, 20,  35,  70, 126,  252, ... = A001405
   2 |  1, 2, 3, 6, 10, 20, 35,  70, 126, 252,  462, ... = A001405
   3 |  1, 2, 4, 7, 14, 25, 50,  91, 182, 336,  672, ... = A026010
   4 |  1, 2, 4, 8, 15, 30, 56, 112, 210, 420,  792, ... = A026023
   5 |  1, 2, 4, 8, 16, 31, 62, 119, 238, 456,  912, ...
   6 |  1, 2, 4, 8, 16, 32, 63, 126, 246, 492,  957, ...
   7 |  1, 2, 4, 8, 16, 32, 64, 127, 254, 501, 1002, ...
   8 |  1, 2, 4, 8, 16, 32, 64, 128, 255, 510, 1012, ...
   9 |  1, 2, 4, 8, 16, 32, 64, 128, 256, 511, 1022, ...
  10 |  1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1023, ...
  ...
For n = 3 and k = 4 the 14 members of S are 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110.
		

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 4A: Combinatorial Algorithms, Part 1, Addison-Wesley, 2011, Section 7.2.1.6, exercises 71 and 72, pp. 479 and 799.

Crossrefs

Programs

  • Mathematica
    A368175[n_,k_]:=If[n>k,2^k,Sum[Binomial[k,i],{i,Ceiling[(k-n)/2],Floor[(k+n-1)/2]}]];
    With[{dmax=15},Table[A368175[n-k,k],{n,dmax},{k,0,n-1}]] (* Generates 15 antidiagonals *)

Formula

T(n,0) = 1.
T(1,k) = A001405(k).
T(n,k) = 2^k = A000079(k), for n > k.
T(n,n) = 2^n - 1 = A000225(n).
Antidiagonal sums: Sum_{n=1..d} T(n,d-n) = binomial(d+1,floor((d+1)/2)) - 1 = A014495(d+1), for d >= 1.

A118344 Pendular Catalan triangle, read by rows, where row n is formed from row n-1 by the recurrence: if n > 2k, T(n,k) = T(n,n-k) + T(n-1,k), else T(n,k) = T(n,n-1-k) - T(n-1,k) - T(n-1,k+1), for n>=k>=0, with T(n,0)=1 and T(n,n)=0^n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 2, 1, 0, 1, 4, 5, 3, 1, 0, 1, 5, 9, 5, 4, 1, 0, 1, 6, 14, 14, 9, 5, 1, 0, 1, 7, 20, 28, 14, 14, 6, 1, 0, 1, 8, 27, 48, 42, 28, 20, 7, 1, 0, 1, 9, 35, 75, 90, 42, 48, 27, 8, 1, 0, 1, 10, 44, 110, 165, 132, 90, 75, 35, 9, 1, 0, 1, 11, 54, 154, 275, 297, 132, 165, 110, 44, 10, 1, 0
Offset: 0

Views

Author

Paul D. Hanna, Apr 26 2006

Keywords

Comments

See A118340 for definition of pendular triangles and pendular sums.

Examples

			Row 6 equals the pendular sums of row 5:
  [1,  4,  5,  3,  1,  0], where the sums proceed as follows:
  [1, __, __, __, __, __]: T(6,0) = T(5,0) = 1;
  [1, __, __, __, __,  1]: T(6,5) = T(6,0) - T(5,5) = 1 - 0 = 1;
  [1,  5, __, __, __,  1]: T(6,1) = T(6,5) + T(5,1) = 1 + 4 = 5;
  [1,  5, __, __,  4,  1]: T(6,4) = T(6,1) - T(5,4) - T(5,5) = 5-1-0 = 4;
  [1,  5,  9, __,  4,  1]: T(6,2) = T(6,4) + T(5,2) = 4 + 5 = 9;
  [1,  5,  9,  5,  4,  1]: T(6,3) = T(6,2) - T(5,3) - T(5,4) = 9-3-1 = 5;
  [1,  5,  9,  5,  4,  1,  0] finally, append a zero to obtain row 6.
Triangle begins:
  1;
  1,  0;
  1,  1,  0;
  1,  2,  1,   0;
  1,  3,  2,   1,   0;
  1,  4,  5,   3,   1,   0;
  1,  5,  9,   5,   4,   1,   0;
  1,  6, 14,  14,   9,   5,   1,   0;
  1,  7, 20,  28,  14,  14,   6,   1,   0;
  1,  8, 27,  48,  42,  28,  20,   7,   1,  0;
  1,  9, 35,  75,  90,  42,  48,  27,   8,  1,  0;
  1, 10, 44, 110, 165, 132,  90,  75,  35,  9,  1,  0;
  1, 11, 54, 154, 275, 297, 132, 165, 110, 44, 10,  1,  0;
Central terms are Catalan numbers T(2*n,n) = A000108(n);
semi-diagonals form successive self-convolutions of the central terms:
  T(2*n+1,n) = [A000108^2](n),
  T(2*n+2,n) = [A000108^3](n).
		

Crossrefs

Cf. A000108, A033184, A118340, A026010 (row sums shift left).

Programs

  • Maple
    T:= proc(n, k) option remember;
          if k<0 or k>n then 0;
        elif k=0 then 1;
        elif k=n then 0;
        elif n>2*k then T(n, n-k) +T(n-1, k);
        else T(n, n-k-1) -T(n-1, k) -T(n-1, k+1);
          fi; end:
    seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Mar 17 2021
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==0, 1, If[k==n, 0, If[n>2*k, T[n, n-k] +T[n-1, k], T[n, n-k-1] -T[n-1, k] -T[n-1, k+1] ]]]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 17 2021 *)
  • PARI
    T(n,k)=if(n2*k,T(n,n-k)+T(n-1,k),T(n,n-1-k)-T(n-1,k)-if(n-1>k,T(n-1,k+1)) ))))
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==0): return 1
        elif (k==n): return 0
        elif (n>2*k): return T(n, n-k) +T(n-1, k)
        else: return T(n, n-k-1) -T(n-1, k) -T(n-1, k+1)
    flatten([[T(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 17 2021

Formula

T(2*n+m, n) = [A000108^(m+1)](n), i.e., the m-th lower semi-diagonal forms the self-convolution (m+1)-power of A000108.
Sum_{k=0..n} T(n,k) = (1/2)*[n=0] + A026010(n-1) = (1/2)*[n=0] + (1/2)^((5 + (-1)^n)/2)*(6*n + 1 + 3*(-1)^n)*Catalan((2*n - 1 + (-1)^n)/4). - G. C. Greubel, Mar 17 2021

A096921 Triangle array of binomial coefficients.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 3, 3, 6, 1, 1, 3, 4, 6, 10, 1, 1, 4, 4, 10, 10, 20, 1, 1, 4, 5, 10, 15, 20, 35, 1, 1, 5, 5, 15, 15, 35, 35, 70, 1, 1, 5, 6, 15, 21, 35, 56, 70, 126, 1, 1, 6, 6, 21, 21, 56, 56, 126, 126, 252, 1, 1, 6, 7, 21, 28, 56, 84, 126, 210, 252, 462
Offset: 0

Views

Author

Paul Barry, Jul 15 2004

Keywords

Examples

			Triangle begins:
      k=0  1  2  3  4  5
  n=0:  1;
  n=1:  1, 1;
  n=2:  1, 1, 2;
  n=3:  1, 1, 2, 3;
  n=4:  1, 1, 3, 3, 6;
  n=5:  1, 1, 3, 4, 6, 10;
  ...
		

Crossrefs

Cf. A026010 (row sums), A016116 (diagonal sums), A001405 (main diagonal).

Programs

  • Mathematica
    T[n_, k_]=Binomial[Floor[(n+k)/2], Floor[k/2]]; Table[T[n,k],{n,0,11},{k,0,n}] (* Stefano Spezia, Aug 23 2022 *)
  • PARI
    T(n, k) = binomial((n+k)\2, k\2); \\ Michel Marcus, Oct 29 2022

Formula

T(n, k) = binomial(floor((n+k)/2), floor(k/2)).

A107249 A number triangle with repeated columns of binomial coefficients.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 2, 1, 1, 6, 3, 3, 2, 1, 1, 10, 6, 6, 3, 3, 1, 1, 20, 10, 10, 6, 4, 3, 1, 1, 35, 20, 20, 10, 10, 4, 4, 1, 1, 70, 35, 35, 20, 15, 10, 5, 4, 1, 1, 126, 70, 70, 35, 35, 15, 15, 5, 5, 1, 1, 252, 126, 126, 70, 56, 35, 21, 15, 6, 5, 1, 1, 462, 252, 252, 126, 126
Offset: 0

Views

Author

Paul Barry, May 14 2005

Keywords

Comments

Reversal of A096921. Row sums are A026010. Diagonal sums are 107250.

Examples

			Triangle begins
1;
1,1;
1,1,1;
2,1,1,1;
3,2,2,1,1;
6,3,3,2,1,1;
10,6,6,3,3,1,1;
		

Formula

Number triangle T(n, k)=C(floor((2n-k-2)/2), floor((n-k)/2))
Previous Showing 11-15 of 15 results.