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 41-50 of 61 results. Next

A123229 Triangle read by rows: T(n, m) = n - (n mod m).

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 4, 3, 4, 5, 4, 3, 4, 5, 6, 6, 6, 4, 5, 6, 7, 6, 6, 4, 5, 6, 7, 8, 8, 6, 8, 5, 6, 7, 8, 9, 8, 9, 8, 5, 6, 7, 8, 9, 10, 10, 9, 8, 10, 6, 7, 8, 9, 10, 11, 10, 9, 8, 10, 6, 7, 8, 9, 10, 11, 12, 12, 12, 12, 10, 12, 7, 8, 9, 10, 11, 12, 13, 12, 12, 12, 10, 12, 7, 8, 9, 10, 11, 12, 13
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 06 2006

Keywords

Comments

An equivalent definition: Consider A000012 as a lower-left all-1's triangle, and build the matrix product by multiplication with A127093 from the right. That is, T(n,m) = Sum_{j=m..n} A000012(n,j)*A127093(j,m) = Sum_{j=m..n} A127093(j,m) = m*floor(n/m) = m*A010766(n,m). - Gary W. Adamson, Jan 05 2007
The number of parts k in the triangle is A000203(k) hence the sum of parts k is A064987(k). - Omar E. Pol, Jul 05 2014

Examples

			Triangle begins:
{1},
{2, 2},
{3, 2, 3},
{4, 4, 3, 4},
{5, 4, 3, 4, 5},
{6, 6, 6, 4, 5, 6},
{7, 6, 6, 4, 5, 6, 7},
{8, 8, 6, 8, 5, 6, 7, 8},
{9, 8, 9, 8, 5, 6, 7, 8, 9},
...
		

Crossrefs

Programs

  • GAP
    Flat(List([1..10],n->List([1..n],m->n-(n mod m)))); # Muniru A Asiru, Oct 12 2018
  • Maple
    seq(seq(n-modp(n,m),m=1..n),n=1..13); # Muniru A Asiru, Oct 12 2018
  • Mathematica
    a = Table[Table[n - Mod[n, m], {m, 1, n}], {n, 1, 20}]; Flatten[a]
  • PARI
    for(n=1,9,for(m=1,n,print1(n-n%m", "))) \\ Charles R Greathouse IV, Nov 07 2011
    

Extensions

Edited by N. J. A. Sloane, Jul 05 2014 at the suggestion of Omar E. Pol, who observed that A127095 (Gary W. Adamson, with edits by R. J. Mathar) was the same as this sequence.

A127094 Triangle, reversal of A127093.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 4, 0, 2, 1, 5, 0, 0, 0, 1, 6, 0, 0, 3, 2, 1, 7, 0, 0, 0, 0, 0, 1, 8, 0, 0, 0, 4, 0, 2, 1, 9, 0, 0, 0, 0, 0, 3, 0, 1, 10, 0, 0, 0, 0, 5, 0, 0, 2, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Jan 05 2007

Keywords

Examples

			First few rows of the triangle are:
  1;
  2, 1;
  3, 0, 1;
  4, 0, 2, 1;
  5, 0, 0, 0, 1;
  6, 0, 0, 3, 2, 1;
  ...
		

Crossrefs

Cf. A000203 (row sums), A126988, A127093.

