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

A010704 Period 2: repeat (3,6).

Original entry on oeis.org

3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3
Offset: 0

Views

Author

Keywords

Comments

Continued fraction expansion of A176105. - R. J. Mathar, Mar 08 2012
Digital roots of A007283. - Bruno Berselli, Nov 22 2018
Decimal expansion of 4/11. - Franklin T. Adams-Watters, Nov 28 2018

Crossrefs

Programs

Formula

G.f. 3*(1 + 2*x)/((1 - x)*(1 + x)). - R. J. Mathar, Nov 21 2011
From Reinhard Zumkeller, Jul 03 2012: (Start)
a(n) = 3*A000034(n).
a(n) = A213999(n,2). (End)
a(n + 1) = 9 - a(n). - David A. Corneth, Nov 29 2018
a(n) = 2 + 2^(1 - (-1)^n). - Vincenzo Librandi, Feb 28 2020
a(n) = 3*(3-(-1)^n)/2. - Aaron J Grech, Aug 02 2024

A374439 Triangle read by rows: the coefficients of the Lucas-Fibonacci polynomials. T(n, k) = T(n - 1, k) + T(n - 2, k - 2) with initial values T(n, k) = k + 1 for k < 2.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 4, 1, 1, 2, 4, 6, 3, 2, 1, 2, 5, 8, 6, 6, 1, 1, 2, 6, 10, 10, 12, 4, 2, 1, 2, 7, 12, 15, 20, 10, 8, 1, 1, 2, 8, 14, 21, 30, 20, 20, 5, 2, 1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1, 1, 2, 10, 18, 36, 56, 56, 70, 35, 30, 6, 2
Offset: 0

Views

Author

Peter Luschny, Jul 22 2024

Keywords

Comments

There are several versions of Lucas and Fibonacci polynomials in this database. Our naming follows the convention of calling polynomials after the values of the polynomials at x = 1. This assumes a regular sequence of polynomials, that is, a sequence of polynomials where degree(p(n)) = n. This view makes the coefficients of the polynomials (the terms of a row) a refinement of the values at the unity.
A remarkable property of the polynomials under consideration is that they are dual in this respect. This means they give the Lucas numbers at x = 1 and the Fibonacci numbers at x = -1 (except for the sign). See the example section.
The Pell numbers and the dual Pell numbers are also values of the polynomials, at the points x = -1/2 and x = 1/2 (up to the normalization factor 2^n). This suggests a harmonized terminology: To call 2^n*P(n, -1/2) = 1, 0, 1, 2, 5, ... the Pell numbers (A000129) and 2^n*P(n, 1/2) = 1, 4, 9, 22, ... the dual Pell numbers (A048654).
Based on our naming convention one could call A162515 (without the prepended 0) the Fibonacci polynomials. In the definition above only the initial values would change to: T(n, k) = k + 1 for k < 1. To extend this line of thought we introduce A374438 as the third triangle of this family.
The triangle is closely related to the qStirling2 numbers at q = -1. For the definition of these numbers see A333143. This relates the triangle to A065941 and A103631.

Examples

			Triangle starts:
  [ 0] [1]
  [ 1] [1, 2]
  [ 2] [1, 2, 1]
  [ 3] [1, 2, 2,  2]
  [ 4] [1, 2, 3,  4,  1]
  [ 5] [1, 2, 4,  6,  3,  2]
  [ 6] [1, 2, 5,  8,  6,  6,  1]
  [ 7] [1, 2, 6, 10, 10, 12,  4,  2]
  [ 8] [1, 2, 7, 12, 15, 20, 10,  8,  1]
  [ 9] [1, 2, 8, 14, 21, 30, 20, 20,  5,  2]
  [10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1]
