cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 43 results. Next

A001477 The nonnegative integers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Although this is a list, and lists normally have offset 1, it seems better to make an exception in this case. - N. J. A. Sloane, Mar 13 2010
The subsequence 0,1,2,3,4 gives the known values of n such that 2^(2^n)+1 is a prime (see A019434, the Fermat primes). - N. J. A. Sloane, Jun 16 2010
Also: The identity map, defined on the set of nonnegative integers. The restriction to the positive integers yields the sequence A000027. - M. F. Hasler, Nov 20 2013
The number of partitions of 2n into exactly 2 parts. - Colin Barker, Mar 22 2015
The number of orbits of Aut(Z^7) as function of the infinity norm n of the representative lattice point of the orbit, when the cardinality of the orbit is equal to 8960 or 168.- Philippe A.J.G. Chevalier, Dec 29 2015
Partial sums give A000217. - Omar E. Pol, Jul 26 2018
First differences are A000012 (the "all 1's" sequence). - M. F. Hasler, May 30 2020
See A061579 for the transposed infinite square matrix, or triangle with rows reversed. - M. F. Hasler, Nov 09 2021
This is the unique sequence (a(n)) that satisfies the inequality a(n+1) > a(a(n)) for all n in N. This simple and surprising result comes from the 6th problem proposed by Bulgaria during the second day of the 19th IMO (1977) in Belgrade (see link and reference). - Bernard Schott, Jan 25 2023

Examples

			Triangular view:
   0
   1   2
   3   4   5
   6   7   8   9
  10  11  12  13  14
  15  16  17  18  19  20
  21  22  23  24  25  26  27
  28  29  30  31  32  33  34  35
  36  37  38  39  40  41  42  43  44
  45  46  47  48  49  50  51  52  53  54
		

References

  • Maurice Protat, Des Olympiades à l'Agrégation, suite vérifiant f(n+1) > f(f(n)), Problème 7, pp. 31-32, Ellipses, Paris 1997.

Crossrefs

Cf. A000027 (n>=1).
Cf. A000012 (first differences).
Partial sums of A057427. - Jeremy Gardiner, Sep 08 2002
Cf. A038608 (alternating signs), A001787 (binomial transform).
Cf. A055112.
Cf. Boustrophedon transforms: A231179, A000737.
Cf. A245422.
Number of orbits of Aut(Z^7) as function of the infinity norm A000579, A154286, A102860, A002412, A045943, A115067, A008586, A008585, A005843, A000217.
When written as an array, the rows/columns are A000217, A000124, A152948, A152950, A145018, A167499, A166136, A167487... and A000096, A034856, A055998, A046691, A052905, A055999... (with appropriate offsets); cf. analogous lists for A000027 in A185787.
Cf. A000290.
Cf. A061579 (transposed matrix / reversed triangle).

Programs

Formula

a(n) = n.
a(0) = 0, a(n) = a(n-1) + 1.
G.f.: x/(1-x)^2.
Multiplicative with a(p^e) = p^e. - David W. Wilson, Aug 01 2001
When seen as array: T(k, n) = n + (k+n)*(k+n+1)/2. Main diagonal is 2*n*(n+1) (A046092), antidiagonal sums are n*(n+1)*(n+2)/2 (A027480). - Ralf Stephan, Oct 17 2004
Dirichlet generating function: zeta(s-1). - Franklin T. Adams-Watters, Sep 11 2005
E.g.f.: x*e^x. - Franklin T. Adams-Watters, Sep 11 2005
a(0)=0, a(1)=1, a(n) = 2*a(n-1) - a(n-2). - Jaume Oliver Lafont, May 07 2008
Alternating partial sums give A001057 = A000217 - 2*(A008794). - Eric Desbiaux, Oct 28 2008
a(n) = 2*A080425(n) + 3*A008611(n-3), n>1. - Eric Desbiaux, Nov 15 2009
a(n) = A007966(n)*A007967(n). - Reinhard Zumkeller, Jun 18 2011
a(n) = Sum_{k>=0} A030308(n,k)*2^k. - Philippe Deléham, Oct 20 2011
a(n) = 2*A028242(n-1) + (-1)^n*A000034(n-1). - R. J. Mathar, Jul 20 2012
a(n+1) = det(C(i+1,j), 1 <= i, j <= n), where C(n,k) are binomial coefficients. - Mircea Merca, Apr 06 2013
a(n-1) = floor(n/e^(1/n)) for n > 0. - Richard R. Forberg, Jun 22 2013
a(n) = A000027(n) for all n>0.
a(n) = floor(cot(1/(n+1))). - Clark Kimberling, Oct 08 2014
a(0)=0, a(n>0) = 2*z(-1)^[( |z|/z + 3 )/2] + ( |z|/z - 1 )/2 for z = A130472(n>0); a 1 to 1 correspondence between integers and naturals. - Adriano Caroli, Mar 29 2015
G.f. as triangle: x*(1 + (x^2 - 5*x + 2)*y + x*(2*x - 1)*y^2)/((1 - x)^3*(1 - x*y)^3). - Stefano Spezia, Jul 22 2025

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