Programs

  • Magma
    [n mod (k-n-1) - (n+1) mod (k-n-1) + 1: k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 08 2021
  • Mathematica
    Table[Mod[n, k-n-1] - Mod[n+1, k-n-1] +1, {n,12}, {k,n}]//Flatten (* G. C. Greubel, Mar 08 2021 *)
  • Sage
    flatten([[n%(k-n-1) - (n+1)%(k-n-1) + 1 for k in [1..n]] for n in [1..12]]) # G. C. Greubel, Mar 08 2021
    

Formula

Reversed rows of A127093.
T(n, K) = mod(n, k-n-1) - mod(n+1, k-n-1) + 1. - Mats Granvik, Sep 02 2007

A130054 Inverse Moebius transform of A023900.

Original entry on oeis.org

1, 0, -1, -1, -3, 0, -5, -2, -3, 0, -9, 1, -11, 0, 3, -3, -15, 0, -17, 3, 5, 0, -21, 2, -7, 0, -5, 5, -27, 0, -29, -4, 9, 0, 15, 3, -35, 0, 11, 6, -39, 0, -41, 9, 9, 0, -45, 3, -11, 0, 15, 11, -51, 0, 27, 10, 17, 0, -57, -3, -59, 0, 15, -5, 33, 0, -65, 15, 21
Offset: 1

Views

Author

Gary W. Adamson, May 04 2007

Keywords

Comments

Multiplicative because A023900 is. - Andrew Howroyd, Aug 03 2018

Crossrefs

Programs

  • Magma
    [&+[d*MoebiusMu(d)*NumberOfDivisors(n div d):d in Divisors(n)]:n in [1..70]]; // Marius A. Burtea, Nov 17 2019
  • Maple
    with(numtheory): seq(add(d*mobius(d)*tau(n/d), d in divisors(n)), n=1..60); # Ridouane Oudra, Nov 17 2019
  • Mathematica
    b[n_] := Sum[d MoebiusMu[d], {d, Divisors[n]}];
    a[n_] := Sum[b[n/d], {d, Divisors[n]}];
    a /@ Range[1, 100] (* Jean-François Alcover, Sep 20 2019, from PARI *)
    f[p_, e_] := 1-(p-1)*e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 23 2020 *)
  • PARI
    \\ here b(n) is A023900
    b(n)={sumdivmult(n, d, d*moebius(d))}
    a(n)={sumdiv(n, d, b(n/d))} \\ Andrew Howroyd, Aug 03 2018
    

Formula

A126988 * A130054 = d(n), A000005: (1, 2, 2, 3, 2, 4, 2, 4, 3, 4, ...).
a(n) = Sum_{d|n} A023900(n/d). - Andrew Howroyd, Aug 03 2018
a(n) = Sum_{d|n} d*mu(d)*tau(n/d). - Ridouane Oudra, Nov 17 2019
From Werner Schulte, Sep 06 2020: (Start)
Multiplicative with a(p^e) = 1 - (p-1) * e for prime p and e >= 0.
Dirichlet g.f.: (zeta(s))^2 / zeta(s-1).
Dirichlet convolution with A062570 equals A001511.
Dirichlet convolution with A018804 equals A000203.
Dirichlet inverse of A007431. (End)
a(n) = 1 - Sum_{k=1..n-1} a(gcd(n,k)). - Ilya Gutkovskiy, Nov 06 2020

Extensions

Name changed and terms a(11) and beyond from Andrew Howroyd, Aug 03 2018

A140256 Triangle read by columns: Column k is A014963 aerated with groups of (k-1) zeros.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 2, 2, 0, 1, 5, 0, 0, 0, 1, 1, 3, 2, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 2, 2, 0, 2, 0, 0, 0, 1, 3, 0, 3, 0, 0, 0, 0, 0, 1, 1, 5, 0, 0, 2, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 3, 0, 2, 0, 0, 0, 0, 0, 1, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gary W. Adamson and Mats Granvik, May 16 2008, Jun 11 2008

Keywords

Comments

If the row number n is prime, the row consists of T(n,1)=n followed by n-2 zeros and followed by T(n,n)=1.
Similar to A138618.
Row products of nonzero terms in row n, equals n. - Mats Granvik, May 22 2016

Examples

			First few rows of the triangle are:
   1;
   2, 1;
   3, 0, 1;
   2, 2, 0, 1;
   5, 0, 0, 0, 1;
   1, 3, 2, 0, 0, 1;
   7, 0, 0, 0, 0, 0, 1;
   2, 2, 0, 2, 0, 0, 0, 1;
   3, 0, 3, 0, 0, 0, 0, 0, 1;
   1, 5, 0, 0, 2, 0, 0, 0, 0, 1;
  11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
   1, 1, 2, 3, 0, 2, 0, 0, 0, 0, 0, 1;
  ...
Column 2 = (1, 0, 2, 0, 3, 0, 2, 0, 5, 0, 1, 0, 7, ...).
		

Crossrefs

Cf. A140255 (row sums), A014963.
Row products without the zero terms produce A000027. [Mats Granvik, Oct 08 2009]

