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-10 of 31 results. Next

A377056 Antidiagonal-sums of the array A175804(n,k) = n-th term of k-th differences of partition numbers (A000041).

Original entry on oeis.org

1, 1, 4, 3, 11, 2, 36, -27, 142, -207, 595, -1066, 2497, -4878, 10726, -22189, 48383, -103318, 224296, -480761, 1030299, -2186942, 4626313, -9740648, 20492711, -43109372, 90843475, -191769296, 405528200, -858373221, 1817311451, -3845483855, 8129033837
Offset: 0

Views

Author

Gus Wiseman, Dec 12 2024

Keywords

Examples

			Antidiagonal i + j = 3 of A175804 is (3, 1, 0, -1), so a(3) = 3.
		

Crossrefs

For primes we have A140119 or A376683, unsigned A376681 or A376684.
These are the antidiagonal-sums of A175804.
First column of the same array is A281425.
For composites we have A377034, unsigned A377035.
For squarefree numbers we have A377039, unsigned A377040.
For nonsquarefree numbers we have A377049, unsigned A377048.
For prime powers we have A377052, unsigned A377053.
The unsigned version is A378621.
The version for strict partitions is A378970 (row-sums of A378622), unsigned A378971.
A000009 counts strict integer partitions, differences A087897, A378972.
A000041 counts integer partitions, differences A002865, A053445.

Programs

  • Mathematica
    nn=20;
    t=Table[Differences[PartitionsP/@Range[0,2nn],k],{k,0,nn}];
    Total/@Table[t[[j,i-j+1]],{i,nn},{j,i}]

A378621 Antidiagonal-sums of absolute value of the array A175804(n,k) = n-th term of k-th differences of partition numbers (A000041).

Original entry on oeis.org

1, 1, 4, 5, 11, 16, 36, 65, 142, 285, 595, 1210, 2497, 5134, 10726, 22637, 48383, 104066, 224296, 481985, 1030299, 2188912, 4626313, 9743750, 20492711, 43114180, 90843475, 191776658, 405528200, 858384333, 1817311451, 3845500427, 8129033837, 17162815092
Offset: 0

Views

Author

Gus Wiseman, Dec 14 2024

Keywords

Examples

			Antidiagonal i + j = 3 of A175804 is (3, 1, 0, -1), so a(3) = 5.
		

Crossrefs

These are the antidiagonal-sums of the absolute value of A175804.
First column of the same array is A281425.
For primes we have A376681 or A376684, signed A140119 or A376683.
For composites we have A377035, signed A377034.
For squarefree numbers we have A377040, signed A377039.
For nonsquarefree numbers we have A377048, signed A377049.
For prime powers we have A377053, signed A377052.
The signed version is A377056.
The corresponding array for strict partitions is A378622, see A293467, A377285, A378971, A378970.
A000009 counts strict integer partitions, differences A087897, A378972.
A000041 counts integer partitions, differences A002865, A053445.

Programs

  • Mathematica
    nn=30;
    q=Table[PartitionsP[n],{n,0,nn}];
    t=Table[Sum[(-1)^(j-k)*Binomial[j,k]*q[[i+k]],{k,0,j}],{j,0,Length[q]/2},{i,Length[q]/2}]
    Total/@Abs/@Table[t[[j,i-j+1]],{i,nn/2},{j,i}]

A377051 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the powers of primes.

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 4, 1, 0, 0, 5, 1, 0, 0, 0, 7, 2, 1, 1, 1, 1, 8, 1, -1, -2, -3, -4, -5, 9, 1, 0, 1, 3, 6, 10, 15, 11, 2, 1, 1, 0, -3, -9, -19, -34, 13, 2, 0, -1, -2, -2, 1, 10, 29, 63, 16, 3, 1, 1, 2, 4, 6, 5, -5, -34, -97, 17, 1, -2, -3, -4, -6, -10, -16, -21, -16, 18, 115
Offset: 0

Views

Author

Gus Wiseman, Oct 20 2024

Keywords

Comments

Row k of the array is the k-th differences of A000961.