A008615 a(n) = floor(n/2) - floor(n/3).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

If the two leading 0's are dropped, this becomes the essentially identical sequence A103221, with g.f. 1/((1-x^2)*(1-x^3)), which arises in many contexts. For example, 1/((1-x^4)*(1-x^6)) is the Poincaré series [or Poincare series] for modular forms of weight w for the full modular group. As generators one may take the Eisenstein series E_4 (A004009) and E_6 (A013973).
Dimension of the space of weight 2n+8 cusp forms for Gamma_0( 1 ).
Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 5 ).
a(n) is the number of ways n can be written as the sum of a positive even number and a nonnegative multiple of 3 and so the number of ways (n-2) can be written as the sum of a nonnegative even number and a nonnegative multiple of 3 and also the number of ways (n+3) can be written as the sum of a positive even number and a positive multiple of 3.
It appears that this is also the number of partitions of 2n+6 that are 4-term arithmetic progressions. - John W. Layman, May 01 2009 [verified by Wesley Ivan Hurt, Jan 17 2021]
a(n) is the number of (n+3)-digit fixed points under the base-3 Kaprekar map A164993 (see A164997 for the list of fixed points). - Joseph Myers, Sep 04 2009
Starting from n=10 also the number of balls in new consecutive hexagonal edges, if an (infinite) chain of balls is winded spirally around the first ball at the center, such that each six steps make an entire winding. - K. G. Stier, Dec 21 2012
In any three consecutive terms at least two of them are equal to each other. - Michael Somos, Mar 01 2014
Number of partitions of (n-2) into parts 2 and 3. - David Neil McGrath, Sep 05 2014
a(n), n >= 0, is also the dimension of S_{2*(n+4)}, the complex vector space of modular cusp forms of weight 2*(n+4) and level 1 (full modular group). The dimension of S_0, S_2, S_4 and S_6 is 0. See, e.g., Ash and Gross, p. 178. Table 13.1. - Wolfdieter Lang, Sep 16 2016
From Wolfdieter Lang, May 08 2017: (Start)
a(n-2) = floor((n-2)/2) - floor((n-2)/3) = floor(n/2) - floor((n+1)/3) is for n >=0 the number of integers k in the interval (n+1)/3 < k <= floor(n/2). This problem appears in the computation of the number of zeros of Chebyshev S(n, x) polynomials (coefficients in A049310) in the open interval (-1, +1). See a comment there. This computation was motivated by a conjecture given in A008611 by Michel Lagneau, Mar 31 2017.
a(n) is also the number of integers k in the closed interval (n+1)/3 <= k <= floor(n/2), which is floor(n/2) - (ceiling((n+1)/3) - 1) for n >= 0 (proof trivial for n+1 == 0 (mod 3) and otherwise). From the preceding statement this a(n) is also a(n-2) + [n == 2 (mod 3)] for n >= 0 (with [statement] = 1 if the statement is true and zero otherwise). This proves the recurrence given by Michael Somos in the formula section. (End)
Assuming the Collatz conjecture to be true, for n > 1, a(n+7) is the row length of the n-th row of A340985. That is, the number of weakly connected components of the Collatz digraph of order n. - Sebastian Karlsson, Feb 23 2021

