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

A194961 Fractalization of A194960.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Sep 06 2011

Keywords

Comments

See A194959 for a discussion of fractalization.

Crossrefs

Programs

  • Mathematica
    p[n_] := Floor[(n + 2)/3] + Mod[n - 1, 3]
    Table[p[n], {n, 1, 90}]  (* A194960 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20]  (* A194961 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13}, {k, 1, n}]]  (* A194962 *)
    q[n_] := Position[w, n]; Flatten[
    Table[q[n], {n, 1, 80}]]  (* A194963 *)

A194962 Interspersion fractally induced by A194960.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 8, 11, 14, 15, 12, 13, 16, 20, 21, 17, 18, 19, 22, 27, 28, 23, 25, 26, 24, 29, 35, 36, 30, 33, 34, 31, 32, 37, 44, 45, 38, 42, 43, 39, 40, 41, 46, 54, 55, 47, 52, 53, 48, 50, 51, 49, 56, 65, 66, 57, 63, 64, 58, 61, 62, 59, 60, 67, 77, 78, 68, 75, 76, 69, 73, 74, 70, 71, 72
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence.

Examples

			Northwest corner:
   1...2...4...7..11..16..22
   3...5...9..14..20..27..35
   6..10..15..21..28..36..45
   8..12..17..23..30..38..47
  18..13..25..33..42..52..63
Antidiagonals of the array:
   1;
   2,  3;
   4,  5,  6;
   7,  9, 10,  8;
  11, 14, 15, 12, 13;
  16, 20, 21, 17, 18, 19;
  22, 27, 28, 23, 25, 26, 24;
  29, 35, 36, 30, 33, 34, 31, 32;
  37, 44, 45, 38, 42, 43, 39, 40, 41;
		

Crossrefs

Programs

  • Mathematica
    p[n_] := Floor[(n + 2)/3] + Mod[n - 1, 3]
    Table[p[n], {n, 1, 90}]  (* A194960 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20]  (* A194961 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13}, {k, 1, n}]]  (* A194962 *)
    q[n_] := Position[w, n]; Flatten[
    Table[q[n], {n, 1, 80}]]  (* A194963 *)

A049310 Triangle of coefficients of Chebyshev's S(n,x) := U(n,x/2) polynomials (exponents in increasing order).

Original entry on oeis.org

1, 0, 1, -1, 0, 1, 0, -2, 0, 1, 1, 0, -3, 0, 1, 0, 3, 0, -4, 0, 1, -1, 0, 6, 0, -5, 0, 1, 0, -4, 0, 10, 0, -6, 0, 1, 1, 0, -10, 0, 15, 0, -7, 0, 1, 0, 5, 0, -20, 0, 21, 0, -8, 0, 1, -1, 0, 15, 0, -35, 0, 28, 0, -9, 0, 1, 0, -6, 0, 35, 0, -56, 0, 36, 0, -10, 0, 1, 1, 0, -21, 0, 70, 0, -84, 0
Offset: 0

Views

Author

Keywords

Comments