Examples

			Array form:
        n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  ----------------------------------------------------------
  k=0:   1     2     3     4     5     7     8     9    11
  k=1:   1     1     1     1     2     1     1     2     2
  k=2:   0     0     0     1    -1     0     1     0     1
  k=3:   0     0     1    -2     1     1    -1     1    -3
  k=4:   0     1    -3     3     0    -2     2    -4     6
  k=5:   1    -4     6    -3    -2     4    -6    10    -8
  k=6:  -5    10    -9     1     6   -10    16   -18     5
  k=7:  15   -19    10     5   -16    26   -34    23     9
  k=8: -34    29    -5   -21    42   -60    57   -14   -42
  k=9:  63   -34   -16    63  -102   117   -71   -28   104
Triangle form:
    1
    2    1
    3    1    0
    4    1    0    0
    5    1    0    0    0
    7    2    1    1    1    1
    8    1   -1   -2   -3   -4   -5
    9    1    0    1    3    6   10   15
   11    2    1    1    0   -3   -9  -19  -34
   13    2    0   -1   -2   -2    1   10   29   63
   16    3    1    1    2    4    6    5   -5  -34  -97
		

Crossrefs

Row k=0 is A000961, exclusive A246655.
Row k=1 is A057820.
Row k=2 is A376596.
The version for primes is A095195, noncomposites A376682, composites A377033.
A version for partitions is A175804, cf. A053445, A281425, A320590.
For squarefree numbers we have A377038, nonsquarefree A377046.
Triangle row-sums are A377052, absolute version A377053.
Column n = 1 is A377054, for primes A007442 or A030016.
First position of 0 in each row is A377055.
A000040 lists the primes, differences A001223, seconds A036263.
A023893 and A023894 count integer partitions into prime-powers, factorizations A000688.