Examples

			G.f. = x^2 + x^4 + x^5 + x^6 + x^7 + 2*x^8 + x^9 + 2*x^10 + 2*x^11 + 2*x^12 + ...
		

References

  • Avner Ash and Robert Gross, Summing it up, Princeton University Press, 2016, p. 178.
  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 100.
  • E. Freitag, Siegelsche Modulfunktionen, Springer-Verlag, Berlin, 1983; p. 141, Th. 1.1.
  • R. C. Gunning, Lectures on Modular Forms. Princeton Univ. Press, Princeton, NJ, 1962.
  • J.-M. Kantor, Où en sont les mathématiques, La formule de Molien-Weyl, SMF, Vuibert, p. 79

Crossrefs

Essentially the same as A103221.
First differences of A069905 (and A001399).

Programs

  • Haskell
    a008615 n = n `div` 2 - n `div` 3  -- Reinhard Zumkeller, Apr 28 2014
    
  • Magma
    [Floor(n/2)-Floor(n/3): n in [0..10]]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Magma
    a := func< n | n lt 2 select 0 else n eq 2 select 1 else Dimension( ModularForms( PSL2( Integers()), 2*n-4))>; /* Michael Somos, Dec 11 2018 */
    
  • Maple
    a := n-> floor(n/2) - floor(n/3): seq(a(n), n = 0 .. 87);
  • Mathematica
    a[n_]:=Floor[n/2]-Floor[n/3]; Array[a,90,0] (* Vladimir Joseph Stephan Orlovsky, Dec 05 2008; corrected by Harvey P. Dale, Nov 30 2011 *)
    LinearRecurrence[{0, 1, 1, 0, -1}, {0, 0, 1, 0, 1}, 100]; (* Vincenzo Librandi, Sep 09 2015 *)
  • PARI
    {a(n) = (n\2) - (n\3)}; /* Michael Somos, Feb 06 2003 */
    
  • Python
    def A008615(n): return n//2 - n//3 # Chai Wah Wu, Jun 07 2022

Formula

a(n) = a(n-6) + 1 = a(n-2) + a(n-3) - a(n-5). - Henry Bottomley, Sep 02 2000
G.f.: x^2 / ((1-x^2) * (1-x^3)).
From Reinhard Zumkeller, Feb 27 2008: (Start)
a(A016933(n)) = a(A016957(n)) = a(A016969(n)) = n+1.
a(A008588(n)) = a(A016921(n)) = a(A016945(n)) = n. (End)
a(6*k) = k, k >= 0. - Zak Seidov, Sep 09 2012
a(n) = A005044(n+1) - A005044(n-3). - Johannes W. Meijer, Oct 18 2013
a(n) = floor((n+4)/6) - floor((n+3)/6) + floor((n+2)/6). - Mircea Merca, Nov 27 2013
Euler transform of length 3 sequence [0, 1, 1]. - Michael Somos, Mar 01 2014
a(n+2) = a(n) + 1 if n == 0 (mod 3), a(n+2) = a(n) otherwise. - Michael Somos, Mar 01 2014. See the May 08 2017 comment above. - Wolfdieter Lang, May 08 2017
a(n) = -a(-1 - n) for all n in Z. - Michael Somos, Mar 01 2014.
a(n) = A004526(n) - A002264(n). - Reinhard Zumkeller, Apr 28 2014
a(n) = Sum_{i=0..n-2} (floor(i/6)-floor((i-3)/6))*(-1)^i. - Wesley Ivan Hurt, Sep 08 2015
a(n) = a(n+6) - 1 = A103221(n+4) - 1, n >= 0. - Wolfdieter Lang, Sep 16 2016
12*a(n) = 2*n +1 +3*(-1)^n -4*A057078(n). - R. J. Mathar, Jun 19 2019
a(n) = Sum_{k=1..floor((n+3)/2)} Sum_{j=k..floor((2*n+6-k)/3)} Sum_{i=j..floor((2*n+6-j-k)/2)} ([j-k = i-j = 2*n+6-2*i-j-k] - [k = j = i = 2*n+6-i-j-k]), where [ ] is the (generalized) Iverson bracket. - Wesley Ivan Hurt, Jan 17 2021
E.g.f.: (3*(2 + x)*cosh(x) - 2*exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) + 3*(x-1)*sinh(x))/18. - Stefano Spezia, Oct 17 2022

