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

A051159 Triangle read by rows: T(n, k) = binomial(n mod 2, k mod 2) * binomial(n div 2, k div 2), where 'div' denotes integer division.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 2, 2, 1, 1, 1, 0, 3, 0, 3, 0, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 0, 4, 0, 6, 0, 4, 0, 1, 1, 1, 4, 4, 6, 6, 4, 4, 1, 1, 1, 0, 5, 0, 10, 0, 10, 0, 5, 0, 1, 1, 1, 5, 5, 10, 10, 10, 10, 5, 5, 1, 1, 1, 0, 6, 0, 15, 0, 20, 0, 15, 0, 6, 0, 1, 1, 1, 6, 6, 15, 15, 20, 20, 15, 15, 6, 6, 1, 1
Offset: 0

Views

Author

Michael Somos, Oct 14 1999

Keywords

Comments

Previous name: Triangular array made of three copies of Pascal's triangle.
Computing each term modulo 2 also gives A047999, i.e., a(n) mod 2 = A007318(n) mod 2 for all n. (The triangle is paritywise isomorphic to Pascal's Triangle.) - Antti Karttunen
5th row/column gives entries of A000217 (triangular numbers C(n+1,2)) repeated twice and every other entry in 6th row/column form A000217. 7th row/column gives entries of A000292 (Tetrahedral (or pyramidal) nos: C(n+3,3)) repeated twice and every other entry in 8th row/column form A000292. 9th row/column gives entries of A000332 (binomial coefficients binomial(n,4)) repeated twice and every other entry in 10th row/column form A000332. 11th row/column gives entries of A000389 (binomial coefficients C(n,5)) repeated twice and every other entry in 12th row/column form A000389. - Gerald McGarvey, Aug 21 2004
If Sum_{k=0..n} A(k)*T(n,k) = B(n), the sequence B is the S-D transform of the sequence A. - Philippe Deléham, Aug 02 2006
Number of n-bead black-white reversible strings with k black beads; also binary grids; string is palindromic. - Yosu Yurramendi, Aug 07 2008
Row sums give A016116(n+1). - Yosu Yurramendi, Aug 07 2008 [corrected by Petros Hadjicostas, Nov 04 2017]
Coefficients in expansion of (x + y)^n where x and y anticommute (y x = -x y), that is, q-binomial coefficients when q = -1. - Michael Somos, Feb 16 2009
The sequence of coefficients of a general polynomial recursion that links at w=2 to the Pascal triangle is here w=0. Row sums are {1, 2, 2, 4, 4, 8, 8, 16, 16, 32, 32, 64, ...}. - Roger L. Bagula and Gary W. Adamson, Dec 04 2009
T(n,k) is the number of palindromic compositions of n+1 with exactly k+1 parts. T(6,4) = 3 because we have the following compositions of n+1=7 with length k+1=5: 1+1+3+1+1, 2+1+1+1+2, 1+2+1+2+1. - Geoffrey Critzer, Mar 15 2014 [corrected by Petros Hadjicostas, Nov 03 2017]
Let P(n,k) be the number of palindromic compositions of n with exactly k parts. MacMahon (1893) was the first to prove that P(n,k) = T(n-1,k-1), where T(n,k) are the numbers in this sequence (see the comment above by G. Critzer). He actually proved that, for 1 <= s <= m, we have P(2*m,2*s) = P(2*m,2*s-1) = P(2*m-1, 2*s-1) = bin(m-1, s-1), but P(2*m-1, 2*s) = 0. For the current sequence, this can be translated into T(2*m-1, 2*s-1) = T(2*m-1,2*s-2) = T(2*m-2, 2*s-2) = bin(m-1,s-1), but T(2m-2, 2*s-1) = 0 (valid again for 1 <= s <= m). - Petros Hadjicostas, Nov 03 2017
T is the infinite lower triangular matrix for this sequence; define two others, U and V; let U(n,k)=e_k(-1,2,-3,...,(-1)^n n), where e_k is the k-th elementary symmetric polynomial, and let V be the diagonal matrix A057077 (periodic sequence 1,1,-1,-1). Clearly V^-1 = V. Conjecture: U = U^-1, T = U . V, T^-1 = V . U, and |T| = |U|. - George Beck, Dec 16 2017
Let T*(n,k)=T(n,k) except when n is odd and k=(n+1)/2, where T*(n,k) = T(n,k)+2^((n-1)/2). Thus, T*(n,k) is the number of non-isomorphic symmetric stairs with n cells and k steps, i.e., k-1 changes of direction. See A016116. - Christian Barrientos and Sarah Minion, Jul 29 2018

Examples

			Triangle starts:
{1},
{1,  1},
{1,  0,  1},
{1,  1,  1,  1},
{1,  0,  2,  0,  1},
{1,  1,  2,  2,  1,  1},
{1,  0,  3,  0,  3,  0,  1},
{1,  1,  3,  3,  3,  3,  1,  1},
{1,  0,  4,  0,  6,  0,  4,  0,  1},
{1,  1,  4,  4,  6,  6,  4,  4,  1,  1},
{1,  0,  5,  0, 10,  0, 10,  0,  5,  0,  1},
{1,  1,  5,  5, 10, 10, 10, 10,  5,  5,  1,  1}
... - _Roger L. Bagula_ and _Gary W. Adamson_, Dec 04 2009
		

Crossrefs

Programs

  • Haskell
    a051159 n k = a051159_tabl !! n !! k
    a051159_row n = a051159_tabl !! n
    a051159_tabl = [1] : f [1] [1,1] where
       f us vs = vs : f vs (zipWith (+) ([0,0] ++ us) (us ++ [0,0]))
    -- Reinhard Zumkeller, Apr 25 2013
    
  • Maple
    T:= proc(n, k) option remember; `if`(n=0 and k=0, 1,
          `if`(n<0 or k<0, 0, `if`(irem(n, 2)=1 or
           irem(k, 2)=0, T(n-1, k-1) + T(n-1, k), 0)))
        end:
    seq(seq(T(n, k), k=0..n), n=0..14);  # Alois P. Heinz, Jul 12 2014
  • Mathematica
    T[ n_, k_] := QBinomial[n, k, -1]; (* Michael Somos, Jun 14 2011; since V7 *)
    Clear[p, n, x, a]
    w = 0;
    p[x, 1] := 1;
    p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + w*x + 1)^Floor[n/2]]
    a = Table[CoefficientList[p[x, n], x], {n, 1, 12}]
    Flatten[a] (* Roger L. Bagula and Gary W. Adamson, Dec 04 2009 *)
  • PARI
    {T(n, k) = binomial(n%2, k%2) * binomial(n\2, k\2)};
    
  • Python
    from math import comb as binomial
    def T(n, k): return binomial(n%2, k%2) * binomial(n//2, k//2)
    print([T(n, k) for n in range(14) for k in range(n+1)])  # Peter Luschny, Oct 17 2024
  • SageMath
    @cached_function
    def T(n, k):
        if k == 0 or k == n: return 1
        return T(n-1, k-1) + (-1)^k*T(n-1, k)
    for n in (0..12): print([T(n, k) for k in (0..n)]) # Peter Luschny, Jul 06 2021
    

Formula

T(n, k) = T(n-1, k-1) + T(n-1, k) if n odd or k even, else 0. T(0, 0) = 1.
T(n, k) = T(n-2, k-2) + T(n-2, k). T(0, 0) = T(1, 0) = T(1, 1) = 1.
Square array made by setting first row/column to 1's (A(i, 0) = A(0, j) = 1); A(1, 1) = 0; A(1, j) = A(1, j-2); A(i, 1) = A(i-2, 1); other entries A(i, j) = A(i-2, j) + A(i, j-2). - Gerald McGarvey, Aug 21 2004
Sum_{k=0..n} k * T(n,k) = A093968(n); A093968 = S-D transform of A001477. - Philippe Deléham, Aug 02 2006
Equals 2*A034851 - A007318. - Gary W. Adamson, Dec 31 2007. [Corrected by Yosu Yurramendi, Aug 07 2008]
A051160(n, k) = (-1)^floor(k/2) * T(n, k).
Sum_{k = 0..n} T(n,k)*x^k = A000012(n), A016116(n+1), A056487(n), A136859(n+2) for x = 0, 1, 2, 3 respectively. - Philippe Deléham, Mar 11 2014
G.f.: (1+x+x*y)/(1-x^2-y^2*x^2). - Philippe Deléham, Mar 11 2014
For n,k >= 1, T(n, k) = 0 when n odd and k even; otherwise, T(n, k) = binomial(floor((n-1)/2), floor((k-1)/2)). - Christian Barrientos, Mar 14 2020
From Werner Schulte, Jun 25 2021: (Start)
T(n,k) = T(n-1,k-1) + (-1)^k * T(n-1,k) for 0 < k < n with initial values T(n,0) = T(n,n) = 1 for n >= 0.
Matrix inverse is T^-1(n,k) = (-1)^((n-k)*(n+k+1)/2) * T(n,k) for 0 <= k <= n. (End)
From Peter Bala, Aug 08 2021: (Start)
Double Riordan array ( 1/(1 - x); x/(1 + x), x/(1 - x) ) in the notation of Davenport et al.
G.f. for column 2*n: (1 + x)*x^(2*n)/(1 - x^2)^(n+1); G.f. for column 2*n+1: x^(2*n+1)/(1 - x^2)^(n+1)
Row polynomials: R(2*n,x) = (1 + x^2)^n; R(2*n+1,x) = (1 + x)*(1 + x^2)^n.
The infinitesimal generator of this triangle has the sequence [1, 0, 1, 0, 1, 0, ...] on the main subdiagonal, the sequence [1, 1, 2, 2, 3, 3, 4, 4, ...] on the diagonal immediately below and zeros elsewhere.
Let T denote this lower triangular array. Then T^a, for a in C, is the double Riordan array ( (1 + a*x)/(1 - a*x^2); x/(1 + a*x), (1 + a*x)/(1 - a*x^2) ) with o.g.f. (1 + x*(a + y))/(1 - x^2*(a + y^2)) = 1 + (a + y)*x + (a + y^2)*x^2 + (a^2 + a*y + a*y^2 + y^3)*x^3 + (a^2 + 2*a*y^2 + y^4)*x^4 + ....
The (2*n)-th row polynomial of T^a is (a + y^2)^n; The (2*n+1)-th row polynomial of T^a is (a + y)*(a + y^2)^n. (End)

Extensions

New name using a formula of the author by Peter Luschny, Oct 17 2024

A059861 a(n) = Product_{i=2..n} (prime(i) - 2).

Original entry on oeis.org

1, 1, 3, 15, 135, 1485, 22275, 378675, 7952175, 214708725, 6226553025, 217929355875, 8499244879125, 348469040044125, 15681106801985625, 799736446901266875, 45584977473372211875, 2689513670928960500625
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

Comments

Arises in Hardy-Littlewood k-tuple conjecture. Also a(n) is the exact number of d=2 and also d=4 differences in dRRS[modulus=n-th primorial]; see A049296 (dRRS[m]=set of first differences of reduced residue system modulo m).
For n>1 this is the determinant of the (n-1) X (n-1) matrix whose diagonal is A006093(n) = {1, 2, 4, 6, 10, 12, 16, 18..} = the first primes minus 1 and all other elements are 1's. The determinant begins: / (2-1) 1 1 1 1 1 1 ... / 1 (3-1) 1 1 1 1 1 ... / 1 1 (5-1) 1 1 1 1 ... / 1 1 1 (7-1) 1 1 1 ... / 1 1 1 1 (11-1) 1 1 ... / 1 1 1 1 1 (13-1) 1 ... - Alexander Adamchuk, May 21 2006
From Gary W. Adamson, Apr 21 2009: (Start)
Equals (-1)^n * (1, 1, 1, 3, 15, ...) dot (1, -2, 4, -6, 10, ...).
a(6) = 135 = (1, 1, 1, 3, 15) dot (1, -2, 4, -6, 10) = (1, -2, 4, -18, 150). (End)

Examples

			n=4, a(4) = 1*(3-2)*(5-2)*(7-2) = 15. 48 first terms of A049296 give one complete period of dRRS[210], in which 15 d=2, 15 d=4 and 18 larger differences occur. For n=1, 2, ..., 5 in the periods of length {1, 2, 8, 48, 480, ...} [see A005867] the number of d=2 and also d=4 differences is {1, 1, 3, 15, 135, ..}
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.
  • R. K. Guy, Unsolved Problems in Number Theory, Sections A8, A1.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979.
  • G. Polya, Mathematics and Plausible Reasoning, Vol. II, Appendix Princeton UP, 1954.

Crossrefs

Programs

  • Mathematica
    Table[ Det[ DiagonalMatrix[ Table[ Prime[i-1] - 2, {i, 2, n} ] ] + 1 ], {n, 2, 20} ] (* Alexander Adamchuk, May 21 2006 *)
    Table[Product[Prime@k - 2, {k, 2, n}], {n, 1, 18}] (* Harlan J. Brothers, Jul 02 2018 *)
    a[1] = 1; a[n_] := a[n] = a[n - 1] (Prime[n] - 2);
    Table[a[n], {n, 18}]  (* Harlan J. Brothers, Jul 02 2018 *)
    Join[{1},FoldList[Times,Prime[Range[2,20]]-2]] (* Harvey P. Dale, Apr 19 2023 *)
  • PARI
    a(n) = prod(i=2, n, prime(i)-2); \\ Michel Marcus, Apr 16 2017

Formula

a(n) = Det[ DiagonalMatrix[ Table[ Prime[i-1] - 2, {i, 2, n} ] ] + 1 ] for n>1. - Alexander Adamchuk, May 21 2006
a(n) = a(n-1) * (A000040(n) - 2) for n > 1. - A.H.M. Smeets, Dec 14 2019
a(n) = |{r | 0 <= r < primorial(n) and gcd(r, primorial(n)) = 1 and gcd(r + 2, primorial(n)) = 1}|. - Greg Tener, Oct 22 2021

Extensions

Offset corrected by A.H.M. Smeets, Dec 14 2019

A059865 Product_{i=4..n} (prime(i) - 6).

Original entry on oeis.org

1, 1, 1, 1, 5, 35, 385, 5005, 85085, 1956955, 48923875, 1516640125, 53082404375, 1964048961875, 80526007436875, 3784722349533125, 200590284525255625, 11032465648889059375, 672980404582232621875, 43743726297845120421875
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

Comments

Arises in Hardy-Littlewood prime k-tuplet conjectural formulas. Also the sequence gives the exact numbers of X42424Y difference-pattern in dRRS[m], where m=modulus=A002110(n). See A049296 (=dRRS[210]=list of first differences of reduced residue system modulo 210=4th primorial). A pattern X42424Y corresponds to a residue-sextuple or it is their difference-quintuple, X,Y > 4. Analogous pattern for primes is in A022008.
a(352) has 1001 decimal digits. - Michael De Vlieger, Mar 06 2017

Examples

			a(7) = (prime(4)-6) * (prime(5)-6) * (prime(6)-6) * (prime(7)-6) = 1 * 5* 7 *11 = 385
 Also in one period of dRRS with 2,6,30,210,2310,... modulus [A002110(n)] 1,2,8,48,480,... differences occur [A005867(n)]. The number of X42424Y residue-difference-patterns are 0,1,1,1,5,... respectively starting at suitable residues coprime to A002110(n).
		

References

  • See A059862 for references.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.

Crossrefs

Programs

  • Mathematica
    Table[Product[Prime@ i - 6, {i, 4, n}], {n, 19}] (* Michael De Vlieger, Mar 06 2017 *)
  • PARI
    a(n) = prod(k=4, n, prime(k) - 6); \\ Michel Marcus, Mar 06 2017

A059862 a(n) = Product_{i=3..n} (prime(i) - 3).

Original entry on oeis.org

1, 1, 2, 8, 64, 640, 8960, 143360, 2867200, 74547200, 2087321600, 70968934400, 2696819507200, 107872780288000, 4746402332672000, 237320116633600000, 13289926531481600000, 770815738825932800000, 49332207284859699200000, 3354590095370459545600000, 234821306675932168192000000
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

Examples

			For n = 6, a(6) = 640 because:
prime(1..6)-3 = (-1,0,2,4,8,10) -> (1,1,2,4,8,10)
and
1*1*2*4*8*10 = 640. [Example generalized and reformatted per observation of _Jon E. Schoenfield_ by _Harlan J. Brothers_, Jul 15 2018]
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.
  • R. K. Guy, Unsolved Problems in Number Theory, A8, A1
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979.
  • G. Polya, Mathematics and Plausible Reasoning, Vol. II, Appendix Princeton UP, 1954.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<3, 1, a(n-1)*(ithprime(n)-3))
        end:
    seq(a(n), n=1..21);  # Alois P. Heinz, Nov 19 2021
  • Mathematica
    Join[{1, 1}, Table[Product[Prime[i] - 3, {i, 3, n}], {n, 3, 19}]] (* Harlan J. Brothers, Jul 02 2018 *)
    a[1] = 1; a[2] = 1; a[n_] := a[n] = a[n - 1] (Prime[n] - 3);
    Table[a[n], {n, 19}] (* Harlan J. Brothers, Jul 02 2018 *)
  • PARI
    a(n) = prod(i=3, n, prime(i) - 3); \\ Michel Marcus, Jul 15 2018

