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

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

Original entry on oeis.org

0, 1, 2, 7, 20, 61, 182, 547, 1640, 4921, 14762, 44287, 132860, 398581, 1195742, 3587227, 10761680, 32285041, 96855122, 290565367, 871696100, 2615088301, 7845264902, 23535794707, 70607384120, 211822152361, 635466457082
Offset: 0

Views

Author

Keywords

Comments

Number of walks of length n between any two distinct vertices of the complete graph K_4. - Paul Barry and Emeric Deutsch, Apr 01 2004
For n >= 1, a(n) is the number of integers k, 1 <= k <= 3^(n-1), whose ternary representation ends in an even number of zeros (see A007417). - Philippe Deléham, Mar 31 2004
Form the digraph with matrix A=[0,1,1,1;1,0,1,1;1,1,0,1;1,0,1,1]. A015518(n) corresponds to the (1,3) term of A^n. - Paul Barry, Oct 02 2004
The same sequence may be obtained by the following process. Starting a priori with the fraction 1/1, the denominators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 4 times the bottom to get the new top. The limit of the sequence of fractions is 2. - Cino Hilliard, Sep 25 2005
(A046717(n))^2 + (2*a(n))^2 = A046717(2n). E.g., A046717(3) = 13, 2*a(3) = 14, A046717(6) = 365. 13^2 + 14^2 = 365. - Gary W. Adamson, Jun 17 2006
For n >= 2, number of ordered partitions of n-1 into parts of sizes 1 and 2 where there are two types of 1 (singletons) and three types of 2 (twins). For example, the number of possible configurations of families of n-1 male (M) and female (F) offspring considering only single births and twins, where the birth order of M/F/pair-of-twins is considered and there are three types of twins; namely, both F, both M, or one F and one M - where birth order within a pair of twins itself is disregarded. In particular, for a(3)=7, two children could be either: (1) F, then M; (2) M, then F; (3) F,F; (4) M,M; (5) F,F twins; (6) M,M twins; or (7) M,F twins (emphasizing that birth order is irrelevant here when both/all children are the same gender and when two children are within the same pair of twins). - Rick L. Shepherd, Sep 18 2004
a(n) is prime for n = {2, 3, 5, 7, 13, 23, 43, 281, 359, ...}, where only a(2) = 2 corresponds to a prime of the form (3^k - 1)/4. All prime terms, except a(2) = 2, are the primes of the form (3^k + 1)/4. Numbers k such that (3^k + 1)/4 is prime are listed in A007658. Note that all prime terms have prime indices. Prime terms are listed in A111010. - Alexander Adamchuk, Nov 19 2006
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-2, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n)=charpoly(A,1). - Milan Janjic, Jan 26 2010
Select an odd size subset S from {1,2,...,n}, then select an even size subset from S. - Geoffrey Critzer, Mar 02 2010
a(n) is the number of ternary sequences of length n where the numbers of (0's, 1's) are (even, odd) respectively, and, by symmetry, the number of such sequences where those numbers are (odd, even) respectively. A122983 covers (even, even), and A081251 covers (odd, odd). - Toby Gottfried, Apr 18 2010
An elephant sequence, see A175654. For the corner squares just one A[5] vector, with decimal value 341, leads to this sequence (without the leading 0). For the central square this vector leads to the companion sequence A046717 (without the first leading 1). - Johannes W. Meijer, Aug 15 2010
Let R be the commutative algebra resulting from adjoining the elements of the Klein four-group to the integers (equivalently, K = Z[x,y,z]/{x*y - z, y*z - x, x*z - y, x^2 - 1, y^2 - 1, z^2 - 1}). Then a(n) is equal to the coefficients of x, y, and z in the expansion of (x + y + z)^n. - Joseph E. Cooper III (easonrevant(AT)gmail.com), Nov 06 2010
Pisano period lengths: 1, 2, 2, 4, 4, 2, 6, 8, 2, 4, 10, 4, 6, 6, 4, 16, 16, 2, 18, 4, ... - R. J. Mathar, Aug 10 2012
The ratio a(n+1)/a(n) converges to 3 as n approaches infinity. - Felix P. Muga II, Mar 09 2014
This is a divisibility sequence, also the values of Chebyshev polynomials, and also the number of ways of packing a 2 X n-1 rectangle with dominoes and unit squares. - R. K. Guy, Dec 16 2016
For n>0, gcd(a(n),a(n+1))=1. - Kengbo Lu, Jul 02 2020

References

  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, see p. 16.

Crossrefs

a(n) = A080926(n-1) + 1 = (1/3)*A054878(n+1) = (1/3)*abs(A084567(n+1)).
First differences of A033113 and A039300.
Partial sums of A046717.
The following sequences (and others) belong to the same family: A000129, A001333, A002532, A002533, A002605, A015518, A015519, A026150, A046717, A063727, A083098, A083099, A083100, A084057.
Cf. A046717.