G.f. for row polynomials S(n,x) (signed triangle): 1/(1-x*z+z^2). Unsigned triangle |a(n,m)| has Fibonacci polynomials F(n+1,x) as row polynomials with g.f. 1/(1-x*z-z^2). |a(n,m)| triangle has rows of Pascal's triangle A007318 in the even-numbered diagonals (odd-numbered ones have only 0's).
Row sums (unsigned triangle) A000045(n+1) (Fibonacci). Row sums (signed triangle) S(n,1) sequence = periodic(1,1,0,-1,-1,0) = A010892.
Alternating row sums A049347(n) = S(n,-1) = periodic(1,-1,0). - Wolfdieter Lang, Nov 04 2011
S(n,x) is the characteristic polynomial of the adjacency matrix of the n-path. - Michael Somos, Jun 24 2002
S(n,x) is also the matching polynomial of the n-path. - Eric W. Weisstein, Apr 10 2017
|T(n,k)| = number of compositions of n+1 into k+1 odd parts. Example: |T(7,3)| = 10 because we have (1,1,3,3), (1,3,1,3), (1,3,3,1), (3,1,1,3), (3,1,3,1), (3,3,1,1), (1,1,1,5), (1,1,5,1), (1,5,1,1) and (5,1,1,1). - Emeric Deutsch, Apr 09 2005
S(n,x)= R(n,x) + S(n-2,x), n >= 2, S(-1,x)=0, S(0,x)=1, R(n,x):=2*T(n,x/2) = Sum_{m=0..n} A127672(n,m)*x^m (monic integer Chebyshev T-Polynomials). This is the rewritten so-called trace of the transfer matrix formula for the T-polynomials. - Wolfdieter Lang, Dec 02 2010
In a regular N-gon inscribed in a unit circle, the side length is d(N,1) = 2*sin(Pi/N). The length ratio R(N,k):=d(N,k)/d(N,1) for the (k-1)-th diagonal, with k from {2,3,...,floor(N/2)}, N >= 4, equals S(k-1,x) = sin(k*Pi/N)/sin(Pi/N) with x=rho(N):=R(N,2) = 2*cos(Pi/N). Example: N=7 (heptagon), rho=R(7,2), sigma:=R(N,3) = S(2,rho) = rho^2 - 1. Motivated by the quoted paper by P. Steinbach. - Wolfdieter Lang, Dec 02 2010
From Wolfdieter Lang, Jul 12 2011: (Start)
In q- or basic analysis, q-numbers are [n]_q := S(n-1,q+1/q) = (q^n-(1/q)^n)/(q-1/q), with the row polynomials S(n,x), n >= 0.
The zeros of the row polynomials S(n-1,x) are (from those of Chebyshev U-polynomials):
x(n-1;k) = +- t(k,rho(n)), k = 1..ceiling((n-1)/2), n >= 2, with t(n,x) the row polynomials of A127672 and rho(n):= 2*cos(Pi/n). The simple vanishing zero for even n appears here as +0 and -0.
Factorization of the row polynomials S(n-1,x), x >= 1, in terms of the minimal polynomials of cos(2 Pi/2), called Psi(n,x), with coefficients given by A181875/A181876:
S(n-1,x) = (2^(n-1))*Product_{n>=1}(Psi(d,x/2), 2 < d | 2n).
(From the rewritten eq. (3) of the Watkins and Zeitlin reference, given under A181872.) [See the W. Lang ArXiv link, Proposition 9, eq. (62). - Wolfdieter Lang, Apr 14 2018]
(End)
The discriminants of the S(n,x) polynomials are found in A127670. - Wolfdieter Lang, Aug 03 2011
This is an example for a subclass of Riordan convolution arrays (lower triangular matrices) called Bell arrays. See the L. W. Shapiro et al. reference under A007318. If a Riordan array is named (G(z),F(z)) with F(z)=z*Fhat(z), the o.g.f. for the row polynomials is G(z)/(1-x*z*Fhat(z)), and it becomes a Bell array if G(z)=Fhat(z). For the present Bell type triangle G(z)=1/(1+z^2) (see the o.g.f. comment above). This leads to the o.g.f. for the column no. k, k >= 0, x^k/(1+x^2)^(k+1) (see the formula section), the one for the row sums and for the alternating row sums (see comments above). The Riordan (Bell) A- and Z-sequences (defined in a W. Lang link under A006232, with references) have o.g.f.s 1-x*c(x^2) and -x*c(x^2), with the o.g.f. of the Catalan numbers A000108. Together they lead to a recurrence given in the formula section. - Wolfdieter Lang, Nov 04 2011
The determinant of the N x N matrix S(N,[x[1], ..., x[N]]) with elements S(m-1,x[n]), for n, m = 1, 2, ..., N, and for any x[n], is identical with the determinant of V(N,[x[1], ..., x[N]]) with elements x[n]^(m-1) (a Vandermondian, which equals Product_{1 <= i < j<= N} (x[j] - x[i])). This is a special instance of a theorem valid for any N >= 1 and any monic polynomial system p(m,x), m>=0, with p(0,x) = 1. For this theorem see the Vein-Dale reference, p. 59. Thanks to L. Edson Jeffery for an email asking for a proof of the non-singularity of the matrix S(N,[x[1], ...., x[N]]) if and only if the x[j], j = 1..N, are pairwise distinct. - Wolfdieter Lang, Aug 26 2013
These S polynomials also appear in the context of modular forms. The rescaled Hecke operator T*n = n^((1-k)/2)*T_n acting on modular forms of weight k satisfies T*(p^n) = S(n, T*p), for each prime p and positive integer n. See the Koecher-Krieg reference, p. 223. - _Wolfdieter Lang, Jan 22 2016
For a shifted o.g.f. (mod signs), its compositional inverse, and connections to Motzkin and Fibonacci polynomials, non-crossing partitions and other combinatorial structures, see A097610. - Tom Copeland, Jan 23 2016
From M. Sinan Kul, Jan 30 2016; edited by Wolfdieter Lang, Jan 31 2016 and Feb 01 2016: (Start)
Solutions of the Diophantine equation u^2 + v^2 - k*u*v = 1 for integer k given by (u(k,n), v(k,n)) = (S(n,k), S(n-1,k)) because of the Cassini-Simson identity: S(n,x)^2 - S(n+1,x)*S(n-1, x) = 1, after use of the S-recurrence. Note that S(-n, x) = -S(-n-2, x), n >= 1, and the periodicity of some S(n, k) sequences.
Hence another way to obtain the row polynomials would be to take powers of the matrix [x, -1; 1,0]: S(n, x) = (([x, -1; 1, 0])^n)[1,1], n >= 0.
See also a Feb 01 2016 comment on A115139 for a well-known S(n, x) sum formula.
Then we have with the present T triangle
A039834(n) = -i^(n+1)*T(n-1, k) where i is the imaginary unit and n >= 0.
A051286(n) = Sum_{i=0..n} T(n,i)^2 (see the Philippe Deléham, Nov 21 2005 formula),
A181545(n) = Sum_{i=0..n+1} abs(T(n,i)^3),
A181546(n) = Sum_{i=0..n+1} T(n,i)^4,
A181547(n) = Sum_{i=0..n+1} abs(T(n,i)^5).
S(n, 0) = A056594(n), and for k = 1..10 the sequences S(n-1, k) with offset n = 0 are A128834, A001477, A001906, A001353, A004254, A001109, A004187, A001090, A018913, A004189.
(End)
For more on the Diophantine equation presented by Kul, see the Ismail paper. - Tom Copeland, Jan 31 2016
The o.g.f. for the Legendre polynomials L(n,x) is 1 / sqrt(1- 2x*z + z^2), and squaring it gives the o.g.f. of U(n,x), A053117, so Sum_{k=0..n} L(k,x/2) L(n-k,x/2) = S(n,x). This gives S(n,x) = L(n/2,x/2)^2 + 2*Sum_{k=0..n/2-1} L(k,x/2) L(n-k,x/2) for n even and S(n,x) = 2*Sum_{k=0..(n-1)/2} L(k,x/2) L(n-k,x/2) for odd n. For a connection to elliptic curves and modular forms, see A053117. For the normalized Legendre polynomials, see A100258. For other properties and relations to other polynomials, see Allouche et al. - Tom Copeland, Feb 04 2016
LG(x,h1,h2) = -log(1 - h1*x + h2*x^2) = Sum_{n>0} F(n,-h1,h2,0,..,0) x^n/n is a log series generator of the bivariate row polynomials of A127672 with A127672(0,0) = 0 and where F(n,b1,b2,..,bn) are the Faber polynomials of A263916. Exp(LG(x,h1,h2)) = 1 / (1 - h1*x + h2*x^2 ) is the o.g.f. of the bivariate row polynomials of this entry. - Tom Copeland, Feb 15 2016 (Instances of the bivariate o.g.f. for this entry are on pp. 5 and 18 of Sunada. - Tom Copeland, Jan 18 2021)
For distinct odd primes p and q the Legendre symbol can be written as Legendre(q,p) = Product_{k=1..P} S(q-1, 2*cos(2*Pi*k/p)), with P = (p-1)/2. See the Lemmermeyer reference, eq. (8.1) on p. 236. Using the zeros of S(q-1, x) (see above) one has S(q-1, x) = Product_{l=1..Q} (x^2 - (2*cos(Pi*l/q))^2), with Q = (q-1)/2. Thus S(q-1, 2*cos(2*Pi*k/p)) = ((-4)^Q)*Product_{l=1..Q} (sin^2(2*Pi*k/p) - sin^2(Pi*l/q)) = ((-4)^Q)*Product_{m=1..Q} (sin^2(2*Pi*k/p) - sin^2(2*Pi*m/q)). For the proof of the last equality see a W. Lang comment on the triangle A057059 for n = Q and an obvious function f. This leads to Eisenstein's proof of the quadratic reciprocity law Legendre(q,p) = ((-1)^(P*Q)) * Legendre(p,q), See the Lemmermeyer reference, pp. 236-237. - Wolfdieter Lang, Aug 28 2016
For connections to generalized Fibonacci polynomials, compare their generating function on p. 5 of the Amdeberhan et al. link with the o.g.f. given above for the bivariate row polynomials of this entry. - Tom Copeland, Jan 08 2017
The formula for Ramanujan's tau function (see A000594) for prime powers is tau(p^k) = p^(11*k/2)*S(k, p^(-11/2)*tau(p)) for k >= 1, and p = A000040(n), n >= 1. See the Hardy reference, p. 164, eqs. (10.3.4) and (10.3.6) rewritten in terms of S. - Wolfdieter Lang, Jan 27 2017
From Wolfdieter Lang, May 08 2017: (Start)
The number of zeros Z(n) of the S(n, x) polynomials in the open interval (-1,+1) is 2*b(n) for even n >= 0 and 1 + 2*b(n) for odd n >= 1, where b(n) = floor(n/2) - floor((n+1)/3). This b(n) is the number of integers k in the interval (n+1)/3 < k <= floor(n/2). See a comment on the zeros of S(n, x) above, and b(n) = A008615(n-2), n >= 0. The numbers Z(n) have been proposed (with a conjecture related to A008611) by Michel Lagneau, as the number of zeros of Fibonacci polynomials on the imaginary axis (-I,+I), with I=sqrt(-1). They are Z(n) = A008611(n-1), n >= 0, with A008611(-1) = 0. Also Z(n) = A194960(n-4), n >= 0. Proof using the A008611 version. A194960 follows from this.
In general the number of zeros Z(a;n) of S(n, x) for n >= 0 in the open interval (-a,+a) for a from the interval (0,2) (x >= 2 never has zeros, and a=0 is trivial: Z(0;n) = 0) is with b(a;n) = floor(n//2) - floor((n+1)*arccos(a/2)/Pi), as above Z(a;n) = 2*b(a;n) for even n >= 0 and 1 + 2*b(a;n) for odd n >= 1. For the closed interval [-a,+a] Z(0;n) = 1 and for a from (0,1) one uses for Z(a;n) the values b(a;n) = floor(n/2) - ceiling((n+1)*arccos(a/2)/Pi) + 1. (End)
The Riordan row polynomials S(n, x) (Chebyshev S) belong to the Boas-Buck class (see a comment and references in A046521), hence they satisfy the Boas-Buck identity: (E_x - n*1)*S(n, x) = (E_x + 1)*Sum_{p=0..n-1} (1 - (-1)^p)*(-1)^((p+1)/2)*S(n-1-p, x), for n >= 0, where E_x = x*d/dx (Euler operator). For the triangle T(n, k) this entails a recurrence for the sequence of column k, given in the formula section. - Wolfdieter Lang, Aug 11 2017
The e.g.f. E(x,t) := Sum_{n>=0} (t^n/n!)*S(n,x) for the row polynomials is obtained via inverse Laplace transformation from the above given o.g.f. as E(x,t) = ((1/xm)*exp(t/xm) - (1/xp)*exp(t/xp) )/(xp - xm) with xp = (x + sqrt(x^2-4))/2 and xm = (x - sqrt(x^2-4))/2. - Wolfdieter Lang, Nov 08 2017
From Wolfdieter Lang, Apr 12 2018: (Start)
Factorization of row polynomials S(n, x), for n >= 1, in terms of C polynomials (not Chebyshev C) with coefficients given in A187360. This is obtained from the factorization into Psi polynomials (see the Jul 12 2011 comment above) but written in terms of minimal polynomials of 2*cos(2*Pi/n) with coefficients in A232624:
S(2*k, x) = Product_{2 <= d | (2*k+1)} C(d, x)*(-1)^deg(d)*C(d, -x), with deg(d) = A055034(d) the degree of C(d, x).
S(2*k+1, x) = Product_{2 <= d | 2*(k+1)} C(d, x) * Product_{3 <= 2*d + 1 | (k+1)} (-1)^(deg(2*d+1))*C(2*d+1, -x).
Note that (-1)^(deg(2*d+1))*C(2*d+1, -x)*C(2*d+1, x) pairs always appear.
The number of C factors of S(2*k, x), for k >= 0, is 2*(tau(2*k+1) - 1) = 2*(A099774(k+1) - 1) = 2*A095374(k), and for S(2*k+1, x), for k >= 0, it is tau(2*(k+1)) + tau_{odd}(k+1) - 2 = A302707(k), with tau(2*k+1) = A099774(k+1), tau(n) = A000005 and tau(2*(k+1)) = A099777(k+1).
For the reverse problem, the factorization of C polynomials into S polynomials, see A255237. (End)
The S polynomials with general initial conditions S(a,b;n,x) = x*S(a,b;n-1,x) - S(a,b;n-2,x), for n >= 1, with S(a,b;-1,x) = a and S(a,b;0,x) = b are S(a,b;n,x) = b*S(n, x) - a*S(n-1, x), for n >= -1. Recall that S(-2, x) = -1 and S(-1, x) = 0. The o.g.f. is G(a,b;z,x) = (b - a*z)/(1 - x*z + z^2). - Wolfdieter Lang, Oct 18 2019
Also the convolution triangle of A101455. - Peter Luschny, Oct 06 2022
From Wolfdieter Lang, Apr 26 2023: (Start)
Multi-section of S-polynomials: S(m*n+k, x) = S(m+k, x)*S(n-1, R(m, x)) - S(k, x)*S(n-2, R(m, x)), with R(n, x) = S(n, x) - S(n-2, x) (see A127672), S(-2, x) = -1, and S(-1, x) = 0, for n >= 0, m >= 1, and k = 0, 1, ..., m-1.
O.g.f. of {S(m*n+k, y)}_{n>=0}: G(m,k,y,x) = (S(k, y) - (S(k, y)*R(m, y) - S(m+k, y))*x)/(1 - R(m,y)*x + x^2).
See eqs. (40) and (49), with r = x or y and s =-1, of the G. Detlefs and W. Lang link at A034807. (End)
S(n, x) for complex n and complex x: S(n, x) = ((-i/2)/sqrt(1 - (x/2)^2))*(q(x/2)*exp(+n*log(q(x/2))) - (1/q(x/2))*exp(-n*log(q(x/2)))), with q(x) = x + sqrt(1 - x^2)*i. Here log(z) = |z| + Arg(z)*i, with Arg(z) from [-Pi,+Pi) (principal branch). This satisfies the recurrence relation for S because it is derived from the Binet - de Moivre formula for S. Examples: S(n/m, 0) = cos((n/m)*Pi/4), for n >= 0 and m >= 1. S(n*i, 0) = (1/2)*(1 + exp(n*Pi))*exp(-(n/2)*Pi), for n >= 0. S(1+i, 2+i) = 0.6397424847... + 1.0355669490...*i. Thanks to Roberto Alfano for asking a question leading to this formula. - Wolfdieter Lang, Jun 05 2023
Lim_{n->oo} S(n, x)/S(n-1, x) = r(x) = (x - sqrt(x^2 -4))/2, for |x| >= 2. For x = +-2, this limit is +-1. - Wolfdieter Lang, Nov 15 2023

Examples

			The triangle T(n, k) begins:
  n\k  0  1   2   3   4   5   6    7   8   9  10  11
  0:   1
  1:   0  1
  2:  -1  0   1
  3:   0 -2   0   1
  4:   1  0  -3   0   1
  5:   0  3   0  -4   0   1
  6:  -1  0   6   0  -5   0   1
  7:   0 -4   0  10   0  -6   0    1
  8:   1  0 -10   0  15   0  -7    0   1
  9:   0  5   0 -20   0  21   0   -8   0   1
  10: -1  0  15   0 -35   0  28    0  -9   0   1
  11:  0 -6   0  35   0 -56   0   36   0 -10   0   1
  ... Reformatted and extended by _Wolfdieter Lang_, Oct 24 2012
For more rows see the link.
E.g., fourth row {0,-2,0,1} corresponds to polynomial S(3,x)= -2*x + x^3.
From _Wolfdieter Lang_, Jul 12 2011: (Start)
Zeros of S(3,x) with rho(4)= 2*cos(Pi/4) = sqrt(2):
  +- t(1,sqrt(2)) = +- sqrt(2) and
  +- t(2,sqrt(2)) = +- 0.
Factorization of S(3,x) in terms of Psi polynomials:
S(3,x) = (2^3)*Psi(4,x/2)*Psi(8,x/2) = x*(x^2-2).
(End)
From _Wolfdieter Lang_, Nov 04 2011: (Start)
A- and Z- sequence recurrence:
T(4,0) = - (C(0)*T(3,1) + C(1)*T(3,3)) = -(-2 + 1) = +1,
T(5,3) = -3 - 1*1 = -4.
(End)
Boas-Buck recurrence for column k = 2, n = 6: S(6, 2) = (3/4)*(0 - 2* S(4 ,2) + 0 + 2*S(2, 2)) = (3/4)*(-2*(-3) + 2) = 6. - _Wolfdieter Lang_, Aug 11 2017
From _Wolfdieter Lang_, Apr 12 2018: (Start)
Factorization into C polynomials (see the Apr 12 2018 comment):
S(4, x) = 1 - 3*x^2 + x^4 = (-1 + x + x^2)*(-1 - x + x^2) = (-C(5, -x)) * C(5, x); the number of factors is 2 = 2*A095374(2).
S(5, x) = 3*x - 4*x^3 + x^5 = x*(-1 + x)*(1 + x)*(-3 + x^2) = C(2, x)*C(3, x)*(-C(3, -x))*C(6, x); the number of factors is 4 = A302707(2). (End)
		

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 164.
  • Max Koecher and Aloys Krieg, Elliptische Funktionen und Modulformen, 2. Auflage, Springer, 2007, p. 223.
  • Franz Lemmermeyer, Reciprocity Laws. From Euler to Eisenstein, Springer, 2000.
  • D. S. Mitrinovic, Analytic Inequalities, Springer-Verlag, 1970; p. 232, Sect. 3.3.38.
  • Theodore J. Rivlin, Chebyshev polynomials: from approximation theory to algebra and number theory, 2. ed., Wiley, New York, 1990, pp. 60 - 61.
  • R. Vein and P. Dale, Determinants and Their Applications in Mathematical Physics, Springer, 1999.

Crossrefs

Cf. A000005, A000217, A000292, A000332, A000389, A001227, A007318, A008611, A008615, A101455, A010892, A011973, A053112 (without zeros), A053117, A053119 (reflection), A053121 (inverse triangle), A055034, A097610, A099774, A099777, A100258, A112552 (first column clipped), A127672, A168561 (absolute values), A187360. A194960, A232624, A255237.
Triangles of coefficients of Chebyshev's S(n,x+k) for k = 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5: A207824, A207823, A125662, A078812, A101950, A049310, A104562, A053122, A207815, A159764, A123967.

Programs

  • Magma
    A049310:= func< n,k | ((n+k) mod 2) eq 0 select (-1)^(Floor((n+k)/2)+k)*Binomial(Floor((n+k)/2), k) else 0 >;
    [A049310(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Jul 25 2022
  • Maple
    A049310 := proc(n,k): binomial((n+k)/2,(n-k)/2)*cos(Pi*(n-k)/2)*(1+(-1)^(n-k))/2 end: seq(seq(A049310(n,k), k=0..n),n=0..11); # Johannes W. Meijer, Aug 08 2011
    # Uses function PMatrix from A357368. Adds a row above and a column to the left.
    PMatrix(10, n -> ifelse(irem(n, 2) = 0, 0, (-1)^iquo(n-1, 2))); # Peter Luschny, Oct 06 2022
  • Mathematica
    t[n_, k_] /; EvenQ[n+k] = ((-1)^((n+k)/2+k))*Binomial[(n+k)/2, k]; t[n_, k_] /; OddQ[n+k] = 0; Flatten[Table[t[n, k], {n, 0, 12}, {k, 0, n}]][[;; 86]] (* Jean-François Alcover, Jul 05 2011 *)
    Table[Coefficient[(-I)^n Fibonacci[n + 1, - I x], x, k], {n, 0, 10}, {k, 0, n}] //Flatten (* Clark Kimberling, Aug 02 2011; corrected by Eric W. Weisstein, Apr 06 2017 *)
    CoefficientList[ChebyshevU[Range[0, 10], -x/2], x] // Flatten (* Eric W. Weisstein, Apr 06 2017 *)
    CoefficientList[Table[(-I)^n Fibonacci[n + 1, -I x], {n, 0, 10}], x] // Flatten (* Eric W. Weisstein, Apr 06 2017 *)
  • PARI
    {T(n, k) = if( k<0 || k>n || (n + k)%2, 0, (-1)^((n + k)/2 + k) * binomial((n + k)/2, k))} /* Michael Somos, Jun 24 2002 */
    
  • SageMath
    @CachedFunction
    def A049310(n,k):
        if n< 0: return 0
        if n==0: return 1 if k == 0 else 0
        return A049310(n-1,k-1) - A049310(n-2,k)
    for n in (0..9): [A049310(n,k) for k in (0..n)] # Peter Luschny, Nov 20 2012
    

Formula

T(n,k) := 0 if n < k or n+k odd, otherwise ((-1)^((n+k)/2+k))*binomial((n+k)/2, k); T(n, k) = -T(n-2, k)+T(n-1, k-1), T(n, -1) := 0 =: T(-1, k), T(0, 0)=1, T(n, k)= 0 if n < k or n+k odd; g.f. k-th column: (1 / (1 + x^2)^(k + 1)) * x^k. - Michael Somos, Jun 24 2002
T(n,k) = binomial((n+k)/2, (n-k)/2)*cos(Pi*(n-k)/2)*(1+(-1)^(n-k))/2. - Paul Barry, Aug 28 2005
Sum_{k=0..n} T(n,k)^2 = A051286(n). - Philippe Deléham, Nov 21 2005
Recurrence for the (unsigned) Fibonacci polynomials: F(1)=1, F(2)=x; for n > 2, F(n) = x*F(n-1) + F(n-2).
From Wolfdieter Lang, Nov 04 2011: (Start)
The Riordan A- and Z-sequences, given in a comment above, lead together to the recurrence:
T(n,k) = 0 if n < k, if k=0 then T(0,0)=1 and
T(n,0)= -Sum_{i=0..floor((n-1)/2)} C(i)*T(n-1,2*i+1), otherwise T(n,k) = T(n-1,k-1) - Sum_{i=1..floor((n-k)/2)} C(i)*T(n-1,k-1+2*i), with the Catalan numbers C(n)=A000108(n).
(End)
The row polynomials satisfy also S(n,x) = 2*(T(n+2, x/2) - T(n, x/2))/(x^2-4) with the Chebyshev T-polynomials. Proof: Use the trace formula 2*T(n, x/2) = S(n, x) - S(n-2, x) (see the Dec 02 2010 comment above) and the S-recurrence several times. This is a formula which expresses the S- in terms of the T-polynomials. - Wolfdieter Lang, Aug 07 2014
From Tom Copeland, Dec 06 2015: (Start)
The non-vanishing, unsigned subdiagonals Diag_(2n) contain the elements D(n,k) = Sum_{j=0..k} D(n-1,j) = (k+1) (k+2) ... (k+n) / n! = binomial(n+k,n), so the o.g.f. for the subdiagonal is (1-x)^(-(n+1)). E.g., Diag_4 contains D(2,3) = D(1,0) + D(1,1) + D(1,2) + D(1,3) = 1 + 2 + 3 + 4 = 10 = binomial(5,2). Diag_4 is shifted A000217; Diag_6, shifted A000292: Diag_8, shifted A000332; and Diag_10, A000389.
The non-vanishing antidiagonals are signed rows of the Pascal triangle A007318.
For a reversed, unsigned version with the zeros removed, see A011973. (End)
The Boas-Buck recurrence (see a comment above) for the sequence of column k is: S(n, k) = ((k+1)/(n-k))*Sum_{p=0..n-1-k} (1 - (-1)^p)*(-1)^((p+1)/2) * S(n-1-p, k), for n > k >= 0 and input S(k, k) = 1. - Wolfdieter Lang, Aug 11 2017
The m-th row consecutive nonzero entries in order are (-1)^c*(c+b)!/c!b! with c = m/2, m/2-1, ..., 0 and b = m-2c if m is even and with c = (m-1)/2, (m-1)/2-1, ..., 0 with b = m-2c if m is odd. For the 8th row starting at a(36) the 5 consecutive nonzero entries in order are 1,-10,15,-7,1 given by c = 4,3,2,1,0 and b = 0,2,4,6,8. - Richard Turk, Aug 20 2017
O.g.f.: exp( Sum_{n >= 0} 2*T(n,x/2)*t^n/n ) = 1 + x*t + (-1 + x^2)*t^2 + (-2*x + x^3)*t^3 + (1 - 3*x^2 + x^4)*t^4 + ..., where T(n,x) denotes the n-th Chebyshev polynomial of the first kind. - Peter Bala, Aug 15 2022

A194959 Fractalization of (1 + floor(n/2)).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Sep 06 2011

Keywords

Comments

Suppose that p(1), p(2), p(3), ... is an integer sequence satisfying 1 <= p(n) <= n for n >= 1. Define g(1)=(1) and for n > 1, form g(n) from g(n-1) by inserting n so that its position in the resulting n-tuple is p(n). The sequence f obtained by concatenating g(1), g(2), g(3), ... is clearly a fractal sequence, here introduced as the fractalization of p. The interspersion associated with f is here introduced as the interspersion fractally induced by p, denoted by I(p); thus, the k-th term in the n-th row of I(p) is the position of the k-th n in f. Regarded as a sequence, I(p) is a permutation of the positive integers; its inverse permutation is denoted by Q(p).
...
Example: Let p=(1,2,2,3,3,4,4,5,5,6,6,7,7,...)=A008619. Then g(1)=(1), g(2)=(1,2), g(3)=(1,3,2), so that
f=(1,1,2,1,3,2,1,3,4,2,1,3,5,4,2,1,3,5,6,4,2,1,...)=A194959; and I(p)=A057027, Q(p)=A064578.
The interspersion I(P) has the following northwest corner, easily read from f:
1 2 4 7 11 16 22
3 6 10 15 21 28 36
5 8 12 17 23 30 38
9 14 20 27 35 44 54
...
Following is a chart of selected p, f, I(p), and Q(p):
p f I(p) Q(p)
Count odd numbers up to n, then even numbers down from n. - Franklin T. Adams-Watters, Jan 21 2012
This sequence defines the square array A(n,k), n > 0 and k > 0, read by antidiagonals and the triangle T(n,k) = A(n+1-k,k) for 1 <= k <= n read by rows (see Formula and Example). - Werner Schulte, May 27 2018

Examples

			The sequence p=A008619 begins with 1,2,2,3,3,4,4,5,5,..., so that g(1)=(1). To form g(2), write g(1) and append 2 so that in g(2) this 2 has position p(2)=2: g(2)=(1,2). Then form g(3) by inserting 3 at position p(3)=2: g(3)=(1,3,2), and so on. The fractal sequence A194959 is formed as the concatenation g(1)g(2)g(3)g(4)g(5)...=(1,1,2,1,3,2,1,3,4,2,1,3,5,4,2,...).
From _Werner Schulte_, May 27 2018: (Start)
This sequence seen as a square array read by antidiagonals:
  n\k: 1  2  3  4  5   6   7   8   9  10  11  12 ...
  ===================================================
   1   1  2  2  2  2   2   2   2   2   2   2   2 ... (see A040000)
   2   1  3  4  4  4   4   4   4   4   4   4   4 ... (see A113311)
   3   1  3  5  6  6   6   6   6   6   6   6   6 ...
   4   1  3  5  7  8   8   8   8   8   8   8   8 ...
   5   1  3  5  7  9  10  10  10  10  10  10  10 ...
   6   1  3  5  7  9  11  12  12  12  12  12  12 ...
   7   1  3  5  7  9  11  13  14  14  14  14  14 ...
   8   1  3  5  7  9  11  13  15  16  16  16  16 ...
   9   1  3  5  7  9  11  13  15  17  18  18  18 ...
  10   1  3  5  7  9  11  13  15  17  19  20  20 ...
  etc.
This sequence seen as a triangle read by rows:
  n\k:  1  2  3  4  5   6   7   8   9  10  11  12  ...
  ======================================================
   1    1
   2    1  2
   3    1  3  2
   4    1  3  4  2
   5    1  3  5  4  2
   6    1  3  5  6  4   2
   7    1  3  5  7  6   4   2
   8    1  3  5  7  8   6   4   2
   9    1  3  5  7  9   8   6   4   2
  10    1  3  5  7  9  10   8   6   4   2
  11    1  3  5  7  9  11  10   8   6   4   2
  12    1  3  5  7  9  11  12  10   8   6   4   2
  etc.
(End)
		

References

  • Clark Kimberling, "Fractal sequences and interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Cf. A000142, A000217, A005408, A005843, A008619, A057027, A064578, A209229, A210535, A219977; A000012 (col 1), A157532 (col 2), A040000 (row 1), A113311 (row 2); A194029 (introduces the natural fractal sequence and natural interspersion of a sequence - different from those introduced at A194959).
Cf. A003558 (g permutation order), A102417 (index), A330081 (on bits), A057058 (inverse).

Programs

  • Mathematica
    r = 2; p[n_] := 1 + Floor[n/r]
    Table[p[n], {n, 1, 90}]  (* A008619 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20] (* A194959 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]]  (* A057027 *)
    q[n_] := Position[w, n]; Flatten[
    Table[q[n], {n, 1, 80}]]  (* A064578 *)
    Flatten[FoldList[Insert[#1, #2, Floor[#2/2] + 1] &, {}, Range[10]]] (* Birkas Gyorgy, Jun 30 2012 *)
  • PARI
    T(n,k) = min(k<<1-1,(n-k+1)<<1); \\ Kevin Ryde, Oct 09 2020

Formula

From Werner Schulte, May 27 2018 and Jul 10 2018: (Start)
Seen as a triangle: It seems that the triangle T(n,k) for 1 <= k <= n (see Example) is the mirror image of A210535.
Seen as a square array A(n,k) and as a triangle T(n,k):
A(n,k) = 2*k-1 for 1 <= k <= n, and A(n,k) = 2*n for 1 <= n < k.
A(n+1,k+1) = A(n,k+1) + A(n,k) - A(n-1,k) for k > 0 and n > 1.
A(n,k) = A(k,n) - 1 for n > k >= 1.
P(n,x) = Sum_{k>0} A(n,k)*x^(k-1) = (1-x^n)*(1-x^2)/(1-x)^3 for n >= 1.
Q(y,k) = Sum_{n>0} A(n,k)*y^(n-1) = 1/(1-y) for k = 1 and Q(y,k) = Q(y,1) + P(k-1,y) for k > 1.
G.f.: Sum_{n>0, k>0} A(n,k)*x^(k-1)*y^(n-1) = (1+x)/((1-x)*(1-y)*(1-x*y)).
Sum_{k=1..n} A(n+1-k,k) = Sum_{k=1..n} T(n,k) = A000217(n) for n > 0.
Sum_{k=1..n} (-1)^(k-1) * A(n+1-k,k) = Sum_{k=1..n} (-1)^(k-1) * T(n,k) = A219977(n-1) for n > 0.
Product_{k=1..n} A(n+1-k,k) = Product_{k=1..n} T(n,k) = A000142(n) for n > 0.
A(n+m,n) = A005408(n-1) for n > 0 and some fixed m >= 0.
A(n,n+m) = A005843(n) for n > 0 and some fixed m > 0.
Let A_m be the upper left part of the square array A(n,k) with m rows and m columns. Then det(A_m) = 1 for some fixed m > 0.
The P(n,x) satisfy the recurrence equation P(n+1,x) = P(n,x) + x^n*P(1,x) for n > 0 and initial value P(1,x) = (1+x)/(1-x).
Let B(n,k) be multiplicative with B(n,p^e) = A(n,e+1) for e >= 0 and some fixed n > 0. That yields the Dirichlet g.f.: Sum_{k>0} B(n,k)/k^s = (zeta(s))^3/(zeta(2*s)*zeta(n*s)).
Sum_{k=1..n} A(k,n+1-k)*A209229(k) = 2*n-1. (conjectured)
(End)
From Kevin Ryde, Oct 09 2020: (Start)
T(n,k) = 2*k-1 if 2*k-1 <= n, or 2*(n+1-k) if 2*k-1 > n. [Lévy, chapter 1 section 1 equations (a),(b)]
Fixed points T(n,k)=k for k=1 and k = (2/3)*(n+1) when an integer. [Lévy, chapter 1 section 2 equation (3)]
(End)

Extensions

Name corrected by Franklin T. Adams-Watters, Jan 21 2012

A008611 a(n) = a(n-3) + 1, with a(0)=a(2)=1, a(1)=0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 15 1996

Keywords

Comments

Molien series of 2-dimensional representation of cyclic group of order 3 over GF(2).
One step back, two steps forward.
The crossing number of the graph C(n, {1,3}), n >= 8, is [n/3] + n mod 3, which gives this sequence starting at the first 4. [Yang Yuansheng et al.]
A Chebyshev transform of A078008. The g.f. is the image of (1-x)/(1-x-2*x^2) (g.f. of A078008) under the Chebyshev transform A(x)-> (1/(1+x^2))*A(x/(1+x^2)). - Paul Barry, Oct 15 2004
A047878 is an essentially identical sequence. - Anton Chupin, Oct 24 2009
Rhyme scheme of Dante Alighieri's "Divine Comedy." - David Gaita, Feb 11 2011
A194960 results from deleting the first four terms of A008611. Note that deleting the first term or first four terms of A008611 leaves a concatenation of segments (n, n+1, n+2); for related concatenations, see
A008619, (n,n+1) after deletion of first term;
A053737, (n,n+1,n+2,n+3) beginning with n=0;
A053824, (n to n+4) beginning with n=0. - Clark Kimberling, Sep 07 2011
It appears that a(n) is the number of roots of x^(n+1) + x + 1 inside the unit circle. - Michel Lagneau, Nov 02 2012
Also apparently for n >= 2: a(n) is the largest remainder r that results from dividing n+2 by 1..n+2 more than once, i.e., a(n) = max(i, A072528(n+2,i)>1). - Ralf Stephan, Oct 21 2013
Number of n-element subsets of [n+1] whose sum is a multiple of 3. a(4) = 1: {1,2,4,5}. - Alois P. Heinz, Feb 06 2017
It appears that a(n) is the number of roots of the Fibonacci polynomial F(n+2,x) strictly inside the unit circle of the complex plane. - Michel Lagneau, Apr 07 2017
For the proof of the preceding conjecture see my comments under A008615 and A049310. Chebyshev S(n,x) = i^n*F(n+1,-i*x), with i = sqrt(-1). - Wolfdieter Lang, May 06 2017
The sequence is the interleaving of three sequences: the positive integers (A000027), the nonnegative integers (A001477), and the positive integers, in that order. - Guenther Schrack, Nov 07 2020
a(n) is the number of multiples of 3 between n and 2n. - Christian Barrientos, Dec 20 2021
a(n) is the least number of football games a team has to play to be able to get n-1 points, where a win is 3 points, a draw is 1 point, and a loss is 0 points. - Sigurd Kittilsen, Dec 01 2022

Examples

			G.f. = 1 + x^2 + 2*x^3 + x^4 + 2*x^5 + 3*x^6 + 2*x^7 + 3*x^8 + 4*x^9 + ...
		

References

  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 103.

Crossrefs

Programs

  • Haskell
    a008611 n = n' + mod r 2 where (n', r) = divMod (n + 1) 3
    a008611_list = f [1,0,1] where f xs = xs ++ f (map (+ 1) xs)
    -- Reinhard Zumkeller, Nov 25 2013
    
  • Magma
    [(n-1)-2*Floor((n-1)/3): n in [0..90]]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    with(numtheory): for n from 1 to 70 do:it:=0:
    y:=[fsolve(x^n+x+1, x, complex)] : for m from 1 to nops(y) do : if abs(y[m])< 1 then it:=it+1:else fi:od: printf(`%d, `,it):od:
    A008611:=n->(n-1)-2*floor((n-1)/3); seq(A008611(n), n=0..50); # Wesley Ivan Hurt, May 18 2014
  • Mathematica
    With[{nn=30},Riffle[Riffle[Range[nn],Range[0,nn-1]],Range[nn],3]] (* or *) RecurrenceTable[{a[0]==a[2]==1,a[1]==0,a[n]==a[n-3]+1},a,{n,90}] (* Harvey P. Dale, Nov 06 2011 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 0, 1, 2}, 100] (* Vladimir Joseph Stephan Orlovsky, Feb 23 2012 *)
    a[ n_] := Quotient[n - 1, 3] + Mod[n + 2, 3]; (* Michael Somos, Jan 23 2014 *)
  • PARI
    {a(n) = (n-1) \ 3 + (n+2) % 3}; /* Michael Somos, Jan 23 2014 */

Formula

a(n) = a(n-3) + 1.
a(n) = (n-1) - 2*floor((n-1)/3).
G.f.: (1 + x^2 + x^4)/(1 - x^3)^2.
After the initial term, has form {n, n+1, n+2} for n=0, 1, 2, ...
From Paul Barry, Mar 18 2004: (Start)
a(n) = Sum_{k=0..n} (-1)^floor(2*(k-2)/3);
a(n) = 4*sqrt(3)*cos(2*Pi*n/3 + Pi/6)/9 + (n+1)/3. (End)
From Paul Barry, Oct 15 2004: (Start)
G.f.: (1 - x + x^2)/((1 + x + x^2)*(x-1)^2);
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*A078008(n-2k)*(-1)^k. (End)
a(n) = -a(-2-n) for all n in Z.
Euler transform of length 6 sequence [0, 1, 2, 0, 0, -1]. - Michael Somos, Jan 23 2014
a(n) = ((n-1) mod 3) + floor((n-1)/3). - Wesley Ivan Hurt, May 18 2014
PSUM transform of A257075. - Michael Somos, Apr 15 2015
a(n) = A194960(n-3), n >= 0, with extended A194960. See the a(n) formula two lines above. - Wolfdieter Lang, May 06 2017
From Guenther Schrack, Nov 07 2020: (Start)
a(n) = (3*n + 3 + 2*(w^(2*n)*(1 - w) + w^n*(2 + w)))/9, where w = (-1 + sqrt(-3))/2, a primitive third root of unity;
a(n) = (n + 1 + 2*A049347(n))/3;
a(n) = (2*n - A330396(n-1))/3. (End)
E.g.f.: (3*exp(x)*(1 + x) + exp(-x/2)*(6*cos(sqrt(3)*x/2) - 2*sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, May 06 2022
Sum_{n>=2} (-1)^n/a(n) = 3*log(2) - 1. - Amiram Eldar, Sep 10 2023

A194963 Inverse permutation of A194962; every positive integer occurs exactly once.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 8, 9, 11, 14, 15, 12, 13, 16, 19, 20, 21, 17, 18, 22, 25, 28, 26, 27, 23, 24, 29, 32, 35, 36, 33, 34, 30, 31, 37, 40, 43, 44, 45, 41, 42, 38, 39, 46, 49, 52, 55, 53, 54, 50, 51, 47, 48, 56, 59, 62, 65, 66, 63, 64, 60, 61, 57, 58, 67, 70, 73
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2011

Keywords

Crossrefs

Programs

A047878 a(n) is the least number of knight's moves from corner (0,0) to n-th diagonal of unbounded chessboard.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Apart from initial terms, same as A008611. - Anton Chupin, Oct 24 2009

Crossrefs

Programs

  • Magma
    I:=[2, 1, 2, 3]; [0,3] cat [n le 4 select I[n] else Self(n-1) +Self(n-3) -Self(n-4): n in [1..81]]; // G. C. Greubel, Oct 22 2022
    
  • Mathematica
    LinearRecurrence[{1,0,1,-1},{0,3,2,1,2,3},80] (* Harvey P. Dale, Sep 01 2018 *)
    Join[{0,3}, Table[(n+2 -2*ChebyshevU[2*n, 1/2])/3, {n,2,75}]] (* G. C. Greubel, Oct 22 2022 *)
  • PARI
    concat(0, Vec(x*(2*x^4-2*x^3-x^2-x+3)/((x-1)^2*(x^2+x+1)) + O(x^100))) \\ Colin Barker, May 04 2014
    
  • SageMath
    (Sage) [0,3]+[(n+2 - 2*chebyshev_U(2*n, 1/2))/3 for n in (2..75)] # G. C. Greubel, Oct 22 2022

Formula

a(n) = Min_{i=0..n} A049604(i,n-i).
a(3n) = n, a(3n+1) = n+1, a(3n+2) = n+2 for n >= 1.
From Colin Barker, May 04 2014: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>5.
G.f.: x*(3-x-x^2-2*x^3+2*x^4) / ((1-x)^2*(1+x+x^2)). (End)
From Guenther Schrack, Nov 19 2020: (Start)
a(n) = a(n-3) + 1, for n > 4 with a(0) = 0, a(1) = 3, a(2) = 2, a(3) = 1, a(4) = 2;
a(n) = (3*n + 6 - 2*(w^(2*n)*(2 + w) + w^n*(1 - w)))/9, for n > 1 with a(0) = 0, a(1) = 3, where w = (-1 + sqrt(-3))/2, a primitive third root of unity;
a(n) = (n + 2 - 2*A057078(n))/3 for n > 1;
a(n) = A194960(n-2) for n > 2;
a(n) = (2*n + 2 - A330396(n))/3 for n > 1. (End)
Showing 1-7 of 7 results.