.
Table of interpolated sequences:
  |  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |
  |  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|
  |    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |
  |  0 |        -1         |     1   |       1     |       1    |
  |  1 |         1         |     3   |       0     |       4    |
  |  2 |         0         |     4   |       1     |       9    |
  |  3 |         1         |     7   |       2     |      22    |
  |  4 |         1         |    11   |       5     |      53    |
  |  5 |         2         |    18   |      12     |     128    |
  |  6 |         3         |    29   |      29     |     309    |
  |  7 |         5         |    47   |      70     |     746    |
  |  8 |         8         |    76   |     169     |    1801    |
  |  9 |        13         |   123   |     408     |    4348    |
		

Crossrefs

Triangles related to Lucas polynomials: A034807, A114525, A122075, A061896, A352362.
Triangles related to Fibonacci polynomials: A162515, A053119, A168561, A049310, A374441.
Sums include: A000204 (Lucas numbers, row), A000045 & A212804 (even sums, Fibonacci numbers), A006355 (odd sums), A039834 (alternating sign row).
Type m^n*P(n, 1/m): A000129 & A048654 (Pell, m=2), A108300 & A003688 (m=3), A001077 & A048875 (m=4).
Adding and subtracting the values in a row of the table (plus halving the values obtained in this way): A022087, A055389, A118658, A052542, A163271, A371596, A324969, A212804, A077985, A069306, A215928.
Columns include: A040000 (k=1), A000027 (k=2), A005843 (k=3), A000217 (k=4), A002378 (k=5).
Diagonals include: A000034 (k=n), A029578 (k=n-1), abs(A131259) (k=n-2).
Cf. A029578 (subdiagonal), A124038 (row reversed triangle, signed).

Programs

  • Magma
    function T(n,k) // T = A374439
      if k lt 0 or k gt n then return 0;
      elif k le 1 then return k+1;
      else return T(n-1,k) + T(n-2,k-2);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 23 2025
    
  • Maple
    A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)):
    # Alternative, using the function qStirling2 from A333143:
    T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1):
    seq(seq(T(n, k), k = 0..n), n = 0..10);
  • Mathematica
    A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]];
    Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, Jul 24 2024 *)
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if k > n: return 0
        if k < 2: return k + 1
        return T(n - 1, k) + T(n - 2, k - 2)
    
  • Python
    from math import comb as binomial
    def T(n: int, k: int) -> int:
        o = k & 1
        return binomial(n - o - (k - o) // 2, (k - o) // 2) << o
    
  • Python
    def P(n, x):
        if n < 0: return P(n, x)
        return sum(T(n, k)*x**k for k in range(n + 1))
    def sgn(x: int) -> int: return (x > 0) - (x < 0)
    # Table of interpolated sequences
    print("|  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |")
    print("|  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|")
    print("|    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |")
    f = "| {0:2d} | {1:9d}         |  {2:4d}   |   {3:5d}     |    {4:4d}    |"
    for n in range(10): print(f.format(n, -P(n, -1), P(n, 1), int(2**n*P(n, -1/2)), int(2**n*P(n, 1/2))))
    
  • SageMath
    from sage.combinat.q_analogues import q_stirling_number2
    def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1)
    print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 23 2025

Formula

T(n, k) = 2^k' * binomial(n - k' - (k - k') / 2, (k - k') / 2) where k' = 1 if k is odd and otherwise 0.
T(n, k) = (1 + (k mod 2))*qStirling2(n, k, -1), see A333143.
2^n*P(n, -1/2) = A000129(n - 1), Pell numbers, P(-1) = 1.
2^n*P(n, 1/2) = A048654(n), dual Pell numbers.
T(2*n, n) = (1/2)*(-1)^n*( (1+(-1)^n)*A005809(n/2) - 2*(1-(-1)^n)*A045721((n-1)/2) ). - G. C. Greubel, Jan 23 2025

A385556 Period of {binomial(N,4) mod n: N in Z}.

Original entry on oeis.org

1, 8, 9, 16, 5, 72, 7, 32, 27, 40, 11, 144, 13, 56, 45, 64, 17, 216, 19, 80, 63, 88, 23, 288, 25, 104, 81, 112, 29, 360, 31, 128, 99, 136, 35, 432, 37, 152, 117, 160, 41, 504, 43, 176, 135, 184, 47, 576, 49, 200, 153, 208, 53, 648, 55, 224, 171, 232, 59, 720
Offset: 1