A145394 Number of inequivalent sublattices of index n in hexagonal lattice, where two sublattices are considered equivalent if one can be rotated by a multiple of Pi/3 to give the other.

Original entry on oeis.org

1, 1, 2, 3, 2, 4, 4, 5, 5, 6, 4, 10, 6, 8, 8, 11, 6, 13, 8, 14, 12, 12, 8, 20, 11, 14, 14, 20, 10, 24, 12, 21, 16, 18, 16, 31, 14, 20, 20, 30, 14, 32, 16, 28, 26, 24, 16, 42, 21, 31, 24, 34, 18, 40, 24, 40, 28, 30, 20, 56, 22, 32, 36, 43, 28, 48, 24, 42, 32, 48, 24, 65, 26, 38, 42, 48, 32, 56, 28, 62
Offset: 1

Views

Author

N. J. A. Sloane, Feb 23 2009

Keywords

Comments

Also, apparently a(n) is the number of nonequivalent (up to lattice-preserving affine transformation) triangles on 2D square lattice of area n/2 [Karpenkov]. - Andrey Zabolotskiy, Jul 06 2017
From Andrey Zabolotskiy, Jan 18 2018: (Start)
The parent lattice of the sublattices under consideration has Patterson symmetry group p6, and two sublattices are considered equivalent if they are related via a symmetry from that group [Rutherford]. For other 2D Patterson groups, the analogous sequences are A000203 (p2), A069734 (p2mm), A145391 (c2mm), A145392 (p4), A145393 (p4mm), A003051 (p6mm).
If we count sublattices related by parent-lattice-preserving reflection as equivalent, we get A003051 instead of this sequence. If we count sublattices related by rotation of the sublattice only (but not parent lattice; equivalently, sublattices related by rotation by angle which is not a multiple of Pi/3; see illustration in links) as equivalent, we get A054384. If we count sublattices related by any rotation or reflection as equivalent, we get A300651.
Rutherford says at p. 161 that a(n) != A054384(n) only when A002324(n) > 1, but actually these two sequences differ at other terms, too, for example, at n = 14 (see illustration). (End)

Crossrefs