Programs

  • Excel
    =if(row()>=column();if(mod(row();column())=0;lookup(roundup(row()/column();0);A000027;A014963);0);"")
  • Mathematica
    t[n_, k_] /; Divisible[n, k] := Exp[ MangoldtLambda[n/k] ]; t[, ] = 0; Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 28 2013 *)
    (* recurrence *)
    Clear[t, s, n, k, z, nn];z = 1;nn = 14;t[n_, k_] := t[n, k] = If[k == 1, Zeta[s]*(1 - 1/n^(s - 1)) -Sum[t[n, i]/i^(s - 1), {i, 2, n}], If[Mod[n, k] == 0, t[n/k, 1], 0], 0]; A = Table[Table[Limit[t[n, k], s -> z], {k, 1, n}], {n, 1, nn}]; Flatten[Exp[A]*Table[Table[If[Mod[n, k] == 0, 1, 0], {k, 1, n}], {n, 1, nn}]] (* Mats Granvik, Apr 09 2016, May 22 2016 *)

Formula

T(n,k) = A014963(n/k) = A014963(A126988(n,k)) if k|n, T(n,k)=0 otherwise. 1 <= k <= n.
From Mats Granvik, Apr 10 2016, May 22 2016: (Start)
Limit as s -> 1 of the recurrence: Ts(n, k) = if k = 1 then zeta(s)*(1 - 1/n^(s - 1)) -Sum_{i=2..n} Ts(n, i)/(i)^(s - 1) else if n mod k = 0 then Ts(n/k, 1) else 0 else 0.
For n not equal to k: Limit as s -> 1 of the recurrence: Ts(n, k) = if k = 1 then zeta(s) -Sum_{i=2..n} Ts(n, i)/i^(s - 1) else if n mod k = 0 then Ts(n/k, 1) else 0 else 0.
Limit as s -> 1 of the recurrence: Ts(n, k) = if k = 1 then log(n) -Sum_{i=2..n} Ts(n, i)/i^(s - 1) else if n mod k = 0 then Ts(n/k, 1) else 0 else 0. (End)
[The above sentences need a lot of work! Parentheses might help. - N. J. A. Sloane, Mar 14 2017]

A127096 Triangle T(n,m) = A000012*A127094 read by rows.

Original entry on oeis.org

1, 3, 1, 6, 1, 1, 10, 1, 3, 1, 15, 1, 3, 1, 1, 21, 1, 3, 4, 3, 1, 28, 1, 3, 4, 3, 1, 1, 36, 1, 3, 4, 7, 1, 3, 1, 45, 1, 3, 4, 7, 1, 6, 1, 1, 55, 1, 3, 4, 7, 6, 6, 1, 3, 1, 66, 1, 3, 4, 7, 6, 6, 1, 3, 1, 1, 78, 1, 3, 4, 7, 6, 12, 1, 7, 4, 3, 1, 91, 1, 3, 4, 7, 6, 12, 1, 7, 4, 3, 1, 1, 105, 1, 3, 4, 7, 6, 12, 8, 7, 4, 3, 1, 3, 1
Offset: 1

Views

Author

Gary W. Adamson, Jan 05 2007

Keywords

Comments

Consider A000012 as a lower-left all-1's triangle, and build the matrix product by multiplication with A127094 from the right.

Examples

			First few rows of the triangle are:
   1;
   3, 1,
   6, 1, 1;
  10, 1, 3, 1;
  15, 1, 3, 1, 1;
  21, 1, 3, 4, 3, 1;
  28, 1, 3, 4, 3, 1, 1;
  ...
		

Crossrefs

Programs

  • Maple
    A127093 := proc(n,m) if n mod m = 0 then m; else 0 ; fi; end:
    A127094 := proc(n,m) A127093(n, n-m+1) ; end:
    A127096 := proc(n,m) add( A127094(j,m),j=m..n) ; end:
    for n from 1 to 15 do for m from 1 to n do printf("%d,",A127096(n,m)) ; od: od: # R. J. Mathar, Aug 18 2009
  • Mathematica
    T[n_, m_] := Sum[1 + Mod[j, m - j - 1] - Mod[1 + j, m - j - 1], {j, m, n}];
    Table[T[n, m], {n, 1, 14}, {m, 1, n}] // Flatten (* Jean-François Alcover, Sep 15 2023 *)