Programs

  • Magma
    [Round(3^n/4): n in [0..30]]; // Vincenzo Librandi, Jun 24 2011
    
  • Mathematica
    Table[(3^n-(-1)^n)/4,{n,0,30}] (* Alexander Adamchuk, Nov 19 2006 *)
  • Maxima
    a(n):= round(3^n/4)$ /* Dimitri Papadopoulos, Nov 28 2023 */
  • PARI
    a(n)=round(3^n/4)
    
  • Python
    for n in range(0, 20): print(int((3**n-(-1)**n)/4), end=', ') # Stefano Spezia, Nov 30 2018
    
  • Sage
    [round(3^n/4) for n in range(0,27)]
    

Formula

G.f.: x/((1+x)*(1-3*x)).
a(n) = (3^n - (-1)^n)/4 = floor(3^n/4 + 1/2).
a(n) = 3^(n-1) - a(n-1). - Emeric Deutsch, Apr 01 2004
E.g.f.: (exp(3*x) - exp(-x))/4. Second inverse binomial transform of (5^n-1)/4, A003463. Inverse binomial transform for powers of 4, A000302 (when preceded by 0). - Paul Barry, Mar 28 2003
a(n) = Sum_{k=0..floor(n/2)} C(n, 2k+1)*2^(2k). - Paul Barry, May 14 2003
a(n) = Sum_{k=1..n} binomial(n, k)*(-1)^(n+k)*4^(k-1). - Paul Barry, Apr 02 2003
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*2^(n-2*k)*3^k. - Paul Barry, Jul 13 2004
a(n) = U(n-1, i/sqrt(3))(-i*sqrt(3))^(n-1), i^2=-1. - Paul Barry, Nov 17 2003
G.f.: x*(1+x)^2/(1 - 6*x^2 - 8*x^3 - 3*x^4) = x(1+x)^2/characteristic polynomial(x^4*adj(K_4)(1/x)). - Paul Barry, Feb 03 2004
a(n) = sum_{k=0..3^(n-1)} A014578(k) = -(-1)^n*A014983(n) = A051068(3^(n-1)), for n > 0. - Philippe Deléham, Mar 31 2004
E.g.f.: exp(x)*sinh(2*x)/2. - Paul Barry, Oct 02 2004
a(2*n+1) = A054880(n) + 1. - M. F. Hasler, Mar 20 2008
2*a(n) + (-1)^n = A046717(n). - M. F. Hasler, Mar 20 2008
a(n) = ((1+sqrt(4))^n - (1-sqrt(4))^n)/4. - Al Hakanson (hawkuu(AT)gmail.com), Dec 31 2008
a(n) = abs(A014983(n)). - Zerinvary Lajos, May 28 2009
a(n) = round(3^n/4). - Mircea Merca, Dec 28 2010
a(n) = Sum_{k=1,3,5,...} binomial(n,k)*2^(k-1). - Geoffrey Critzer, Mar 02 2010
From Sergei N. Gladkovskii, Jul 19 2012: (Start)
G.f.: G(0)/4 where G(k)= 1 - 1/(9^k - 3*x*81^k/(3*x*9^k - 1/(1 + 1/(3*9^k - 27*x*81^k/(9*x*9^k + 1/G(k+1)))))); (continued fraction).
E.g.f.: G(0)/4 where G(k)= 1 - 1/(9^k - 3*x*81^k/(3*x*9^k - (2*k+1)/(1 + 1/(3*9^k - 27*x*81^k/(9*x*9^k + (2*k+2)/G(k+1)))))); (continued fraction). (End)
G.f.: G(0)*x/(2*(1-x)), where G(k) = 1 + 1/(1 - x*(4*k-1)/(x*(4*k+3) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
a(n+1) = Sum_{k = 0..n} A238801(n,k)*2^k. - Philippe Deléham, Mar 07 2014
a(n) = (-1)^(n-1)*Sum_{k=0..n-1} A135278(n-1,k)*(-4)^k = (-1)^(n-1)*Sum_{k=0..n-1} (-3)^k. Equals (-1)^(n-1)*Phi(n,-3), where Phi is the cyclotomic polynomial when n is an odd prime. (For n > 0.) - Tom Copeland, Apr 14 2014
a(n) = 2*A006342(n-1) - n mod 2 if n > 0, a(0)=0. - Yuchun Ji, Nov 30 2018
a(n) = 2*A033113(n-2) + n mod 2 if n > 0, a(0)=0. - Yuchun Ji, Aug 16 2019
a(2*k) = 2*A002452(k), a(2*k+1) = A066443(k). - Yuchun Ji, Aug 14 2019
a(n+1) = 2*Sum_{k=0..n} a(k) if n odd, and 1 + 2*Sum_{k=0..n} a(k) if n even. - Kengbo Lu, May 30 2020
a(n) = F(n) + Sum_{k=1..(n-1)} a(k)*L(n-k), for F(n) and L(n) the Fibonacci and Lucas numbers. - Kengbo Lu and Greg Dresden, Jun 05 2020
From Kengbo Lu, Jun 11 2020: (Start)
a(n) = A002605(n) + Sum_{k = 1..n-2} a(k)*A002605(n-k-1).
a(n) = A006130(n-1) + Sum_{k = 1..n-1} a(k)*A006130(n-k-1). (End)
a(2n) = Sum_{i>=0, j>=0} binomial(n-j-1,i)*binomial(n-i-1,j)* 2^(2n-2i-2j-1)* 3^(i+j). - Kengbo Lu, Jul 02 2020
a(n) = 3*a(n-1) - (-1)^n. - Dimitri Papadopoulos, Nov 28 2023
G.f.: x/((1 + x)*(1 - 3*x)) = Sum_{n >= 0} x^(n+1) * Product_{k = 1..n} (k + 3*x + 1)(1 + k*x) (a telescoping series). Cf. A007482. - Peter Bala, May 08 2024
From Peter Bala, Jun 29 2025: (Start)
For n >= 1, a(n+1) = 2^n * hypergeom([1/2 - (1/2)*n, -(1/2)*n], [-n], -3).
G.f. A(x) = x*exp(Sum_{n >= 1} a(2*n)/a(n)*x^n/n) = x + 2*x^2 + 7*x^3 + 20*x^4 + ....
sqrt(A(x)/x) is the g.f. of A002426.
The following series telescope:
Sum_{n >= 1} (-3)^n/(a(n)*a(n+1)) = -1; Sum_{n >= 1} (-3)^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = -1/98.
In general, for k >= 0, Sum_{n >= 1} (-3)^n/(a(n)*a(n+1)*...*a(n+2*k+1)) = -1/((a(1)*a(2)*...*a(2*k+1))*a(2*k+1)).
Sum_{n >= 1} 3^n/(a(n)*a(n+1)*a(n+2)) = 1/4; Sum_{n >= 1} 3^n/(a(n)*a(n+1)*a(n+2)* a(n+3)*a(n+4)) = 1/5600.
In general, for k >= 1, Sum_{n >= 1} 3^n/(a(n)*a(n+1)*...*a(n+2*k)) = 1/((a(1)*a(2)*...*a(2*k))*a(2*k)). (End)

Extensions

More terms from Emeric Deutsch, Apr 01 2004
Edited by Ralf Stephan, Aug 30 2004

A077925 Expansion of 1/((1-x)*(1+2*x)).

Original entry on oeis.org

1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, -1365, 2731, -5461, 10923, -21845, 43691, -87381, 174763, -349525, 699051, -1398101, 2796203, -5592405, 11184811, -22369621, 44739243, -89478485, 178956971, -357913941, 715827883, -1431655765, 2863311531, -5726623061
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

a(n+1) is the reflection of a(n) through a(n-1) on the numberline. - Floor van Lamoen, Aug 31 2004
If a zero is added as the (new) a(0) in front, the sequence represents the inverse binomial transform of A001045. Partial sums are in A077898. - R. J. Mathar, Aug 30 2008
a(n) = A077953(2*n+3). - Reinhard Zumkeller, Oct 07 2008
Related to the Fibonacci sequence by an INVERT transform: if A(x) = 1+x^2*g(x) is the generating function of the a(n) prefixed with 1, 0, then 1/A(x) = 2+(x+1)/(x^2-x+1) is the generating function of 1, 0, -1, 1, -2, 3, ..., the signed Fibonacci sequence A000045 prefixed with 1. - Gary W. Adamson, Jan 07 2011
Also: Gaussian binomial coefficients [n+1,1], or q-integers, for q=-2, diagonal k=1 in the triangular (or column r=1 in the square) array A015109. - M. F. Hasler, Nov 04 2012
With a leading zero, 0, 1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, ... we obtain the Lucas U(-1,-2) sequence. - R. J. Mathar, Jan 08 2013
Let m = a(n). Then 18*m^2 - 12*m + 1 = A000225(2n+3). - Roderick MacPhee, Jan 17 2013

Examples

			G.f. = 1 - x + 3*x^2 - 5*x^3 + 11*x^4 - 21*x^5 + 43*x^6 - 85*x^7 + ...
		

Crossrefs

Cf. A001045 (unsigned version).
Cf. A014983, A014985, A014986. - Zerinvary Lajos, Dec 16 2008

Programs

Formula

G.f.: 1/(1+x-2*x^2).
a(n) = (1-(-2)^(n+1))/3. - Vladeta Jovovic, Apr 17 2003
a(n) = Sum_{k=0..n} (-2)^k. - Paul Barry, May 26 2003
a(n+1) - a(n) = A122803(n). - R. J. Mathar, Aug 30 2008
a(n) = Sum_{k=0..n} A112555(n,k)*(-2)^k. - Philippe Deléham, Sep 11 2009
a(n) = A082247(n+1) - 1. - Philippe Deléham, Oct 07 2009
G.f.: Q(0)/(3*x), where Q(k) = 1 - 1/(4^k - 2*x*16^k/(2*x*4^k + 1/(1 + 1/(2*4^k - 8*x*16^k/(4*x*4^k - 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 22 2013
G.f.: Q(0)/2 , where Q(k) = 1 + 1/(1 - x*(4*k-1 + 2*x)/( x*(4*k+1 + 2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
E.g.f.: (2*exp(-2*x) + exp(x))/3. - Ilya Gutkovskiy, Nov 12 2016
a(n) = A086893(n+2) - A061547(n+3), n >= 0. - Yosu Yurramendi, Jan 16 2017
a(n) = (-1)^n*A001045(n+1). - M. F. Hasler, Feb 13 2020
a(n) - a(n-1) = a(n-1) - a(n+1) = (-2)^n, a(n+1) = - a(n) + 2*a(n-1) = 1 - 2*a(n). - Michael Somos, Feb 22 2023

A052551 Expansion of 1/((1 - x)*(1 - 2*x^2)).

Original entry on oeis.org

1, 1, 3, 3, 7, 7, 15, 15, 31, 31, 63, 63, 127, 127, 255, 255, 511, 511, 1023, 1023, 2047, 2047, 4095, 4095, 8191, 8191, 16383, 16383, 32767, 32767, 65535, 65535, 131071, 131071, 262143, 262143, 524287, 524287, 1048575, 1048575, 2097151, 2097151
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Equals row sums of triangle A137865. - Gary W. Adamson, Feb 18 2008
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 566", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Jul 05 2017
Number of nonempty subsets of {1,2,...,n+1} that contain only odd numbers. a(0) = a(1) = 1: {1}; a(6) = a(7) = 15: {1}, {3}, {5}, {7}, {1,3}, {1,5}, {1,7}, {3,5}, {3,7}, {5,7}, {1,3,5}, {1,3,7}, {1,5,7}, {3,5,7}, {1,3,5,7}. - Enrique Navarrete, Mar 16 2018
Number of nonempty subsets of {1,2,...,n+2} that contain only even numbers. a(0) = a(1) = 1: {2}; a(4) = a(5) = 7: {2}, {4}, {6}, {2,4}, {2,6}, {4,6}, {2,4,6}. - Enrique Navarrete, Mar 26 2018
Doubling of A000225(n+1), n >= 0 entries. First differences give A077957. - Wolfdieter Lang, Apr 08 2018
a(n-2) is the number of achiral rows or cycles of length n partitioned into two sets or the number of color patterns using exactly 2 colors. An achiral row or cycle is equivalent to its reverse. Two color patterns are equivalent if the colors are permuted. For n = 4, the a(n-2) = 3 row patterns are AABB, ABAB, and ABBA; the cycle patterns are AAAB, AABB, and ABAB. For n = 5, the a(n-2) = 3 patterns for both rows and cycles are AABAA, ABABA, and ABBBA. For n = 6, the a(n-2) = 7 patterns for rows are AAABBB, AABABB, AABBAA, ABAABA, ABABAB, ABBAAB, and ABBBBA; the cycle patterns are AAAAAB, AAAABB, AAABAB, AAABBB, AABAAB, AABABB, and ABABAB. - Robert A. Russell, Oct 15 2018
For integers m > 1, the expansion of 1/((1 - x)*(1 - m*x^2)) generates a(n) = (sqrt(m)^(n + 1)*((-1)^n*(sqrt(m) - 1) + sqrt(m) + 1) - 2)/(2*(m - 1)). It appears, for integer values of n >= 0 and m > 1, that it could be simplified in the integral domain a(n) = (m^(1 + floor(n/2)) - 1)/(m - 1). - Federico Provvedi, Nov 23 2018
From Werner Schulte, Mar 04 2019: (Start)
More generally: For some fixed integers q and r > 0 the expansion of A(q,r; x) = 1/((1-x)*(1-q*x^r)) generates coefficients a(q,r; n) = (q^(1+floor(n/r))-1)/(q-1) for n >= 0; the special case q = 1 leads to a(1,r; n) = 1 + floor(n/r).
The a(q,r; n) satisfy for n > r a linear recurrence equation with constant coefficients. The signature vector is given by the sum of two vectors v and w where v has terms 1 followed by r zeros, i.e., (1,0,0,...,0), and w has r-1 leading zeros followed by q and -q, i.e., (0,0,...,0,q,-q).
Let a_i(q,r; n) be the convolution inverse of a(q,r; n). The terms are given by the sum a_i(q,r; n) = b(n) + c(n) for n >= 0 where b(n) has terms 1 and -1 followed by infinitely zeros, i.e., (1,-1,0,0,0,...), and c(n) has r leading zeros followed by -q, q and infinitely zeros, i.e., (0,0,...,0,-q,q,0,0,0,...).
Here is an example for q = 3 and r = 5: The expansion of A(3,5; x) = 1/((1-x)*(1-3*x^5)) = Sum_{n>=0} a(3,5; n)*x^n generates the sequence of coefficients (a(3,5; n)) = (1,1,1,1,1,4,4,4,4,4,13,13,13,13,13,40,...) where r = 5 controls the repetition and q = 3 the different values.
The a(3,5; n) satisfy for n > 5 the linear recurrence equation with constant coefficients and signature (1,0,0,0,0,0) + (0,0,0,0,3,-3) = (1,0,0,0,3,-3).
The convolution inverse a_i(3,5; n) has terms (1,-1,0,0,0,0,0,0,0,...) + (0,0,0,0,0,-3,3,0,0,...) = (1,-1,0,0,0,-3,3,0,0,...).
For further examples and informations see A014983 (q,r = -3,1), A077925 (q,r = -2,1), A000035 (q,r = -1,1), A000012 (q,r = 0,1), A000027 (q,r = 1,1), A000225 (q,r = 2,1), A003462 (q,r = 3,1), A077953 (q,r = -2,2), A133872 (q,r = -1,2), A004526 (q,r = 1,2), A052551 (this sequence with q,r = 2,2), A077886 (q,r = -2,3), A088911 (q,r = -1,3), A002264 (q,r = 1,3) and A077885 (q,r = 2,3). The offsets might be different.
(End)
a(n) is the number of palindromes of length n over the alphabet {1,2} containing the letter 1. More generally, the number of palindromes of length n over the alphabet {1,2,...,k} containing the letter 1 is given by k^ceiling(n/2)-(k-1)^ceiling(n/2). - Sela Fried, Dec 10 2024

References

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

Crossrefs

Column 2 (offset by two) of A304972.
Cf. A000225 (oriented), A056326 (unoriented), and A122746(n-2) (chiral) for rows.
Cf. A056295 (oriented), A056357 (unoriented), and A059053 (chiral) for cycles.

Programs

  • GAP
    Flat(List([1..21],n->[2^n-1,2^n-1])); # Muniru A Asiru, Oct 16 2018
    
  • Magma
    [2^Floor(n/2)-1: n in [2..50]]; // Vincenzo Librandi, Aug 16 2011
    
  • Maple
    spec := [S,{S=Prod(Sequence(Prod(Z,Union(Z,Z))),Sequence(Z))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    Table[StirlingS2[Floor[n/2] + 2, 2], {n, 0, 50}] (* Robert A. Russell, Dec 20 2017 *)
    Drop[LinearRecurrence[{1, 2, -2}, {0, 1, 1}, 50], 1] (* Robert A. Russell, Oct 14 2018 *)
    CoefficientList[Series[1/((1-x)*(1-2*x^2)), {x, 0, 50}], x] (* Stefano Spezia, Oct 16 2018 *)
    2^(1+Floor[(Range[0,50])/2])-1 (* Federico Provvedi, Nov 22 2018 *)
    ((-1)^#(Sqrt[2]-1)+Sqrt[2]+1)2^((#-1)/2)-1&@Range[0, 50] (* Federico Provvedi, Nov 23 2018 *)
  • PARI
    x='x+O('x^50); Vec(1/((1-x)*(1-2*x^2))) \\ Altug Alkan, Mar 19 2018
    
  • Sage
    [2^(floor(n/2)) -1 for n in (2..50)] # G. C. Greubel, Mar 04 2019

Formula

G.f.: 1/((1 - x)*(1 - 2*x^2)).
Recurrence: a(1) = 1, a(0) = 1, -2*a(n) - 1 + a(n+2) = 0.
a(n) = -1 + Sum((1/2)*(1 + 2*alpha)*alpha^(-1 - n)) where the sum is over alpha = the two roots of -1 + 2*x^2.
a(n) = A016116(n+2) - 1. - R. J. Mathar, Jun 15 2009
a(n) = A060546(n+1) - 1. - Filip Zaludek, Dec 10 2016
From Robert A. Russell, Oct 15 2018: (Start)
a(n-2) = S2(floor(n/2)+1,2), where S2 is the Stirling subset number A008277.
a(n-2) = 2*A056326(n) - A000225(n) = A000225(n) - 2*A122746(n-2) = A056326(n) - A122746(n-2).
a(n-2) = 2*A056357(n) - A056295(n) = A056295(n) - 2*A059053(n) = A056357(n) - A059053(n). (End)
From Federico Provvedi, Nov 22 2018: (Start)
a(n) = 2^( 1 + floor(n/2) ) - 1.
a(n) = ( (-1)^n*(sqrt(2)-1) + sqrt(2) + 1 ) * 2^( (n - 1)/2 ) - 1. (End)
E.g.f.: 2*cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x) - cosh(x) - sinh(x). - Franck Maminirina Ramaharo, Nov 23 2018

Extensions

More terms from James Sellers, Jun 06 2000

A014985 a(n) = (1 - (-4)^n)/5.

Original entry on oeis.org

1, -3, 13, -51, 205, -819, 3277, -13107, 52429, -209715, 838861, -3355443, 13421773, -53687091, 214748365, -858993459, 3435973837, -13743895347, 54975581389, -219902325555, 879609302221, -3518437208883, 14073748835533
Offset: 1

Views

Author

Keywords

Comments

q-integers for q=-4.
In Penrose's book, presented as partial sums of the series for 1/(1-x^2) evaluated at x=2. - Olivier Gérard, May 22 2009
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-3, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=2, a(n-1)=(-1)^n*charpoly(A,1). - Milan Janjic, Jan 27 2010

References

  • Roger Penrose, "The Road to Reality, A complete guide to the Laws of the Universe", Jonathan Cape, London, 2004, pages 79-80. - Olivier Gérard, May 22 2009

Crossrefs

Programs

  • Magma
    I:=[1, -3]; [n le 2 select I[n] else -3*Self(n-1)+4*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 21 2012
    
  • Maple
    a:=n->sum ((-4)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    LinearRecurrence[{-3, 4}, {1, -3}, 50] (* or *) CoefficientList[ Series[ 1/((1-x)*(1+4*x)), {x,0,30}], x] (* Vincenzo Librandi, Oct 21 2012 *)
    (1-(-4)^Range[30])/5 (* Harvey P. Dale, Oct 06 2024 *)
  • PARI
    a(n)=(1-(-4)^n)/5 \\ Charles R Greathouse IV, Sep 24 2015
  • SageMath
    [gaussian_binomial(n,1,-4) for n in range(1,24)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + q^{(n-1)} = {(q^n - 1) / (q - 1)}, with q=-4.
From Paul Barry, Jan 12 2007: (Start)
G.f.: x/(1+3*x-4*x^2).
a(n) = Sum_{k=0..floor(n/2)} C(n-k,k)*4^k*(-3)^(n-2k). (End)
a(n) = -3*a(n-1) +4*a(n-2). - Vincenzo Librandi, Oct 21 2012

Extensions

G.f. adapted to the offset by Vincenzo Librandi, Oct 21 2012
Better name from Ralf Stephan, Jul 14 2013

A074089 Coefficient of q^3 in nu(n), where nu(0)=1, nu(1)=b and, for n >= 2, nu(n) = b*nu(n-1) + lambda*(1+q+q^2+...+q^(n-2))*nu(n-2) with (b,lambda)=(2,3).

Original entry on oeis.org

0, 0, 0, 0, 0, 78, 501, 2574, 11757, 50034, 203229, 797316, 3046362, 11394774, 41885913, 151732722, 542840175, 1921208586, 6735519249, 23417342568, 80810560596, 277008392478, 943826398893, 3198199361910, 10783017814065
Offset: 0

Views

Author

Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 19 2002

Keywords

Comments

The coefficient of q^0 is A014983(n+1).

Examples

			The first 6 nu polynomials are nu(0)=1, nu(1)=2, nu(2)=7, nu(3) = 20 + 6q, nu(4) = 61 + 33q + 21q^2, nu(5) = 182 + 144q + 120q^2 + 78q^3 + 18q^4, so the coefficients of q^3 are 0,0,0,0,0,78.
		

Crossrefs

Coefficients of q^0, q^1 and q^2 are in A014983, A074087 and A074088. Related sequences with other values of b and lambda are in A074082-A074086.

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); [0,0,0,0,0] cat Coefficients(R!((78*x^5 -123*x^6 -498*x^7 +297*x^8 +1134*x^9 +567*x^10)/(1 -2*x -3*x^2)^4)); // G. C. Greubel, May 26 2018
  • Mathematica
    b=2; lambda=3; expon=3; nu[0]=1; nu[1]=b; nu[n_] := nu[n]= Together[ b*nu[n-1]+lambda(1-q^(n-1))/(1-q)nu[n-2]]; a[n_] := Coefficient[nu[n], q, expon]
    (* Second program: *)
    CoefficientList[Series[(78*x^5-123*x^6-498*x^7+297*x^8+1134*x^9 + 567*x^10)/( 1-2*x-3*x^2)^4, {x, 0, 50}], x] (* G. C. Greubel, May 26 2018 *)
  • PARI
    x='x+O('x^30); concat([0,0,0,0,0], Vec((78*x^5 -123*x^6 -498*x^7 +297*x^8 +1134*x^9 +567*x^10)/(1 -2*x -3*x^2)^4)) \\ G. C. Greubel, May 26 2018
    

Formula

G.f.: (78*x^5 -123*x^6 -498*x^7 +297*x^8 +1134*x^9 +567*x^10)/(1 -2*x -3*x^2)^4.
a(n) = 8*a(n-1) -12*a(n-2) -40*a(n-3) +74*a(n-4) +120*a(n-5) -108*a(n-6) -216*a(n-7) -81*a(n-8) for n>=11.

Extensions

Edited by Dean Hickerson, Aug 21 2002

A014578 Binary expansion of Thue constant (or Roth's constant).

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1
Offset: 0

Views

Author

Keywords

Comments

a(0)=0; to construct the sequence start with a(1)=1, then concatenate twice and change the last term 1->0 giving 1,1,0. Concatenate those 3 terms twice giving 1,1,0,1,1,0,1,1,0, change the last term 0->1 giving 1,1,0,1,1,0,1,1,1. Concatenate those 9 terms twice and change the last term 1->0, etc. - Benoit Cloitre, Feb 09 2003
It is probably my fault if this constant is misattributed. It was "computed" circa 1971 by a very simple Life pattern (as a diagonal row of blinkers), an obvious case of the (Thue-Siegel-)Roth criterion for transcendence, since the error after 3^n bits is ~2^-3^(n+1) = O(denominator^-3). I probably should have called it Roth's constant. - Bill Gosper, Mar 19 2004
a(0) = 0; then fixed point of the morphism 1->110, 0->111, starting with a(1) = 1. - Philippe Deléham, Mar 21 2004
Characteristic function of A007417, i.e., a(n) = 1 if n is in A007417 and a(n) = 0 otherwise. - Philippe Deléham, Mar 21 2004
Multiplicative with a(3^e) = (e+1)%2, a(p^e) = 1 otherwise. - David W. Wilson, Jun 10 2005
a(A145204(n)) = 0, a(A007417(n)) = 1. - Reinhard Zumkeller, Oct 04 2008
1 if the ternary representation of n has an even number of trailing zeros. - Ralf Stephan, Sep 02 2013

Examples

			Start: 1
Rules:
  1 --> 110
  0 --> 111
-------------
0:   (#=1)
  1
1:   (#=3)
  110
2:   (#=9)
  110110111
3:   (#=27)
  110110111110110111110110110
4:   (#=81)
  110110111110110111110110110110110111110110111110110110110110111110110111110110111
- _Joerg Arndt_, Jul 06 2011
		

Crossrefs

Cf. Thue-Morse or parity constant A010060.
Cf. A154271.

Programs

  • Mathematica
    Nest[ Flatten[ # /. {0 -> {1, 1, 1}, 1 -> {1, 1, 0}}] &, {0}, 6] (* Robert G. Wilson v, Mar 09 2005 *)
  • PARI
    a(n)=if(n<1,0,sum(k=0,ceil(log(n)/log(3)),(-1)^k*(floor(n/3^k)-floor((n-1)/3^k))));
    
  • PARI
    A014578(n) = if(!n,n,valuation(n, 3)%2==0); \\ Ralf Stephan, Sep 02 2013, edited for the term a(0)=0 - Antti Karttunen, May 28 2024
    
  • Python
    from sympy import multiplicity
    def A014578(n): return multiplicity(3,n)&1^1 if n else 0 # Chai Wah Wu, Jan 28 2025

Formula

a(0)=0; for n>=1, a(n)=sum(k>=0, (-1)^k*(floor(n/3^k)-floor((n-1)/3^k))). - Benoit Cloitre, Jun 03 2003
a(0)=0, a(3k)=1-a(k); a(3k+1)=a(3k+2)=1. - Benoit Cloitre, Mar 19 2004
Sum_{k=0..3^n} a(k) = A015518(n+1) = (-1)^n*A014983(n+1). - Philippe Deléham, Mar 31 2004
a(n) = 1 - A007949(n) mod 2 for n>0. - Reinhard Zumkeller, Oct 04 2008
Let T(x) be the g.f., then T(x) + T(x^3) = x/(1-x). - Joerg Arndt, May 11 2010
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/4. - Amiram Eldar, Jul 13 2020

A014987 a(n) = (1 - (-6)^n)/7.

Original entry on oeis.org

1, -5, 31, -185, 1111, -6665, 39991, -239945, 1439671, -8638025, 51828151, -310968905, 1865813431, -11194880585, 67169283511, -403015701065, 2418094206391, -14508565238345, 87051391430071, -522308348580425, 3133850091482551
Offset: 1

Views

Author

Keywords

Comments

q-integers for q=-6.
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-5, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)=(-1)^n*charpoly(A,2). - Milan Janjic, Jan 27 2010

Crossrefs

Absolute values are in A015540.

Programs

  • Magma
    I:=[1,-5]; [n le 2 select I[n] else -5*Self(n-1)+6*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 22 2012
    
  • Maple
    a:=n->sum ((-6)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    LinearRecurrence[{-5, 6}, {1, -5}, 30] (* Vincenzo Librandi Oct 22 2012 *)
  • PARI
    a(n)=(1-(-6)^n)/7 \\ Charles R Greathouse IV, Sep 24 2015
  • Sage
    [gaussian_binomial(n,1,-6) for n in range(1,22)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + q^(n-1) = (q^n - 1) / (q - 1).
G.f.: x/((1+6*x)*(1-x)).
a(n) = -5*a(n-1) + 6*a(n-2). - Vincenzo Librandi Oct 22 2012
E.g.f.: (exp(x) - exp(-6*x))/7. - G. C. Greubel, May 26 2018

Extensions

Better name from Ralf Stephan, Jul 14 2013

A015110 Triangle of q-binomial coefficients for q=-3.

Original entry on oeis.org

1, 1, 1, 1, -2, 1, 1, 7, 7, 1, 1, -20, 70, -20, 1, 1, 61, 610, 610, 61, 1, 1, -182, 5551, -15860, 5551, -182, 1, 1, 547, 49777, 433771, 433771, 49777, 547, 1, 1, -1640, 448540, -11662040, 35569222, -11662040, 448540, -1640, 1, 1, 4921, 4035220, 315323620
Offset: 0

Views

Author

Keywords

Comments

May be read as a symmetric triangular (T[n,k]=T[n,n-k]; k=0,...,n; n=0,1,...) or square array (A[n,r]=A[r,n]=T[n+r,r], read by antidiagonals). The diagonals of the former (or rows/columns of the latter) are A000012 (k=0), A014983 (k=1), A015251 (k=2), A015268 (k=3), A015288 (k=4), A015306 (k=5), A015324 (k=6), A015340 (k=7), A015357 (k=8), A015375 (k=9), A015388 (k=10), A015407 (k=11), A015424 (k=12),... - M. F. Hasler, Nov 04 2012

Crossrefs

Cf. analog triangles for other q: A015109 (q=-2), A015112 (q=-4), A015113 (q=-5), A015116 (q=-6), A015117 (q=-7), A015118 (q=-8), A015121 (q=-9), A015123 (q=-10), A015124 (q=-11), A015125 (q=-12), A015129 (q=-13), A015132 (q=-14), A015133 (q=-15); A022166 (q=2), A022167 (q=3), A022168, A022169, A022170, A022171, A022172, A022173, A022174 (q=10), A022175, A022176, A022177, A022178, A022179, A022180, A022181, A022182, A022183, A022184 (q=20), A022185, A022186, A022187, A022188. - M. F. Hasler, Nov 04 2012

Programs

  • Mathematica
    Flatten[Table[QBinomial[n, m, -3], {n, 0, 50}, {m, 0, n}]] (* Vincenzo Librandi, Nov 01 2012 *)
  • PARI
    T015110(n, k, q=-3)=prod(i=1, k, (q^(1+n-i)-1)/(q^i-1)) \\ (Indexing is that of the triangular array: 0 <= k <= n = 0,1,2,...) - M. F. Hasler, Nov 04 2012

A014986 a(n) = (1 - (-5)^n)/6.

Original entry on oeis.org

1, -4, 21, -104, 521, -2604, 13021, -65104, 325521, -1627604, 8138021, -40690104, 203450521, -1017252604, 5086263021, -25431315104, 127156575521, -635782877604, 3178914388021, -15894571940104, 79472859700521
Offset: 1

Views

Author

Keywords

Comments

q-integers for q = -5.
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-5, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det(A). - Milan Janjic, Jan 27 2010

Crossrefs

Programs

  • Magma
    I:=[1, -4]; [n le 2 select I[n] else -4*Self(n-1)+5*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 19 2012
  • Maple
    a:=n->sum ((-5)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    LinearRecurrence[{-4,5},{1,-4},30] (* Vincenzo Librandi, Jun 19 2012 *)
  • PARI
    a(n)=(1-(-5)^n)/6 \\ Charles R Greathouse IV, Dec 07 2011
    
  • Sage
    [gaussian_binomial(n,1,-5) for n in range(1,22)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + q^(n-1) = (q^n - 1) / (q - 1).
G.f.: x/((1-x)*(1+5*x)). - Bruno Berselli, Dec 07 2011
a(n) = -4*a(n-1) + 5*a(n-2). - Vincenzo Librandi, Jun 19 2012
E.g.f.: (exp(x) - exp(-5*x))/6. - G. C. Greubel, May 26 2018

Extensions

Better name from Ralf Stephan, Jul 14 2013

A014989 a(n) = (1 - (-7)^n)/8.

Original entry on oeis.org

1, -6, 43, -300, 2101, -14706, 102943, -720600, 5044201, -35309406, 247165843, -1730160900, 12111126301, -84777884106, 593445188743, -4154116321200, 29078814248401, -203551699738806, 1424861898171643, -9974033287201500
Offset: 1

Views

Author

Keywords

Comments

q-integers for q = -7.

Crossrefs

Programs

  • Magma
    I:=[1,-6]; [n le 2 select I[n] else -6*Self(n-1)+7*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 22 2012
    
  • Maple
    a:=n->sum ((-7)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    LinearRecurrence[{-6, 7}, {1, -6}, 30] (* Vincenzo Librandi, Oct 22 2012 *)
  • PARI
    x='x+O('x^30); Vec(x/((1-x)*(1+7*x))) \\ G. C. Greubel, May 26 2018
  • Sage
    [gaussian_binomial(n,1,-7) for n in range(1,21)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + q^(n-1) = (q^n - 1) / (q - 1).
a(n) = -6*a(n-1) + 7*a(n-2). - Vincenzo Librandi, Oct 22 2012
From G. C. Greubel, May 26 2018: (Start)
G.f.: x/((1-x)*(1+7*x)).
E.g.f.: (exp(x) - exp(-7*x))/8. (End)

Extensions

Better name from Ralf Stephan, Jul 14 2013
Showing 1-10 of 27 results. Next