Views

Author

Jianing Song, Jul 03 2025

Keywords

Examples

			For N == 0, 1, ..., 31 (mod 32), binomial(N,4) == {0, 0, 0, 0, 1, 5, 7, 3, 6, 6, 2, 2, 7, 3, 1, 5, 4, 4, 4, 4, 5, 1, 3, 7, 2, 2, 6, 6, 3, 7, 5, 1} (mod 8).
		

Crossrefs

Row n = 4 of A349593. A022998, A385555, A385557, A385558, A385559, and A385560 are respectively rows n = 2, 3, 5-6, 7, 8, and 9-10.

Programs

  • Mathematica
    A385556[n_] := If[n == 1, 1, n*Product[p^Floor[Log[p, 4]], {p, FactorInteger[n][[All, 1]]}]];
    Array[A385556, 100] (* Paolo Xausa, Jul 07 2025 *)
    a[n_] := n * GCD[n, 6] * (2 - Mod[n, 2]); Array[a, 100] (* Amiram Eldar, Jul 07 2025 *)
  • PARI
    a(n, {choices=4}) = my(r=1, f=factor(n)); for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]); r *= p^(logint(choices, p)+e)); return(r)

Formula

Multiplicative with a(2^e) = 2^(e+2), a(3^e) = 3^(e+1), and a(p^e) = p^e for primes p >= 5.
From Amiram Eldar, Jul 07 2025: (Start)
a(n) = n * gcd(6, n) * (2 - (n mod 2)) = n * A089128(n) * A000034(n-1).
Dirichlet g.f.: zeta(s-1) * (1 + 3/2*(s-1)) * (1 + 2/3*(s-1)).
Sum_{k=1..n} a(k) ~ (25/12) * n^2. (End)

A041010 Numerators of continued fraction convergents to sqrt(8).

Original entry on oeis.org

2, 3, 14, 17, 82, 99, 478, 577, 2786, 3363, 16238, 19601, 94642, 114243, 551614, 665857, 3215042, 3880899, 18738638, 22619537, 109216786, 131836323, 636562078, 768398401, 3710155682, 4478554083, 21624372014, 26102926097, 126036076402, 152139002499
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A040005 (continued fraction), A041011 (denominators), A010466 (decimals).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041008 (m=7), A005667 (m=10), A041014 (m=11), A041016 (m=12), ..., A042934 (m=999), A042936 (m=1000).