Programs

  • Mathematica
    a[n_] := (DivisorSigma[1, n] + 2 DivisorSum[n, Switch[Mod[#, 3], 1, 1, 2, -1, 0, 0] &])/3; Array[a, 80] (* Jean-François Alcover, Dec 03 2015 *)
  • PARI
    A002324(n) = if( n<1, 0, sumdiv(n, d, (d%3==1) - (d%3==2)));
    A000203(n) = if( n<1, 0, sigma(n));
    a(n) = (A000203(n) + 2 * A002324(n)) / 3;
    \\ Joerg Arndt, Oct 13 2013

Formula

a(n) = (A000203(n) + 2 * A002324(n))/3. [Rutherford] - N. J. A. Sloane, Mar 13 2009
a(n) = Sum_{ m: m^2|n } A000086(n/m^2) + A157227(n/m^2) = A002324(n) + Sum_{ m: m^2|n } A157227(n/m^2). [Rutherford] - Andrey Zabolotskiy, Apr 23 2018
a(n) = Sum_{ d|n } A008611(d-1). - Andrey Zabolotskiy, Aug 29 2019

Extensions

New name from Andrey Zabolotskiy, Dec 14 2017

A058207 Three steps forward, two steps back.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Nov 29 2000

Keywords

Crossrefs

Cf. A008611.

Programs

Formula

a(n) = a(n-5) + 1.
a(n) = a(n-1) + 1 if n=1, 2 or 3 mod 5.
a(n) = a(n-1) - 1 if n=0 or 4 mod 5.
G.f.: (x*(1+x+x^2-x^3-x^4))/((x-1)^2*(1+x+x^2+x^3+x^4)). [Corrected by Georg Fischer, May 18 2019]
a(n) = n/5 + 4/5*((n mod 5) mod 4) + (6/5)*floor((n mod 5)/4). - Rolf Pleisch, Jul 26 2009
a(n) = Sum_{i=1..n} (-1)^floor((2*i-2)/5). - Wesley Ivan Hurt, Oct 28 2015

Extensions

Second formula corrected by Charles R Greathouse IV, Jul 28 2011

A285869 a(n) is the number of zeros of the Chebyshev S(n, x) polynomial in the open interval (-sqrt(2), +sqrt(2)).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, May 10 2017

Keywords

Comments

See a May 06 2017 comment on A049310 where these problems are considered which originated in a conjecture by Michel Lagneau (see A008611) on Fibonacci polynomials.

Crossrefs

Programs

  • Mathematica
    Table[2 (Floor[n/2] - Floor[(n + 1)/4]) + Boole[OddQ@ n], {n, 0, 52}] (* Michael De Vlieger, May 10 2017 *)
  • PARI
    concat(0, Vec(x*(1 + x - x^2 + x^3) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^100))) \\ Colin Barker, May 18 2017

Formula

a(n) = 2*b(n) if n is even, else a(n) = 1 + 2*b(n), with b(n) = floor(n/2) - floor((n + 1)/4) = A059169(n+1).
G.f. for {b(n)}: Sum_{n>=0} b(n)*x^n = x^2*(1 - x + x^2)/((1 - x)*(1 - x^4)) (see A059169).
From Colin Barker, May 18 2017: (Start)
G.f.: x*(1 + x - x^2 + x^3) / ((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>4.
(End)
a(n) = A162330(n-1) for n >= 2. - Michel Marcus, Nov 01 2017
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*log(2) (A016627). - Amiram Eldar, Sep 17 2023
a(n) = A183041(n-1) for n>=2. - R. J. Mathar, May 13 2025

A194960 a(n) = floor((n+2)/3) + ((n-1) mod 3).

Original entry on oeis.org

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
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2011

Keywords

Comments

The sequence is formed by concatenating triples of the form (n, n+1, n+2) for n>=1. See A194961 and A194962 for the associated fractalization and interspersion. The sequence can be obtained from A008611 by deleting its first four terms.
The sequence contains every positive integer n exactly min(n,3) times. - Wesley Ivan Hurt, Dec 17 2013

Crossrefs

Programs

  • Magma
    I:=[1,2,3,2]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..100]]; // Vincenzo Librandi, Dec 17 2013
    
  • Maple
    A194960:=n->floor((n+2)/3)+((n-1) mod 3); seq(A194960(n), n=1..100); # Wesley Ivan Hurt, Dec 17 2013
  • Mathematica
    (* First program *)
    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 *)
    (* Other programs *)
    CoefficientList[Series[(1 +x +x^2 -2 x^3)/((1+x+x^2) (1-x)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Dec 17 2013 *)
    Table[(n+4 -2*ChebyshevU[2*n+4, 1/2])/3, {n,80}] (* G. C. Greubel, Oct 23 2022 *)
  • PARI
    a(n)=(n+2)\3 + (n-1)%3 \\ Charles R Greathouse IV, Sep 02 2015
    
  • SageMath
    [(n+4 - 2*chebyshev_U(2*n+4, 1/2))/3 for n in (1..80)] # G. C. Greubel, Oct 23 2022

Formula

From R. J. Mathar, Sep 07 2011: (Start)
a(n) = ((-1)^n*A130772(n) + n + 4)/3.
G.f.: x*(1 + x + x^2 - 2*x^3)/((1+x+x^2)*(1-x)^2). (End)
a(n) = A006446(n)/floor(sqrt(A006446(n))). - Benoit Cloitre, Jan 15 2012
a(n) = a(n-1) + a(n-3) - a(n-4). - Vincenzo Librandi, Dec 17 2013
a(n) = a(n-3) + 1, n >= 1, with input a(-2) = 0, a(-1) = 1 and a(0) = 2. Proof trivial. a(n) = A008611(n+3), n >= -2. See the first comment above. - Wolfdieter Lang, May 06 2017
From Guenther Schrack, Nov 09 2020: (Start)
a(n) = n - 2*floor((n-1)/3).
a(n) = (n + 2 + 2*((n-1) mod 3))/3.
a(n) = (3*n + 12 + 2*(w^(2*n)*(1 - w) + w^n*(2 + w)))/9, where w = (-1 + sqrt(-3))/2.
a(n) = (n + 4 + 2*A049347(n))/3.
a(n) = (2*n + 3 - A330396(n-1))/3. (End)
a(n) = (n + 4 - 2*A010892(2*n+4))/3. - G. C. Greubel, Oct 23 2022

A060547 a(n) = 2^(floor(n/3) + ((n mod 3) mod 2)).

Original entry on oeis.org

2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16, 32, 16, 32, 64, 32, 64, 128, 64, 128, 256, 128, 256, 512, 256, 512, 1024, 512, 1024, 2048, 1024, 2048, 4096, 2048, 4096, 8192, 4096, 8192, 16384, 8192, 16384, 32768, 16384, 32768, 65536, 32768, 65536, 131072
Offset: 1

Views

Author

André Barbé (Andre.Barbe(AT)esat.kuleuven.ac.be), Apr 03 2001

Keywords

Comments

a(n) is the number of patterns, invariant under 120-degree rotations, that may appear in a top-down equilateral triangular arrangement of closely packed black and white cells satisfying the local matching rule of Pascal's triangle modulo 2, where n is the number of cells in each edge of the arrangement.
The matching rule is such that any elementary top-down triangle of three neighboring cells in the arrangement contains either one or three white cells.

Crossrefs

Programs

  • Haskell
    a060547 = (2 ^) . a008611 . (subtract 1)
    a060547_list = f [2,1,2] where f xs = xs ++ f (map (* 2) xs)
    -- Reinhard Zumkeller, Nov 25 2013
    
  • Maple
    gf := (1+x^2+x^4)/(1-x^3)^2: s := series(gf, x, 100):
    for i from 0 to 70 do printf(`%d,`,2^coeff(s,x,i)) od:
    # Alternative:
    a := n -> 2^(iquo(n, 3) + irem(irem(n, 3), 2));
    seq(a(n), n = 1..49); # Peter Luschny, Nov 26 2022
  • Mathematica
    CoefficientList[ Series[ (2x^2+x+2) / (1-2x^3), {x, 0, 48}], x] (* Jean-François Alcover, Nov 18 2011 *)
  • PARI
    a(n) = { 2^(floor(n/3) + (n % 3) % 2) } \\ Harry J. Smith, Jul 07 2009
    
  • Python
    def a_gen():
        a, b, c = 1, 2, 4
        yield b
        while True:
            yield a
            a, b, c = b, c, a + a
    a = a_gen()
    print([next(a) for  in range(51)]) # _Peter Luschny, Nov 26 2022

Formula

a(n) = 2^A008611(n-1) for n >= 1.
Sum_{n>=1} 1/a(n) = 4. - Amiram Eldar, Dec 10 2022

Extensions

More terms from James Sellers, Apr 04 2001
Name replaced with given formula by Peter Luschny, Nov 26 2022

A106249 Expansion of (1-x+x^2+x^3)/(1-x-x^4+x^5).

Original entry on oeis.org

1, 0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8, 9, 8, 9, 10, 11, 10, 11, 12, 13, 12, 13, 14, 15, 14, 15, 16, 17, 16, 17, 18, 19, 18, 19, 20, 21, 20, 21, 22, 23, 22, 23, 24, 25, 24, 25, 26, 27, 26, 27, 28, 29, 28, 29, 30, 31, 30, 31, 32, 33, 32, 33, 34, 35, 34, 35, 36, 37, 36, 37, 38
Offset: 0

Views

Author

Paul Barry, Apr 27 2005

Keywords

Comments

Conjecture: number of roots of x^n + 1 in the left half-plane for n > 0. - Michel Lagneau, Oct 31 2012
Maximum bias of polyominoes with n+1 squares. Define the bias of a polyomino to be the difference between the number of black squares and the number of white squares when chessboard coloring is applied to the polyomino. Maximum bias for the value n is defined to be the maximum value of bias among all polyominoes of n squares. - John Mason, Dec 24 2013

Crossrefs

Cf. A008611.

Programs

  • GAP
    List([0..80],n->((n-1) mod 4)/2+(n+1)/2-1); # Muniru A Asiru, Oct 07 2018
  • Maple
    a:= n-> n-1 - 2*floor((n-1)/4):
    seq(a(n), n=0..75);  # Alois P. Heinz, Jan 24 2021
  • Mathematica
    CoefficientList[Series[(1 - x + x^2 + x^3)/(1 - x - x^4 + x^5), {x, 0, 100}], x] (* Vincenzo Librandi, Dec 31 2013 *)
    LinearRecurrence[{1,0,0,1,-1},{1,0,1,2,3},80] (* Harvey P. Dale, May 07 2018 *)
  • PARI
    a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; -1,1,0,0,1]^n*[1;0;1;2;3])[1,1] \\ Charles R Greathouse IV, Sep 02 2015
    

Formula

G.f.: (1-x+x^2+x^3)/(1-x-x^4+x^5)=(1+x^2+2x^3+x^4+2x^5+x^6)/(1-x^4)^2.
a(n) = sum{k=0..n, -mu(k mod 4)}.
a(n) = cos(Pi*n/2)/2-sin(Pi*n/2)/2+(-1)^n/4+(2n+1)/4.
a(n) = sum{k=0..n, Jacobi(2^k, 2k+1)} [Conjecture]. - Paul Barry, Jul 23 2005
a(n) = sum{k=0..n, Product{j=1..k, ((-1)^j)^(k-j+1)}}. - Paul Barry, Nov 09 2007
a(n) = A083219(n-1). - R. J. Mathar, Aug 28 2008
a(n) = numbers of times cos(-Pi/n+2k*Pi/n) < 0 for k = 0..n-1. - Michel Lagneau, Nov 02 2012
a(n) = ((n - 1) mod 4)/2 + (n+1)/2 - 1. - John Mason, Dec 24 2013
a(n) = A018837(n-1) for n > 2. - Georg Fischer, Oct 07 2018

Extensions

John Mason's contributions corrected for offset by Eric M. Schmidt, Dec 30 2013

A260644 Four steps forward, three steps back.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Nov 11 2015

Keywords

Examples

			a(6k):   0,  2,  4,  6,  6,  6,  6,  6,  8, 10, 12, 12, 12, 12, 12, 14, ...
a(6k+1): 1,  1,  3,  5,  7,  7,  7,  7,  7,  9, 11, 13, 13, 13, 13, 13, ...
a(6k+2): 2,  2,  2,  4,  6,  8,  8,  8,  8,  8, 10, 12, 14, 14, 14, 14, ...
a(6k+3): 3,  3,  3,  3,  5,  7,  9,  9,  9,  9,  9, 11, 13, 15, 15, 15, ...
a(6k+4): 4,  4,  4,  4,  4,  6,  8, 10, 10, 10, 10, 10, 12, 14, 16, 16, ...
a(6k+5): 3,  5,  5,  5,  5,  5,  7,  9, 11, 11, 11, 11, 11, 13, 15, 17, ...
		

Crossrefs

Cf. A008611 (one step back, two steps forward).
Cf. A058207 (three steps forward, two steps back).

Programs

  • Maple
    A260644:=n->add((-1)^floor((2*i-2)/7), i=1..n): seq(A260644(n), n=0..100);
  • Mathematica
    Table[Sum[(-1)^Floor[(2 i - 2)/7], {i, n}], {n, 0, 100}]
    LinearRecurrence[{1,0,0,0,0,0,1,-1},{0,1,2,3,4,3,2,1},90] (* Harvey P. Dale, Dec 27 2023 *)
  • PARI
    concat(0, Vec((x+x^2+x^3+x^4-x^5-x^6-x^7)/((x-1)^2*(1+x+x^2+x^3+x^4+x^5+x^6)) + O(x^100))) \\ Altug Alkan, Nov 12 2015

Formula

G.f.: x*(1+x+x^2+x^3-x^4-x^5-x^6) / ((1-x)^2*(1+x+x^2+x^3+x^4+x^5+x^6)).
a(n) = a(n-1) + a(n-7) - a(n-8) for n>7.
a(n) = Sum_{i=1..n} (-1)^floor((2i - 2)/7).
Showing 1-10 of 43 results. Next