Programs

  • Mathematica
    nn=12;
    t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1,!PrimePowerQ[#]&]&,1,2*nn],k],nn],{k,0,nn}]
    Table[t[[j,i-j+1]],{i,nn},{j,i}]

Formula

A(i,j) = Sum_{k=0..j} (-1)^(j-k)*binomial(j,k)*A000961(i+k).

A095195 T(n,0) = prime(n), T(n,k) = T(n,k-1)-T(n-1,k-1), 0<=k

Original entry on oeis.org

2, 3, 1, 5, 2, 1, 7, 2, 0, -1, 11, 4, 2, 2, 3, 13, 2, -2, -4, -6, -9, 17, 4, 2, 4, 8, 14, 23, 19, 2, -2, -4, -8, -16, -30, -53, 23, 4, 2, 4, 8, 16, 32, 62, 115, 29, 6, 2, 0, -4, -12, -28, -60, -122, -237, 31, 2, -4, -6, -6, -2, 10, 38, 98, 220, 457, 37, 6, 4, 8, 14, 20, 22, 12
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 22 2004

Keywords

Comments

T(n,0)=A000040(n); T(n,1)=A001223(n-1) for n>1; T(n,2)=A036263(n-2) for n>2; T(n,n-1)=A007442(n) for n>1.
Row k of the array (not the triangle) is the k-th differences of the prime numbers. - Gus Wiseman, Jan 11 2025

Examples

			Triangle begins:
   2;
   3,  1;
   5,  2,  1;
   7,  2,  0, -1;
  11,  4,  2,  2,  3;
  13,  2, -2, -4, -6, -9;
Alternative: array form read by antidiagonals:
     2,   3,   5,   7,  11,  13,  17,  19,  23,  29,  31,...
     1,   2,   2,   4,   2,   4,   2,   4,   6,   2,   6,...
     1,   0,   2,  -2,   2,  -2,   2,   2,  -4,   4,  -2,...
    -1,   2,  -4,   4,  -4,   4,   0,  -6,   8,  -6,   0,...
     3,  -6,   8,  -8,   8,  -4,  -6,  14, -14,   6,   4,...
    -9,  14, -16,  16, -12,  -2,  20, -28,  20,  -2,  -8,...
    23, -30,  32, -28,  10,  22, -48,  48, -22,  -6,  10,..,
   -53,  62, -60,  38,  12, -70,  96, -70,  16,  16, -12,...
   115,-122,  98, -26, -82, 166,-166,  86,   0, -28,  28,...
  -237, 220,-124, -56, 248,-332, 252, -86, -28,  56, -98,...
   457,-344,  68, 304,-580, 584,-338,  58,  84,-154, 308,...
		

Crossrefs

Cf. A140119 (row sums).
Below, the inclusive primes (A008578) are 1 followed by A000040. See also A075526.
Rows of the array (columns of the triangle) begin: A000040, A001223, A036263.
Column n = 1 of the array is A007442, inclusive A030016.
The version for partition numbers is A175804, see A053445, A281425, A320590.
First position of 0 is A376678, inclusive A376855.
Absolute antidiagonal-sums are A376681, inclusive A376684.
The inclusive version is A376682.
For composite instead of prime we have A377033, see A377034-A377037.
For squarefree instead of prime we have A377038, nonsquarefree A377046.
Column n = 2 of the array is A379542.

Programs

  • Haskell
    a095195 n k = a095195_tabl !! (n-1) !! (k-1)
    a095195_row n = a095195_tabl !! (n-1)
    a095195_tabl = f a000040_list [] where
       f (p:ps) xs = ys : f ps ys where ys = scanl (-) p xs
    -- Reinhard Zumkeller, Oct 10 2013
  • Maple
    A095195A := proc(n,k) # array, k>=0, n>=0
        option remember;
        if n =0 then
            ithprime(k+1) ;
        else
            procname(n-1,k+1)-procname(n-1,k) ;
        end if;
    end proc:
    A095195 := proc(n,k) # triangle, 0<=k=1
            A095195A(k,n-k-1) ;
    end proc: # R. J. Mathar, Sep 19 2013
  • Mathematica
    T[n_, 0] := Prime[n]; T[n_, k_] /; 0 <= k < n := T[n, k] = T[n, k-1] - T[n-1, k-1]; Table[T[n, k], {n, 1, 12}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Feb 01 2017 *)
    nn=6;
    t=Table[Differences[Prime[Range[nn]],k],{k,0,nn}];
    Table[t[[j,i-j+1]],{i,nn},{j,i}] (* Gus Wiseman, Jan 11 2025 *)

A281425 a(n) = [q^n] (1 - q)^n / Product_{j=1..n} (1 - q^j).

Original entry on oeis.org

1, 0, 1, -1, 2, -4, 9, -21, 49, -112, 249, -539, 1143, -2396, 5013, -10550, 22420, -48086, 103703, -223806, 481388, -1029507, 2187944, -4625058, 9742223, -20490753, 43111808, -90840465, 191773014, -405523635, 858378825, -1817304609, 3845492204, -8129023694, 17162802918, -36191083386
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 05 2017

Keywords

Comments

a(n) is n-th term of the Euler transform of -n + 1, 1, 1, 1, ...
Inverse zero-based binomial transform of A000041. The version for strict partitions is A380412, or A293467 up to sign. - Gus Wiseman, Feb 06 2025

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0,
          combinat[numbpart](n), b(n, k-1)-b(n-1, k-1))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..35);  # Alois P. Heinz, Dec 21 2024
  • Mathematica
    Table[SeriesCoefficient[(1 - q)^n / Product[(1 - q^j), {j, 1, n}], {q, 0, n}], {n, 0, 35}]
    Table[SeriesCoefficient[(1 - q)^n QPochhammer[q^(1 + n), q]/QPochhammer[q, q], {q, 0, n}], {n, 0, 35}]
    Table[SeriesCoefficient[1/QFactorial[n, q], {q, 0, n}], {n, 0, 35}]
    Table[Differences[PartitionsP[Range[0, n]], n], {n, 0, 35}] // Flatten
    Table[Sum[(-1)^j*Binomial[n, j]*PartitionsP[n-j], {j, 0, n}], {n, 0, 30}] (* Vaclav Kotesovec, Oct 06 2017 *)

Formula

a(n) = [q^n] 1/((1 + q)*(1 + q + q^2)*...*(1 + q + ... + q^(n-1))).
a(n) = Sum_{j=0..n} (-1)^j * binomial(n, j) * A000041(n-j). - Vaclav Kotesovec, Oct 06 2017
a(n) ~ (-1)^n * 2^(n - 3/2) * exp(Pi*sqrt(n/12) + Pi^2/96) / (sqrt(3)*n). - Vaclav Kotesovec, May 07 2018

A377046 Array read by downward antidiagonals where A(n,k) is the n-th term of the k-th differences of nonsquarefree numbers.

Original entry on oeis.org