Programs

  • Mathematica
    Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[8],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011*)
    CoefficientList[Series[(2 + 3*x + 2*x^2 - x^3)/(1 - 6*x^2 + x^4), {x, 0, 30}], x]  (* Vincenzo Librandi, Oct 28 2013 *)
    a0[n_] := -((3-2*Sqrt[2])^n*(1+Sqrt[2]))+(-1+Sqrt[2])*(3+2*Sqrt[2])^n // Simplify
    a1[n_] := ((3-2*Sqrt[2])^n+(3+2*Sqrt[2])^n)/2 // Simplify
    Flatten[MapIndexed[{a0[#], a1[#]} &,Range[20]]] (* Gerry Martens, Jul 11 2015 *)
  • PARI
    A041010=contfracpnqn(c=contfrac(sqrt(8)),#c)[1,][^-1] \\ Discard possibly incorrect last element. NB: a(n)=A041010[n+1]! For more terms use:
    A041010(n)={n<#A041010|| A041010=extend(A041010, [-1,0,6,0]~, n\.8); A041010[n+1]}
    extend(A,c,N)={for(n=#A+1,#A=Vec(A,N), A[n]=A[n-#c..n-1]*c);A} \\ (End)

Formula

a(n) = 6*a(n-2) - a(n-4).
a(2n) = a(2n-1) + a(2n-2), a(2n+1) = 4*a(2n) + a(2n-1).
a(2n) = A001333(2n), a(2n+1) = 2*A001333(2n+1).
G.f.: (2+3*x+2*x^2-x^3)/(1-6*x^2+x^4).
a(n) = A001333(n+1)*A000034(n+1). - R. J. Mathar, Jul 08 2009
From Gerry Martens, Jul 11 2015: (Start)
Interspersion of 2 sequences [a0(n),a1(n)] for n>0:
a0(n) = -((3-2*sqrt(2))^n*(1+sqrt(2))) + (-1+sqrt(2))*(3+2*sqrt(2))^n.
a1(n) = ((3-2*sqrt(2))^n + (3+2*sqrt(2))^n)/2. (End)

Extensions

Entry improved by Michael Somos
Initial term 1 removed and b-file, program and formulas adapted by Georg Fischer, Jul 01 2019
Cross-references added by M. F. Hasler, Nov 02 2019

A165351 Numerator of 3*n/2.

Original entry on oeis.org

0, 3, 3, 9, 6, 15, 9, 21, 12, 27, 15, 33, 18, 39, 21, 45, 24, 51, 27, 57, 30, 63, 33, 69, 36, 75, 39, 81, 42, 87, 45, 93, 48, 99, 51, 105, 54, 111, 57, 117, 60, 123, 63, 129, 66, 135, 69, 141, 72, 147, 75, 153, 78, 159, 81, 165, 84, 171, 87, 177, 90, 183, 93, 189, 96, 195
Offset: 0

Views

Author

Paul Curtz, Sep 16 2009

Keywords

Comments

First trisection of A026741. The other trisections are A165355 and A165367.

Crossrefs

Cf. A000034 (denominator).

Programs

Formula

a(n) = A026741(3*n) = 3*A026741(n).
a(2n) = A008585(n).
a(2n+1) = A016945(n).
G.f.: 3*x*(1+x+x^2)/((1-x)^2 * (1+x)^2).
a(n) = numerator(3n/2). - Wesley Ivan Hurt, Oct 11 2013
a(n) = 3*n / (1 + ((n+1) mod 2)). - Wesley Ivan Hurt, Feb 25 2014
From G. C. Greubel, Jul 31 2022: (Start)
a(n) = 3*n*(3 - (-1)^n)/4.
E.g.f.: (3*x/2)*( 2*cosh(x) + sinh(x) ). (End)

Extensions

Edited and extended by R. J. Mathar, Sep 26 2009
New name from Wesley Ivan Hurt, Oct 13 2013

A319849 Irregular triangle read by rows in which row n lists the even divisors of n in increasing order together with the odd divisors of n in increasing order.

Original entry on oeis.org

1, 2, 1, 1, 3, 2, 4, 1, 1, 5, 2, 6, 1, 3, 1, 7, 2, 4, 8, 1, 1, 3, 9, 2, 10, 1, 5, 1, 11, 2, 4, 6, 12, 1, 3, 1, 13, 2, 14, 1, 7, 1, 3, 5, 15, 2, 4, 8, 16, 1, 1, 17, 2, 6, 18, 1, 3, 9, 1, 19, 2, 4, 10, 20, 1, 5, 1, 3, 7, 21, 2, 22, 1, 11, 1, 23, 2, 4, 6, 8, 12, 24, 1, 3, 1, 5, 25, 2, 26, 1, 13, 1, 3, 9, 27
Offset: 1

Views

Author

Omar E. Pol, Sep 29 2018

Keywords

Comments

Consider the diagram with overlapping periodic curves that appears in the Links section (figure 1). The number of curves that contain the point [n,0] equals the number of divisors of n. The simpler interpretation of the diagram is that the curve of diameter d represents the divisor d of n. Now here we introduce a new interpretation: the curve of diameter d that contains the point [n,0] represents the divisor c of n, where c = n/d. This model has the property that each odd quadrant centered at [n,0] contains the curves that represent the even divisors of n, and each even quadrant centered at [n,0] contains the curves that represent the odd divisors of n.
We can find the n-th row of the triangle as follows:
Consider only the semicircumferences that contain the point [n,0].
If n is an even number, in the first quadrant from top to bottom we can see the curves that represent the even divisors of n in increasing order. Also we can see these curves in the third quadrant from bottom to top.
Then, in the second quadrant from top to bottom we can see the curves that represent the odd divisors of n in increasing order. Also we can see these curves in the fourth quadrant from bottom to top (see example).
Sequences of the same family are shown below:
-----------------------------------
Triangle Order of divisors of n
-----------------------------------
A299481 odd v t.w. even ^
A299483 odd ^ t.w. even v
A319844 even v t.w. odd ^
A319845 even ^ t.w. odd v
A319846 odd v t.w. even v
A319847 odd ^ t.w. even ^
A319848 even v t.w. odd v
This seq. even ^ t.w. odd ^
-----------------------------------
In the above table we have that:
"even v" means "even divisors of n in decreasing order".
"even ^" means "even divisors of n in increasing order".
"odd v" means "odd divisors of n in decreasing order".
"odd ^" means "odd divisors of n in increasing order".
"t.w." means "together with".

Examples

			Triangle begins:
   1;
   2,  1;
   1,  3;
   2,  4,  1;
   1,  5;
   2,  6,  1,  3;
   1,  7;
   2,  4,  8,  1;
   1,  3,  9;
   2, 10,  1,  5;
   1, 11;
   2,  4,  6, 12,  1,  3;
   1, 13;
   2, 14,  1,  7;
   1,  3,  5, 15;
   2,  4,  8, 16,  1;
   1, 17;
   2,  6, 18,  1,  3,  9;
   1, 19;
   2,  4, 10, 20,  1,  5;
   1,  3,  7, 21;
   2, 22,  1, 11;
   1, 23;
   2,  4,  6,  8, 12, 24,  1,  3;
   1,  5, 25;
   2, 26,  1, 13;
   1,  3,  9, 27;
   2,  4, 14, 28,  1,  7;
...
For n = 12 the divisors of 12 are [1, 2, 3, 4, 6, 12]. The even divisors of 12 in increasing order are [2, 4, 6, 12], and the odd divisors of 12 in increasing order are [1, 3], so the 12th row of triangle is [2, 4, 6, 12, 1, 3].
On the other hand, consider the diagram that appears in the Links section (figure 1). Then consider only the semicircumferences that contain the point [12,0]. In the first quadrant, from top to bottom, we can see the curves with diameters [6, 3, 2, 1]. Also we can see these curves in the third quadrant from bottom to top. The associated numbers c = 12/d are [2, 4, 6, 12] respectively. These are the even divisors of n in increasing order. Then, in the second quadrant, from top to bottom, we can see the curves with diameters [12, 4]. Also we can see these curves in the fourth quadrant from bottom to top. The associated numbers c = 12/d are [1, 3] respectively. These are the odd divisors of 12 in increasing order. Finally all numbers c obtained are [2, 4, 6, 12, 1, 3] equaling the 12th row of triangle.
		

Crossrefs

Row sums give A000203.
Row n has length A000005(n).
Column 1 gives A000034.
Right border gives A000265.

Programs

  • PARI
    row(n) = my(d=divisors(n)); concat(select(x->!(x%2), d), select(x->(x%2), d));
    lista(nn) = {for (n=1, nn, my(r = row(n)); for (k=1, #r, print1(r[k], ", ")););} \\ Michel Marcus, Jan 17 2019

A106262 An invertible triangle of remainders of 2^n.

Original entry on oeis.org

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

Views

Author

Paul Barry, Apr 28 2005

Keywords

Examples

			Triangle begins:
  1;
  0, 1;
  0, 2, 1;
  0, 1, 2, 1;
  0, 2, 0, 2, 1;
  0, 1, 0, 4, 2, 1;
  0, 2, 0, 3, 4, 2, 1;
  0, 1, 0, 1, 2, 4, 2, 1;
  0, 2, 0, 2, 4, 1, 4, 2, 1;
  0, 1, 0, 4, 2, 2, 0, 4, 2, 1;
		

Crossrefs

Cf. A106263 (row sums), A106264 (diagonal sums).

Programs

  • Magma
    [Modexp(2, n-k, k+2): k in [0..n], n in [0..15]]; // G. C. Greubel, Jan 10 2023
    
  • Mathematica
    Table[PowerMod[2, n-k, k+2], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 10 2023 *)
  • SageMath
    flatten([[power_mod(2,n-k,k+2) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Jan 10 2023

Formula

T(n, k) = 2^(n-k) mod (k+2).
Sum_{k=0..n} T(n, k) = A106263(n) (row sums).
Sum_{k=0..floor(n/2)} T(n-k, k) = A106264(n) (diagonal sums).
From G. C. Greubel, Jan 10 2023: (Start)
T(n, 0) = A000007(n).
T(n, 1) = A000034(n+1).
T(2*n, n) = A213859(n).
T(2*n, n-1) = A015910(n+1).
T(2*n, n+1) = A294390(n+3).
T(2*n+1, n-1) = A112983(n+1).
T(2*n+1, n+1) = A294389(n+3).
T(2*n-1, n-1) = A062173(n+1). (End)

A128315 Inverse Moebius transform of signed A007318.

Original entry on oeis.org

1, 0, 1, 2, -2, 1, -1, 4, -3, 1, 2, -4, 6, -4, 1, 0, 4, -9, 10, -5, 1, 2, -6, 15, -20, 15, -6, 1, -2, 11, -24, 36, -35, 21, -7, 1, 3, -10, 29, -56, 70, -56, 28, -8, 1, 0, 6, -30, 80, -125, 126, -84, 36, -9, 1, 2, -10, 45, -120, 210, -252, 210, -120, 45, -10, 1, -2, 18, -67, 176, -335, 463, -462, 330, -165, 55, -11, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 25 2007

Keywords

Comments

Examples

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

Crossrefs

Programs

  • Magma
    A128315:= func< n,k | (&+[0^(n mod j)*(-1)^(k+j)*Binomial(j-1, k-1): j in [k..n]]) >;
    [A128315(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Jun 22 2024
    
  • Mathematica
    A128315[n_, k_]:= (-1)^k*DivisorSum[n, (-1)^#*Binomial[#-1, k-1] &];
    Table[A128315[n,k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Jun 22 2024 *)
  • SageMath
    def A128315(n,k): return sum( 0^(n%j)*(-1)^(k+j)*binomial(j-1,k-1) for j in range(k,n+1))
    flatten([[A128315(n,k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Jun 22 2024

Formula

T(n, k) = A051731(n, k) * A130595(n-1, k-1) as infinite lower triangular matrices.
T(n, 1) = A048272(n).
Sum_{k=1..n} T(n, k) = A000012(n) = 1 (row sums).
From G. C. Greubel, Jun 22 2024: (Start)
T(n, k) = (-1)^k * Sum_{d|n} (-1)^d * binomial(d-1, k-1).
T(n, 2) = A325940(n), n >= 2.
T(n, 3) = A363615(n), n >= 3.
T(n, 4) = A363616(n), n >= 4.
T(2*n-1, n) = (-1)^(n-1)*A000984(n-1), n >= 1.
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (-1)^(n-1)*A081295(n).
Sum_{k=1..n} k*T(n, k) = A000034(n-1), n >= 1.
Sum_{k=1..n} (k+1)*T(n, k) = A010693(n-1), n >= 1. (End)

Extensions

a(43) = 28 inserted and more terms from Georg Fischer, Jun 05 2023

A140253 a(2*n) = 2*(2*4^(n-1)-1) and a(2*n-1) = 2*4^(n-1)-1.

Original entry on oeis.org

-1, 1, 2, 7, 14, 31, 62, 127, 254, 511, 1022, 2047, 4094, 8191, 16382, 32767, 65534, 131071, 262142, 524287, 1048574, 2097151, 4194302, 8388607, 16777214, 33554431, 67108862, 134217727, 268435454, 536870911
Offset: 0

Views

Author

Paul Curtz, Jun 23 2008

Keywords

Comments

The inverse binomial transform is 1, 1, 4, -2, 10, -14, 34, -62 which leads to (-1)^(n+1)*A135440(n).
For n > 0: A266161(a(n)) = n and A266161(m) < n for m < a(n). - Reinhard Zumkeller, Dec 22 2015
Also, the decimal representation of the diagonal from the corner to the origin of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 673", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Jul 23 2017

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a140253 n = a140253_list !! n
    a140253_list = -1 : concat
                        (transpose [a083420_list, map (* 2) a083420_list])
    -- Reinhard Zumkeller, Dec 22 2015
  • Maple
    A140253:=proc(n): if type(n, odd) then 2*4^(((n+1)/2)-1)-1 else 2*(2*4^((n/2)-1)-1) fi: end: seq(A140253(n),n=0..29); # Johannes W. Meijer, Jun 24 2011
  • Mathematica
    Table[(2^(n+1) - 3 + (-1)^(n+1))/2, {n, 0, 30}] (* Jean-François Alcover, Jun 05 2017 *)

Formula

a(2*n) = 2*A083420(n-1) and a(2*n+1) = A083420(n)
a(n+1) - a(n) = A014551(n); Jacobsthal-Lucas numbers.
a(2*n) + a(2*n+1) = 9*A002450(n)
a(n+1) - 2*a(n) = A010674(n+1); repeat 3, 0.
a(n) + A000034(n+1) = A000079(n); powers of 2.
a(n)= a(n-1) + 2*a(n-2) + 3. - Gary Detlefs, Jun 22 2010
a(n+1) = A000069(2^n); odious numbers. - Johannes W. Meijer, Jun 24 2011
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n>2, a(0) = -1, a(1) = 1, a(2) = 2. - Philippe Deléham, Feb 25 2012
G.f.: (x^2+3*x-1)/((1-2*x)*(1-x)*(1+x)). - Philippe Deléham, Feb 25 2012

Extensions

Edited, corrected and information added by Johannes W. Meijer, Jun 24 2011

A167192 Triangle read by rows: T(n,k) = (n-k)/gcd(n,k), 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 30 2009

Keywords

Examples

			The triangle T(n,k) begins:
n\k   1   2   3   4  5  6  7  8  9 10 11 12 13  14  15 ...
1:    0
2:    1   0
3:    2   1   0
4:    3   1   1   0
5:    4   3   2   1  0
6:    5   2   1   1  1  0
7:    6   5   4   3  2  1  0
8:    7   3   5   1  3  1  1  0
9:    8   7   2   5  4  1  2  1  0
10:   9   4   7   3  1  2  3  1  1  0
11:  10   9   8   7  6  5  4  3  2  1  0
12:  11   5   3   2  7  1  5  1  1  1  1  0
13:  12  11  10   9  8  7  6  5  4  3  2  1  0
14:  13   6  11   5  9  4  1  3  5  2  3  1  1   0
15:  14  13   4  11  2  3  8  7  2  1  4  1  2   1   0
- _Wolfdieter Lang_, Feb 20 2013
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[(n-k)/GCD[n,k],{n,20},{k,n}]] (* Harvey P. Dale, Nov 27 2015 *)
  • PARI
    for(n=1,10, for(k=1,n, print1((n-k)/gcd(n,k), ", "))) \\ G. C. Greubel, Sep 13 2017

Formula

T(n,k) = (n-k)/gcd(n,k), 1 <= k <= n.
T(n,k) = A025581(n,k)/A050873(n,k);
T(n,1) = A001477(n-1);
T(n,2) = A026741(n-2) for n > 1;
T(n,3) = A051176(n-3) for n > 2;
T(n,4) = A060819(n-4) for n > 4;
T(n,n-3) = A144437(n) for n > 3;
T(n,n-2) = A000034(n) for n > 2;
T(n,n-1) = A000012(n);
T(n,n) = A000004(n).
Previous Showing 41-50 of 142 results. Next