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 24 results. Next

A377040 Antidiagonal-sums of absolute value of the array A377038(n,k) = n-th term of k-th differences of squarefree numbers (A005117).

Original entry on oeis.org

1, 3, 4, 9, 13, 18, 28, 39, 106, 267, 595, 1212, 2286, 4041, 6720, 10497, 15387, 20914, 25894, 29377, 37980, 70785, 175737, 343806, 579751, 861934, 1162080, 1431880, 1688435, 2589533, 8731932, 23911101, 58109574, 130912573, 276067892, 543833014, 992784443
Offset: 0

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Examples

			The fourth antidiagonal of A377038 is (6, 1, -1, -2, -3), so a(4) = 13.
		

Crossrefs

The version for primes is A376681, noncomposites A376684, composites A377035.
These are the antidiagonal-sums of the absolute value of A377038.
The non-absolute version is A377039.
For nonsquarefree numbers we have A377048, non-absolute A377047.
For prime-powers we have A377053, non-absolute A377052.
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.
A377041 gives first column of A377038, for primes A007442 or A030016.
A377042 gives first position of 0 in each row of A377038.

Programs

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

A377039 Antidiagonal-sums of the array A377038(n,k) = n-th term of k-th differences of squarefree numbers (A005117).

Original entry on oeis.org

1, 3, 4, 9, 1, 18, 8, -9, 106, -237, 595, -1170, 2276, -3969, 6640, -10219, 14655, -18636, 19666, -12071, -13056, 69157, -171441, 332756, -552099, 798670, -982472, 901528, -116173, -2351795, 8715186, -23856153, 57926066, -130281007, 273804642, -535390274
Offset: 0

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Comments

These are row-sums of the triangle-version of A377038.

Examples

			The fourth antidiagonal of A377038 is (6,1,-1,-2,-3), so a(4) = 1.
		

Crossrefs

The version for primes is A140119, noncomposites A376683, composites A377034.
These are the antidiagonal-sums of A377038.
The absolute version is A377040.
For nonsquarefree numbers we have A377047.
For prime-powers we have A377052.
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.
A377041 gives first column of A377038, for primes A007442 or A030016.
A377042 gives first position of 0 in each row of A377038.