Formula

T(n,m) = Sum_{j=m..n} A000012(n,j)*A127094(j,m) = Sum_{j=m..n} A127094(j,m).

Extensions

Edited and extended by R. J. Mathar, Aug 18 2009

A127446 Triangle T(n,k) = n*A051731(n,k) read by rows.

Original entry on oeis.org

1, 2, 2, 3, 0, 3, 4, 4, 0, 4, 5, 0, 0, 0, 5, 6, 6, 6, 0, 0, 6, 7, 0, 0, 0, 0, 0, 7, 8, 8, 0, 8, 0, 0, 0, 8, 9, 0, 9, 0, 0, 0, 0, 0, 9, 10, 10, 0, 0, 10, 0, 0, 0, 0, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 14, 0, 0, 0, 0, 14
Offset: 1

Views

Author

Gary W. Adamson, Jan 14 2007

Keywords

Comments

Replace the 1's in row n of A051731 with n's.
T(n,k) is the sum of the k's in the partitions of n into equal parts. - Omar E. Pol, Nov 25 2019

Examples

			First few rows of the triangle:
  1;
  2, 2;
  3, 0, 3;
  4, 4, 0, 4;
  5, 0, 0, 0, 5;
  6, 6, 6, 0, 0, 6;
  7, 0, 0, 0, 0, 0, 7;
  ...
For n = 6 the partitions of 6 into equal parts are [6], [3,3], [2,2,2], [1,1,1,1,1,1], so the sum of the k's are [6, 6, 6, 0, 0, 6] respectively, equaling the 6th row of triangle. - _Omar E. Pol_, Nov 25 2019
		

Crossrefs

Cf. A038040 (row sums), A051731, A126988, A244051, A328362.

Programs

  • Haskell
    a127446 n k = a127446_tabl !! (n-1) !! (k-1)
    a127446_row n = a127446_tabl !! (n-1)
    a127446_tabl = zipWith (\v ws -> map (* v) ws) [1..] a051731_tabl
    -- Reinhard Zumkeller, Jan 21 2014
  • Maple
    A127446 := proc(n,k) if n mod k = 0 then n; else 0; fi; end: for n from 1 to 20 do for k from 1 to n do printf("%d,",A127446(n,k)) ; od: od: # R. J. Mathar, May 08 2009
  • Mathematica
    Flatten[Table[If[Mod[n, k] == 0, n, 0], {n, 20}, {k, n}]] (* Vincenzo Librandi, Nov 02 2016 *)

Formula

T(n,k) = k*A126988(n,k). - Omar E. Pol, Nov 25 2019

Extensions

Edited and extended by R. J. Mathar, May 08 2009

A280499 Triangular table for division in ring GF(2)[X]: T(n,k) = n/k, or 0 if k is not a divisor of n, where the binary expansion of each number defines the corresponding (0,1)-polynomial.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 4, 2, 0, 1, 5, 0, 3, 0, 1, 6, 3, 2, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 8, 4, 0, 2, 0, 0, 0, 1, 9, 0, 7, 0, 0, 0, 3, 0, 1, 10, 5, 6, 0, 2, 3, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 6, 4, 3, 0, 2, 0, 0, 0, 0, 0, 1, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 14, 7, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 15, 0, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2017

Keywords

Comments

This is GF(2)[X] analog of A126988, using "carryless division in base-2" instead of ordinary division.
The triangular table T(n,k), n=1.., k=1..n is read by rows: T(1,1), T(2,1), T(2,2), T(3,1), T(3,2), T(3,3), etc.

Examples

			The first 17 rows of the triangle:
   1
   2 1
   3 0 1
   4 2 0 1
   5 0 3 0 1
   6 3 2 0 0 1
   7 0 0 0 0 0 1
   8 4 0 2 0 0 0 1
   9 0 7 0 0 0 3 0 1
  10 5 6 0 2 3 0 0 0 1
  11 0 0 0 0 0 0 0 0 0 1
  12 6 4 3 0 2 0 0 0 0 0 1
  13 0 0 0 0 0 0 0 0 0 0 0 1
  14 7 0 0 0 0 2 0 0 0 0 0 0 1
  15 0 5 0 3 0 0 0 0 0 0 0 0 0 1
  16 8 0 4 0 0 0 2 0 0 0 0 0 0 0 1
  17 0 15 0 5 0 0 0 0 0 0 0 0 0 3 0 1
  -----------------------------------