Formula

a(1) = a(2) = 1; a(n) = a(n-1) * (prime(n) - 3) for n >= 3. - David A. Corneth, Jul 15 2018

Extensions

Name clarified, offset corrected by David A. Corneth, Jul 15 2018

A158020 Triangle of coefficients in expansion of (-1-x)^floor(n/2)(1-x)^ceiling(n/2).

Original entry on oeis.org

1, 1, -1, -1, 0, 1, -1, 1, 1, -1, 1, 0, -2, 0, 1, 1, -1, -2, 2, 1, -1, -1, 0, 3, 0, -3, 0, 1, -1, 1, 3, -3, -3, 3, 1, -1, 1, 0, -4, 0, 6, 0, -4, 0, 1, 1, -1, -4, 4, 6, -6, -4, 4, 1, -1, -1, 0, 5, 0, -10, 0, 10, 0, -5, 0, 1, -1, 1, 5, -5, -10, 10, 10, -10, -5, 5, 1, -1
Offset: 0

Views

Author

Philippe Deléham, Mar 11 2009

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows given by [1,-2,1,0,0,0,0,0,0,...] DELTA [-1,0,1,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Examples

			Triangle begins:
   1;
   1, -1;
  -1,  0,  1;
  -1,  1,  1, -1;
   1,  0, -2,  0,  1;  ...
		

Crossrefs

Cf. A051160.

Programs

  • Mathematica
    Flatten[Table[CoefficientList[(-1 - x)^Floor[n/2] (1 - x)^Ceiling[n/2], x], {n, 0, 11}]] (* T. D. Noe, Dec 01 2011 *)

Formula

T(n,k) = T(n-2,k-2) - T(n-2,k), T(0,0)=T(1,0)=1, T(1,1)=-1.
G.f.: (1+(1-y)*x)/(1+(1-y^2)*x^2). - Philippe Deléham, Dec 02 2011

Extensions

Corrected by Philippe Deléham, Dec 02 2011

A158854 Triangle T(n,k) read by rows: coefficient [x^k] of the polynomial (1-x)^(1+floor(n/2))* (1+x)^floor((n-1)/2) in row n, column k.

Original entry on oeis.org

1, 1, -1, 1, -2, 1, 1, -1, -1, 1, 1, -2, 0, 2, -1, 1, -1, -2, 2, 1, -1, 1, -2, -1, 4, -1, -2, 1, 1, -1, -3, 3, 3, -3, -1, 1, 1, -2, -2, 6, 0, -6, 2, 2, -1, 1, -1, -4, 4, 6, -6, -4, 4, 1, -1, 1, -2, -3, 8, 2, -12, 2, 8, -3, -2, 1
Offset: 0

Views

Author

Roger L. Bagula, Mar 28 2009

Keywords

Comments

Row sums are zero except for n=0.

Examples

			1;
1, -1;
1, -2, 1;
1, -1, -1, 1;
1, -2, 0, 2, -1;
1, -1, -2, 2, 1, -1;
1, -2, -1, 4, -1, -2, 1;
1, -1, -3, 3, 3, -3, -1, 1;
1, -2, -2, 6, 0, -6, 2, 2, -1;
1, -1, -4, 4, 6, -6, -4, 4, 1, -1;
1, -2, -3, 8, 2, -12, 2, 8, -3, -2, 1;
		

Crossrefs

Programs

  • Maple
    A158854 := proc(n,k)
        (1-x)^(1+floor(n/2))*(1+x)^floor((n-1)/2) ;
        coeftayl(%,x=0,k) ;
    end proc: # R. J. Mathar, Apr 08 2013
  • Mathematica
    Clear[p, x, n, m, a];
    p[x_, n_] = If[n == 0, 1, (1 - x)^(Floor[(n)/ 2] + 1)(1 + x)^(Floor[(n - 1)/2])];
    Table[ExpandAll[p[x, n]], {n, 0, 10}];
    Table[CoefficientList[ExpandAll[p[x, n]], x], {n, 0, 10}];
    Flatten[%]

Formula

T(n,k) = T(n-2,k) - T(n-2,k-2), T(0,0) = T(1,0) = T(2,0) = T(2,2) = 1, T(1,1)=-1, T(2,1)=-2, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Oct 25 2013

A059863 a(n) = Product_{i=3..n} (prime(i)-4).

Original entry on oeis.org

1, 1, 1, 3, 21, 189, 2457, 36855, 700245, 17506125, 472665375, 15597957375, 577124422875, 22507852492125, 967837657161375, 47424045200907375, 2608322486049905625, 148674381704844620625, 9366486047405211099375, 627554565176149143658125, 43301264997154290912410625
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

References

  • See A059862 for references.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.

Crossrefs

Programs

  • PARI
    a(n) = prod(i=3, n, prime(i)-4); \\ Michel Marcus, Aug 25 2019

Extensions

More terms from Michel Marcus, Aug 25 2019

A059864 a(n) = Product_{i=4..n} (prime(i)-5), where prime(i) is i-th prime.

Original entry on oeis.org

1, 1, 1, 2, 12, 96, 1152, 16128, 290304, 6967296, 181149696, 5796790272, 208684449792, 7930009092096, 333060381868032, 15986898329665536, 863292509801938944, 48344380548908580864, 2997351594032332013568
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

Comments

Such products arise in Hardy-Littlewood prime k-tuplet conjectural formulas.

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.
  • R. K. Guy, Unsolved Problems in Number Theory, A8, A1
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979.
  • G. Polya, Mathematics and Plausible Reasoning, Vol. II, Appendix Princeton UP, 1954

Crossrefs

Programs

  • Magma
    [n le 3 select 1 else (&*[NthPrime(j) -5: j in [4..n]]): n in [1..30]]; // G. C. Greubel, Feb 02 2023
    
  • Mathematica
    Join[{1,1,1},FoldList[Times,Prime[Range[4,20]]-5]] (* Harvey P. Dale, Dec 29 2018 *)
  • PARI
    a(n) = prod(k=4, n, prime(k)-5); \\ Michel Marcus, Dec 12 2017
    
  • SageMath
    def A059864(n): return product(nth_prime(j) -5 for j in range(4,n+1))
    [A059864(n) for n in range(1,31)] # G. C. Greubel, Feb 02 2023
Showing 1-8 of 8 results.