Programs

  • Mathematica
    nn=20;
    t=Table[Take[Differences[NestList[NestWhile[#+1&,#+1,!SquareFreeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}];
    Total/@Table[t[[j,i-j+1]],{i,nn},{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 *)

A175804 Square array A(n,k), n>=0, k>=0, read by antidiagonals: A(n,k) is the n-th term of the k-th differences of partition numbers A000041.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, -1, 0, 1, 3, 2, 1, 1, 2, 5, -4, -2, -1, 0, 2, 7, 9, 5, 3, 2, 2, 4, 11, -21, -12, -7, -4, -2, 0, 4, 15, 49, 28, 16, 9, 5, 3, 3, 7, 22, -112, -63, -35, -19, -10, -5, -2, 1, 8, 30, 249, 137, 74, 39, 20, 10, 5, 3, 4, 12, 42, -539, -290, -153, -79, -40, -20, -10, -5, -2, 2, 14, 56
Offset: 0

Views

Author

Alois P. Heinz, Dec 04 2010

Keywords

Comments

Odlyzko showed that the k-th differences of A000041(n) alternate in sign with increasing n up to a certain index n_0(k) and then stay positive.
Are there any zeros after the first four, which all lie in columns k = 1, 2? - Gus Wiseman, Dec 15 2024

Examples

			Square array A(n,k) begins:
   1,  0,  1, -1,  2,  -4,   9,  ...
   1,  1,  0,  1, -2,   5, -12,  ...
   2,  1,  1, -1,  3,  -7,  16,  ...
   3,  2,  0,  2, -4,   9, -19,  ...
   5,  2,  2, -2,  5, -10,  20,  ...
   7,  4,  0,  3, -5,  10, -20,  ...
  11,  4,  3, -2,  5, -10,  22,  ...
		

Crossrefs

Columns k=0-5 give: A000041, A002865, A053445, A072380, A081094, A081095.
Main diagonal gives A379378.
For primes we have A095195 or A376682.
Row n = 0 is A281425.
Row n = 1 is A320590 except first term.
For composites we have A377033.
For squarefree numbers we have A377038.
For nonsquarefree numbers we have A377046.
For prime powers we have A377051.
Antidiagonal sums are A377056, absolute value version A378621.
The version for strict partitions is A378622, first column A293467.
A000009 counts strict integer partitions, differences A087897, A378972.

Programs

  • Maple
    A41:= combinat[numbpart]:
    DD:= proc(p) proc(n) option remember; p(n+1) -p(n) end end:
    A:= (n,k)-> (DD@@k)(A41)(n):
    seq(seq(A(n, d-n), n=0..d), d=0..11);
  • Mathematica
    max = 11; a41 = Array[PartitionsP, max+1, 0]; a[n_, k_] := Differences[a41, k][[n+1]]; Table[a[n, k-n], {k, 0, max}, {n, 0, k}] // Flatten (* Jean-François Alcover, Aug 29 2014 *)
    nn=5;Table[Table[Sum[(-1)^(k-i)*Binomial[k,i]*PartitionsP[n+i],{i,0,k}],{k,0,nn}],{n,0,nn}] (* Gus Wiseman, Dec 15 2024 *)

Formula

A(n,k) = (Delta^(k) A000041)(n).
A(n,k) = Sum_{i=0..k} (-1)^(k-i) * binomial(k,i) * A000041(n+i). In words, row x is the inverse zero-based binomial transform of A000041 shifted left x times. - Gus Wiseman, Dec 15 2024

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).

A377430 Numbers k such that there is exactly one squarefree number between prime(k)+1 and prime(k+1)-1.

Original entry on oeis.org

3, 4, 9, 10, 13, 14, 15, 22, 26, 33, 39, 48, 59, 60, 65, 85, 88, 89, 93, 104, 113, 116, 122, 142, 143, 147, 148, 155, 181, 188, 198, 201, 209, 212, 213, 224, 226, 234, 235, 244, 254, 264, 265, 268, 287, 288, 313, 320, 328, 332, 333, 341, 343, 353, 361, 366
Offset: 1

Views

Author

Gus Wiseman, Oct 29 2024

Keywords

Examples

			Primes 4 and 5 are 7 and 11, and the interval (8,9,10) contains only squarefree 10, so 4 is in the sequence.
		

Crossrefs

For composite instead of squarefree we have A029707.
These are the positions of 1 in A061398, or 2 in A373198.
For no squarefree numbers we have A068360.
For prime-power instead of squarefree we have A377287.
For at least one squarefree number we have A377431.
For perfect-power instead of squarefree we have A377434.
A000040 lists the primes, differences A001223, seconds A036263.
A002808 lists the composites, complement A008578.
A005117 lists the squarefree numbers, complement A013929.
A377038 gives k-differences of squarefree numbers.

Programs

  • Maple
    R:= NULL: count:= 0: q:= 2:
    for k from 1 while count < 100 do
      p:= q; q:= nextprime(q);
      if nops(select(numtheory:-issqrfree,[$p+1 .. q-1]))=1 then
        R:= R,k; count:= count+1;
     fi
    od:
    R; # Robert Israel, Nov 29 2024
  • Mathematica
    Select[Range[100], Length[Select[Range[Prime[#]+1,Prime[#+1]-1],SquareFreeQ]]==1&]
  • PARI
    is(n,p=prime(n))=my(q=nextprime(p+1),s); for(k=p+1,q-1, if(issquarefree(k) && s++>1, return(0))); s==1 \\ Charles R Greathouse IV, Nov 29 2024

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).

A377431 Numbers k such that there is at least one squarefree number between prime(k)+1 and prime(k+1)-1.

Original entry on oeis.org

3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 21, 22, 23, 24, 26, 27, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 42, 44, 46, 47, 48, 50, 51, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 84, 85, 86
Offset: 1

Views

Author

Gus Wiseman, Oct 29 2024

Keywords

Examples

			Primes 4 and 5 are 7 and 11, and the interval (8,9,10) contains 10, which is squarefree, so 4 is in the sequence.
		

Crossrefs

These are the positive positions in A061398, or terms >= 2 in A373198.
The complement (no squarefree numbers) is A068360.
For prime-power instead of squarefree we have A377057, strict version A377287.
For exactly one squarefree number we have A377430.
A000040 lists the primes, differences A001223, seconds A036263.
A002808 lists the composites, complement A008578.
A005117 lists the squarefree numbers, complement A013929.
A377038 gives k-differences of squarefree numbers.

Programs

  • Mathematica
    Select[Range[100], Length[Select[Range[Prime[#]+1,Prime[#+1]-1],SquareFreeQ]]>=1&]

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 24 results. Next