7 ("111" in binary) encodes polynomial X^2 + X + 1, which is irreducible over GF(2) (7 is in A014580), so it is divisible only by itself and 1, and thus T(7,1) = 7, T(7,k) = 0 for k=2..6 and T(7,7) = 1.
9 ("1001" in binary) encodes polynomial X^3 + 1, which is factored over GF(2) as (X+1)(X^2 + X + 1), and thus T(9,3) = 7 and T(9,7) = 3 because the polynomial X + 1 is encoded by 3 ("11" in binary).
		

Crossrefs

Lower triangular region of square array A280500.
Transpose: A280494.
Cf. A014580, A048720, A126988, A178908, A280500, A280493 (the row sums).

Programs

Formula

T(n,k) = the unique d such that A048720(d,k) = n, provided that such d exists, otherwise zero.

A127057 Triangle T(n,k), partial row sums of the n-th row of A127013 read right to left.

Original entry on oeis.org

1, 3, 1, 4, 1, 1, 7, 3, 1, 1, 6, 1, 1, 1, 1, 12, 6, 3, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 15, 7, 3, 3, 1, 1, 1, 1, 13, 4, 4, 1, 1, 1, 1, 1, 1, 18, 8, 3, 3, 3, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 16, 10, 6, 3, 3, 1, 1, 1, 1, 1, 1, 14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 24, 10, 3, 3, 3, 3, 3, 1, 1
Offset: 1

Views

Author

Gary W. Adamson, Jan 04 2007

Keywords

Comments

Also partial row sums of the n-th row of A126988 read left to right. - Reinhard Zumkeller, Jan 21 2014

Examples

			The triangle starts
   1;
   3, 1;
   4, 1, 1;
   7, 3, 1, 1;
   6, 1, 1, 1, 1;
  12, 6, 3, 1, 1, 1;
   8, 1, 1, 1, 1, 1, 1;
  15, 7, 3, 3, 1, 1, 1, 1;
  13, 4, 4, 1, 1, 1, 1, 1, 1;
  18, 8, 3, 3, 3, 1, 1, 1, 1, 1; ...
		

Crossrefs