4, 8, 4, 9, 1, -3, 12, 3, 2, 5, 16, 4, 1, -1, -6, 18, 2, -2, -3, -2, 4, 20, 2, 0, 2, 5, 7, 3, 24, 4, 2, 2, 0, -5, -12, -15, 25, 1, -3, -5, -7, -7, -2, 10, 25, 27, 2, 1, 4, 9, 16, 23, 25, 15, -10, 28, 1, -1, -2, -6, -15, -31, -54, -79, -94, -84, 32, 4, 3, 4, 6, 12, 27, 58, 112, 191, 285, 369
Offset: 0

Views

Author

Gus Wiseman, Oct 19 2024

Keywords

Comments

Row k is the k-th differences of A013929.

Examples

			Array form:
        n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  ---------------------------------------------------------
  k=0:   4     8     9    12    16    18    20    24    25
  k=1:   4     1     3     4     2     2     4     1     2
  k=2:  -3     2     1    -2     0     2    -3     1    -1
  k=3:   5    -1    -3     2     2    -5     4    -2     4
  k=4:  -6    -2     5     0    -7     9    -6     6    -7
  k=5:   4     7    -5    -7    16   -15    12   -13    10
  k=6:   3   -12    -2    23   -31    27   -25    23   -13
  k=7: -15    10    25   -54    58   -52    48   -36    13
  k=8:  25    15   -79   112  -110   100   -84    49     1
  k=9: -10   -94   191  -222   210  -184   133   -48   -57
Triangle form:
   4
   8   4
   9   1  -3
  12   3   2   5
  16   4   1  -1  -6
  18   2  -2  -3  -2   4
  20   2   0   2   5   7   3
  24   4   2   2   0  -5 -12 -15
  25   1  -3  -5  -7  -7  -2  10  25
  27   2   1   4   9  16  23  25  15 -10
  28   1  -1  -2  -6 -15 -31 -54 -79 -94 -84
  32   4   3   4   6  12  27  58 112 191 285 369
		

Crossrefs

Initial rows: A013929, A078147, A376593.
The version for primes is A095195, noncomposites A376682, composites A377033.
A version for partitions is A175804, cf. A053445, A281425, A320590.
For squarefree numbers we have A377038, sums A377039, absolute A377040.
Triangle row-sums are A377047, absolute version A377048.
Column n = 1 is A377049, for squarefree A377041, for prime A007442 or A030016.
First position of 0 in each row is A377050.
For prime-power instead of nonsquarefree we have A377051.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A073576 counts integer partitions into squarefree numbers, factorizations A050320.