Programs

  • Haskell
    a127057 n k = a127057_tabl !! (n-1) !! (k-1)
    a127057_row n = a127057_tabl !! (n-1)
    a127057_tabl = map (scanr1 (+)) a126988_tabl
    -- Reinhard Zumkeller, Jan 21 2014
    
  • Magma
    A126988:= func< n,k | (n mod k) eq 0 select n/k else 0 >;
    T:= func< n,k | (&+[A126988(n, j): j in [k..n]]) >;
    [[T(n,k): k in [1..n]]: n in [1..12]]; // G. C. Greubel, Jun 03 2019
    
  • Mathematica
    A126988[n_, m_]:= If[Mod[n, m]==0, n/m, 0];
    T[n_, m_]:= Sum[A126988[n, j], {j,m,n}];
    Table[T[n, m], {n,1,12}, {m,1,n}]//Flatten (* G. C. Greubel, Jun 03 2019 *)
  • PARI
    A126988(n, k) = if(n%k==0, n/k, 0);
    T(n,k) = sum(j=k,n, A126988(n,j));
    for(n=1, 12, for(k=1,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jun 03 2019
    
  • Sage
    def A126988(n, k):
        if (n%k==0): return n/k
        else: return 0
    def T(n,k): return sum(A126988(n,j) for j in (k..n))
    [[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jun 03 2019

Formula

T(n,k) = Sum_{i=1..n-k+1} A127013(n,i), n>=1, 1<=k<=n.
T(n,k) = Sum_{i=k..n} A126988(n,i).
Row sums: Sum_{k=1..n} T(n,k) = A038040(n).
T(n,1) = A000203(n).
T = A126988 * M as infinite lower triangular matrices, M = (1; 1, 1; 1, 1, 1; ...).

Extensions

Edited and extended by R. J. Mathar, Jul 23 2008

A127172 Cube of A051731.

Original entry on oeis.org

1, 3, 1, 3, 0, 1, 6, 3, 0, 1, 3, 0, 0, 0, 1, 9, 3, 3, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 10, 6, 0, 3, 0, 0, 0, 1, 6, 0, 3, 0, 0, 0, 0, 0, 1, 9, 3, 0, 0, 0, 3, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Jan 06 2007

Keywords

Comments

Nonzero terms in every column = A007425: (1, 3, 3, 6, 3, 9, 3, ...).
Row sums = A007426: (1, 4, 4, 20, 4, 16, ...).
A127172 * mu(n) = d(n); or A127172 * A008683 = A000005.
A127172 * d(n) = tau_5(n); or A127172 * A000005 = A061200.
A127172 * phi(n) = A007429: (1, 4, 5, 11, 7, 20, ...); or: A127172 * A000010 = A007429.
Note that A051731 * d(n) = row sums of A127172; or A051731 * A000005 = A007425.
Also, A126988 * mu(n) = phi(n); or A126988 * A008683 = A000010.
A126988 * phi(n) = A018804: (1, 3, 5, 8, 9, 15, ...); = A127170 * mu(n).

Examples

			First few rows of the triangle:
   1;
   3, 1;
   3, 0, 1;
   6, 3, 0, 1;
   3, 0, 0, 0, 1;
   9, 3, 3, 0, 0, 1;
   3, 0, 0, 0, 0, 0, 1;
  10, 6, 0, 3, 0, 0, 0, 1;
   6, 0, 3, 0, 0, 0, 0, 0, 1;
   9, 3, 0, 0, 3, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Formula

Cube of A051731 A007425: (1, 3, 3, 6, 3, 9, 3, ...) in every column k, interspersed with (k-1) zeros.

A141671 Triangle T(n, k) = n/k if n mod k = 0, otherwise T(n, k) = 0, with T(n, 0) = n+1, read by rows.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 3, 0, 1, 5, 4, 2, 0, 1, 6, 5, 0, 0, 0, 1, 7, 6, 3, 2, 0, 0, 1, 8, 7, 0, 0, 0, 0, 0, 1, 9, 8, 4, 0, 2, 0, 0, 0, 1, 10, 9, 0, 3, 0, 0, 0, 0, 0, 1, 11, 10, 5, 0, 0, 2, 0, 0, 0, 0, 1, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 12, 6, 4, 3, 0, 2, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Keywords

Comments

Apparently this is different from A141672. - N. J. A. Sloane, Sep 13 2008
For n, k >= 1 this triangle is the same as A126988(n, k). - G. C. Greubel, Mar 16 2024

Examples

			Triangle begins as:
   1;
   2,  1;
   3,  2, 1;
   4,  3, 0, 1;
   5,  4, 2, 0, 1;
   6,  5, 0, 0, 0, 1;
   7,  6, 3, 2, 0, 0, 1;
   8,  7, 0, 0, 0, 0, 0, 1;
   9,  8, 4, 0, 2, 0, 0, 0, 1;
  10,  9, 0, 3, 0, 0, 0, 0, 0, 1;
  11, 10, 5, 0, 0, 2, 0, 0, 0, 0, 1;
		

Crossrefs

Programs

  • Magma
    A141671:= func< n,k | k eq 0 select n+1 else (n mod k) eq 0 select n/k else 0>;
    [A141671(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Mar 16 2024
    
  • Mathematica
    T[n_, k_]= If[k==0, n+1, If[Mod[n,k]==0, n/k, 0]];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten
  • PARI
    T(m,n)={if(m, if(n%m, 0, n/m), n+1)};
    for(n=0, 10, for(m=0, n, print1(T(m,n)","))) \\ Charles R Greathouse IV, Oct 11 2009
    
  • SageMath
    def A141671(n, k):
        if k==0: return n+1
        elif (n%k==0): return n//k
        else: return 0
    flatten([[A141671(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Mar 16 2024

Formula

T(n, k) = n/k if n mod k = 0, otherwise T(n, k) = 0, with T(n, 0) = n+1.

Extensions

Edited by G. C. Greubel, Mar 16 2024
Previous Showing 41-50 of 61 results. Next