Programs

  • Mathematica
    nn=9;
    t=Table[Take[Differences[NestList[NestWhile[#+1&,#+1,SquareFreeQ[#]&]&,4,2*nn],k],nn],{k,0,nn}]
    Table[t[[j,i-j+1]],{i,nn},{j,i}]

Formula

A(i,j) = sum_{k=0..j} (-1)^(j-k) binomial(j,k) A013929(i+k).

A293467 a(n) = Sum_{k=0..n} (-1)^k * binomial(n, k) * q(k), where q(k) is A000009 (partitions into distinct parts).

Original entry on oeis.org

1, 0, 0, -1, -3, -7, -14, -25, -41, -64, -100, -165, -294, -550, -1023, -1795, -2823, -3658, -2882, 2873, 20435, 62185, 148863, 314008, 613957, 1155794, 2175823, 4244026, 8753538, 19006490, 42471787, 95234575, 210395407, 453413866, 949508390, 1931939460
Offset: 0

Views

Author

Vaclav Kotesovec, Oct 09 2017

Keywords

Comments

Multiply by (-1)^n to get A380412, which is the first term of the n-th differences of the strict partition numbers, or column n=0 of A378622. - Gus Wiseman, Feb 04 2025

Crossrefs

The non-strict version is the absolute value of A281425; see A175804, A320590.
Up to sign, same as A380412. See A320591, A377285, A378970, A378971.
A000009 counts strict integer partitions, differences A087897.

Programs

  • Mathematica
    Table[Sum[(-1)^k * Binomial[n, k] * PartitionsQ[k], {k, 0, n}], {n, 0, 50}]

A377038 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the squarefree numbers.

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 5, 2, 1, 1, 6, 1, -1, -2, -3, 7, 1, 0, 1, 3, 6, 10, 3, 2, 2, 1, -2, -8, 11, 1, -2, -4, -6, -7, -5, 3, 13, 2, 1, 3, 7, 13, 20, 25, 22, 14, 1, -1, -2, -5, -12, -25, -45, -70, -92, 15, 1, 0, 1, 3, 8, 20, 45, 90, 160, 252, 17, 2, 1, 1, 0, -3, -11, -31, -76, -166, -326, -578
Offset: 0

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Comments

Row n is the k-th differences of A005117 = the squarefree numbers.

Examples

			Array form:
        n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  ----------------------------------------------------------
  k=0:   1     2     3     5     6     7    10    11    13
  k=1:   1     1     2     1     1     3     1     2     1
  k=2:   0     1    -1     0     2    -2     1    -1     0
  k=3:   1    -2     1     2    -4     3    -2     1     1
  k=4:  -3     3     1    -6     7    -5     3     0    -2
  k=5:   6    -2    -7    13   -12     8    -3    -2     3
  k=6:  -8    -5    20   -25    20   -11     1     5    -5
  k=7:   3    25   -45    45   -31    12     4   -10    10
  k=8:  22   -70    90   -76    43    -8   -14    20   -19
  k=9: -92   160  -166   119   -51    -6    34   -39    28
Triangle form:
   1
   2   1
   3   1   0
   5   2   1   1
   6   1  -1  -2  -3
   7   1   0   1   3   6
  10   3   2   2   1  -2  -8
  11   1  -2  -4  -6  -7  -5   3
  13   2   1   3   7  13  20  25  22
  14   1  -1  -2  -5 -12 -25 -45 -70 -92
  15   1   0   1   3   8  20  45  90 160 252
		

Crossrefs

Row k=0 is A005117.
Row k=1 is A076259.
Row k=2 is A376590.
The version for primes is A095195, noncomposites A376682, composites A377033.
A version for partitions is A175804, cf. A053445, A281425, A320590.
Triangle row-sums are A377039, absolute version A377040.
Column n = 1 is A377041, for primes A007442 or A030016.
First position of 0 in each row is A377042.
For nonsquarefree instead of squarefree numbers we have A377046.
For prime-powers instead of squarefree numbers we have A377051.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, complement A013929 (differences A078147).
A073576 counts integer partitions into squarefree numbers, factorizations A050320.

Programs

  • Mathematica
    nn=9;
    t=Table[Take[Differences[NestList[NestWhile[#+1&,#+1,!SquareFreeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}]
    Table[t[[j,i-j+1]],{i,nn},{j,i}]

Formula

A(i,j) = sum_{k=0..j} (-1)^(j-k) binomial(j,k) A005117(i+k).

A377033 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the composite numbers (A002808).

Original entry on oeis.org

4, 6, 2, 8, 2, 0, 9, 1, -1, -1, 10, 1, 0, 1, 2, 12, 2, 1, 1, 0, -2, 14, 2, 0, -1, -2, -2, 0, 15, 1, -1, -1, 0, 2, 4, 4, 16, 1, 0, 1, 2, 2, 0, -4, -8, 18, 2, 1, 1, 0, -2, -4, -4, 0, 8, 20, 2, 0, -1, -2, -2, 0, 4, 8, 8, 0, 21, 1, -1, -1, 0, 2, 4, 4, 0, -8, -16, -16
Offset: 0

Views

Author

Gus Wiseman, Oct 17 2024

Keywords

Comments

Row n is the k-th differences of A002808 = the composite numbers.

Examples

			Array begins:
        n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  ----------------------------------------------------------
  k=0:   4     6     8     9    10    12    14    15    16
  k=1:   2     2     1     1     2     2     1     1     2
  k=2:   0    -1     0     1     0    -1     0     1     0
  k=3:  -1     1     1    -1    -1     1     1    -1    -1
  k=4:   2     0    -2     0     2     0    -2     0     2
  k=5:  -2    -2     2     2    -2    -2     2     2    -2
  k=6:   0     4     0    -4     0     4     0    -4    -1
  k=7:   4    -4    -4     4     4    -4    -4     3    10
  k=8:  -8     0     8     0    -8     0     7     7   -29
  k=9:   8     8    -8    -8     8     7     0   -36    63
Triangle begins:
    4
    6    2
    8    2    0
    9    1   -1   -1
   10    1    0    1    2
   12    2    1    1    0   -2
   14    2    0   -1   -2   -2    0
   15    1   -1   -1    0    2    4    4
   16    1    0    1    2    2    0   -4   -8
   18    2    1    1    0   -2   -4   -4    0    8
   20    2    0   -1   -2   -2    0    4    8    8    0
   21    1   -1   -1    0    2    4    4    0   -8  -16  -16
		

Crossrefs

Initial rows: A002808, A073783, A073445.
The version for primes is A095195 or A376682.
A version for partitions is A175804, cf. A053445, A281425, A320590.
Triangle row-sums are A377034, absolute version A377035.
Column n = 1 is A377036, for primes A007442 or A030016.
First position of 0 in each row is A377037.
Other arrays of differences: A095195 (prime), A376682 (noncomposite), A377033 (composite), A377038 (squarefree), A377046 (nonsquarefree), A377051 (prime-power).
A000040 lists the primes, differences A001223, seconds A036263.
A008578 lists the noncomposites, differences A075526.
Cf. A065310, A065890, A084758, A173390, A350004, A376602 (zero), A376603 (nonzero), A376651 (positive), A376652 (negative), A376680.

Programs

  • Mathematica
    nn=9;
    t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1,PrimeQ]&,4,2*nn],k],nn],{k,0,nn}]

Formula

A(i,j) = Sum_{k=0..j} (-1)^(j-k) binomial(j,k) A002808(i+k).

A376682 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the noncomposite numbers (A008578).

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 5, 2, 1, 1, 7, 2, 0, -1, -2, 11, 4, 2, 2, 3, 5, 13, 2, -2, -4, -6, -9, -14, 17, 4, 2, 4, 8, 14, 23, 37, 19, 2, -2, -4, -8, -16, -30, -53, -90, 23, 4, 2, 4, 8, 16, 32, 62, 115, 205, 29, 6, 2, 0, -4, -12, -28, -60, -122, -237, -442, 31, 2, -4, -6, -6, -2, 10, 38, 98, 220, 457, 899
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2024

Keywords

Comments

Row k is the k-th differences of the noncomposite numbers.

Examples

			Array begins:
         n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  -----------------------------------------------------------
  k=0:    1     2     3     5     7    11    13    17    19
  k=1:    1     1     2     2     4     2     4     2     4
  k=2:    0     1     0     2    -2     2    -2     2     2
  k=3:    1    -1     2    -4     4    -4     4     0    -6
  k=4:   -2     3    -6     8    -8     8    -4    -6    14
  k=5:    5    -9    14   -16    16   -12    -2    20   -28
  k=6:  -14    23   -30    32   -28    10    22   -48    48
  k=7:   37   -53    62   -60    38    12   -70    96   -70
  k=8:  -90   115  -122    98   -26   -82   166  -166    86
  k=9:  205  -237   220  -124   -56   248  -332   252   -86
Triangle begins:
    1
    2    1
    3    1    0
    5    2    1    1
    7    2    0   -1   -2
   11    4    2    2    3    5
   13    2   -2   -4   -6   -9  -14
   17    4    2    4    8   14   23   37
   19    2   -2   -4   -8  -16  -30  -53  -90
   23    4    2    4    8   16   32   62  115  205
   29    6    2    0   -4  -12  -28  -60 -122 -237 -442
   31    2   -4   -6   -6   -2   10   38   98  220  457  899
		

Crossrefs

The version for modern primes (A000040) is A095195.
Initial rows: A008578, A075526, A036263 with 0 prepended.
Column n = 1 is A030016 (modern A007442).
A version for partitions is A175804, cf. A053445, A281425, A320590.
Antidiagonal-sums are A376683 (modern A140119), absolute A376684 (modern A376681).
First position of 0 is A376855 (modern A376678).
For composite instead of prime we have A377033.
For squarefree instead of prime we have A377038, nonsquarefree A377046.
For prime-power instead of composite we have A377051.
A000040 lists the primes, differences A001223, second A036263.

Programs

  • Mathematica
    nn=12;
    t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1,!PrimeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}]
    (* or *)
    nn=12;
    q=Table[If[n==0,1,Prime[n]],{n,0,2nn}];
    Table[Sum[(-1)^(j-k)*Binomial[j,k]*q[[i+k]],{k,0,j}],{j,0,nn},{i,nn}]

Formula

A(i,j) = Sum_{k=0..j} (-1)^(j-k) binomial(j,k) A008578(i+k).
Showing 1-10 of 31 results. Next