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

A059841 Period 2: Repeat [1,0]. a(n) = 1 - (n mod 2); Characteristic function of even numbers.

Original entry on oeis.org

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

Views

Author

Alford Arnold, Feb 25 2001

Keywords

Comments

When viewed as a triangular array, the row sum values are 0 1 1 1 2 3 3 3 4 5 5 5 6 ... (A004525).
This is the r=0 member of the r-family of sequences S_r(n) defined in A092184 where more information can be found.
Successive binomial transforms of this sequence: A011782, A007051, A007582, A081186, A081187, A081188, A081189, A081190, A060531, A081192.
Characteristic function of even numbers: a(A005843(n))=1, a(A005408(n))=0. - Reinhard Zumkeller, Sep 29 2008
This sequence is the Euler transformation of A185012. - Jason Kimberley, Oct 14 2011
a(n) is the parity of n+1. - Omar E. Pol, Jan 17 2012
Read as partial sequences, we get to A000975. - Jon Perry, Nov 11 2014
Elementary Cellular Automata rule 77 produces this sequence. See Wolfram, Weisstein and Index links below. - Robert Price, Jan 30 2016
Column k = 1 of A051159. - John Keith, Jun 28 2021
When read as a constant: decimal expansion of 10/99, binary expansion of 2/3. - Jason Bard, Aug 25 2025

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1, 0;
  1, 0, 1, 0;
  1, 0, 1, 0, 1;
  0, 1, 0, 1, 0, 1;
  0, 1, 0, 1, 0, 1, 0;
  1, 0, 1, 0, 1, 0, 1, 0;
  1, 0, 1, 0, 1, 0, 1, 0, 1;
  0, 1, 0, 1, 0, 1, 0, 1, 0, 1;
  0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0;
  ...
		

Crossrefs

One's complement of A000035 (essentially the same, but shifted once).
Cf. A033999 (first differences), A008619 (partial sums), A004525, A011782 (binomial transf.), A000975.
Characteristic function of multiples of g: A000007 (g=0), A000012 (g=1), this sequence (g=2), A079978 (g=3), A121262 (g=4), A079998 (g=5), A079979 (g=6), A082784 (g=7).

Programs

  • Haskell
    a059841 n = (1 -) . (`mod` 2)
    a059841_list = cycle [1,0]
    -- Reinhard Zumkeller, May 05 2012, Dec 30 2011
    
  • Magma
    [0^(n mod 2): n in  [0..100]]; // Vincenzo Librandi, Nov 09 2014
    
  • Maple
    seq(1-modp(n,2), n=0..150); # Muniru A Asiru, Apr 05 2018
  • Mathematica
    CoefficientList[Series[1/(1 - x^2), {x, 0, 104}], x] (* or *)
    Array[1/2 + (-1)^#/2 &, 105, 0] (* Michael De Vlieger, Feb 19 2019 *)
    Table[QBinomial[n, 1, -1], {n, 1, 74}] (* John Keith, Jun 28 2021 *)
    PadRight[{},120,{1,0}] (* Harvey P. Dale, Mar 06 2023 *)
  • PARI
    a(n)=(n+1)%2; \\ or 1-n%2 as in NAME.
    
  • PARI
    A059841(n)=!bittest(n,0) \\ M. F. Hasler, Jan 13 2012
    
  • Python
    def A059841(n): return 1 - (n & 1) # Chai Wah Wu, May 25 2022

Formula

a(n) = 1 - A000035(n). - M. F. Hasler, Jan 13 2012
From Paul Barry, Mar 11 2003: (Start)
G.f.: 1/(1-x^2).
E.g.f.: cosh(x).
a(n) = (n+1) mod 2.
a(n) = 1/2 + (-1)^n/2. (End)
Additive with a(p^e) = 1 if p = 2, 0 otherwise.
a(n) = Sum_{k=0..n} (-1)^k*A038137(n, k). - Philippe Deléham, Nov 30 2006
a(n) = Sum_{k=1..n} (-1)^(n-k) for n > 0. - William A. Tedeschi, Aug 05 2011
E.g.f.: cosh(x) = 1 + x^2/(Q(0) - x^2); Q(k) = 8k + 2 + x^2/(1 + (2k + 1)*(2k + 2)/Q(k + 1)); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2011
E.g.f.: cosh(x) = 1/2*Q(0); Q(k) = 1 + 1/(1 - x^2/(x^2 + (2k + 1)*(2k + 2)/Q(k + 1))); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2011
E.g.f.: cosh(x) = E(0)/(1-x) where E(k) = 1 - x/(1 - x/(x - (2*k+1)*(2*k+2)/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Apr 05 2013
For the general case: the characteristic function of numbers that are not multiples of m is a(n) = floor((n-1)/m) - floor(n/m) + 1, m,n > 0. - Boris Putievskiy, May 08 2013
a(n) = A000035(n+1) = A008619(n) - A110654(n). - Wesley Ivan Hurt, Jul 20 2013

Extensions

Better definition from M. F. Hasler, Jan 13 2012
Reinhard Zumkeller's Sep 29 2008 description added as a secondary name by Antti Karttunen, May 03 2022

A007582 a(n) = 2^(n-1)*(1+2^n).

Original entry on oeis.org

1, 3, 10, 36, 136, 528, 2080, 8256, 32896, 131328, 524800, 2098176, 8390656, 33558528, 134225920, 536887296, 2147516416, 8590000128, 34359869440, 137439215616, 549756338176, 2199024304128, 8796095119360, 35184376283136, 140737496743936, 562949970198528
Offset: 0

Views

Author

Keywords

Comments

Let G_n be the elementary Abelian group G_n = (C_2)^n for n >= 1: A006516 is the number of times the number -1 appears in the character table of G_n and A007582 is the number of times the number 1. Together the two sequences cover all the values in the table, i.e., A006516(n) + A007582(n) = 2^(2n). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 01 2001
Number of walks of length 2n+1 between two adjacent vertices in the cycle graph C_8. Example: a(1)=3 because in the cycle ABCDEFGH we have three walks of length 3 between A and B: ABAB, ABCB and AHAB. - Emeric Deutsch, Apr 01 2004
Smallest number containing in its binary representation two equal non-overlapping subwords of length n: A097295(a(n))=n and A097295(m)Reinhard Zumkeller, Aug 04 2004
a(n)^2 + (A006516(n))^2 = a(2n). E.g., a(3) = 36, A006516(3) = 28, a(6) = 2080. 36^2 + 28^2 = 2080. - Gary W. Adamson, Jun 17 2006
Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either x equals y or x does not equal y. - Ross La Haye, Jan 02 2008
Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A). This is just a simpler statement of my previous comment for this sequence. - Ross La Haye, Jan 10 2008
For n>0: A000120(a(n))=2, A023414(a(n))=2*(n-1), A087117(a(n))=n-1. - Reinhard Zumkeller, Jun 23 2009
a(n+1) written in base 2: 11, 1010, 100100, 10001000, 1000010000, ..., i.e., number 1, n times 0, number 1, n times 0 (A163449(n)). - Jaroslav Krizek, Jul 27 2009
a(n) for n >= 1 is a bisection of A001445(n+1). - Jaroslav Krizek, Aug 14 2009
Related to A102573: letting T(q,r) be the coefficient of n^(r+1) in the polynomial 2^(q-n)/n times sum_{k=0..n} binomial(n,k)*k^q, then A007582(x)= sum_{k=0..x-1} T(x,k)*2^k. - John M. Campbell, Nov 16 2011
a(n) gives the number of pairs (r, s) such that 0 <= r <= s <= (2^n)-1 that satisfy AND(r, s, XOR(r, s)) = 0. - Ramasamy Chandramouli, Aug 30 2012
a(n) = A000217(2^n) = 2^(2n-1) + 2^(n-1) is the nearest triangular number above 2^(2n-1); cf. A006516, A233327. - Antti Karttunen, Feb 26 2014
Consider the quantum spin-1/2 chain with even number of sites L (physics, condensed matter theory). The spectrum of the Hamiltonian can be classified according to symmetries. If the only symmetry of the spin Hamiltonian is Parity, i.e., reflection with respect to the middle of the chain (see e.g. the transverse-field Ising model with open boundary conditions), then the dimension of the p=+1 parity sector is given by a(n) with n=L/2. - Marin Bukov, Mar 11 2016
a(n) is also the total number of words of length n, over an alphabet of four letters, of which one of them appears an even number of times. See the Lekraj Beedassy, Jul 22 2003, comment on A006516 (4-letter odd case), and the Balakrishnan reference there. For the 1- to 11-letter cases, see the crossrefs. - Wolfdieter Lang, Jul 17 2017
a(n) is the number of nonisomorphic spanning trees of the cyclic snake formed with n+1 copies of the cycle on 4 vertices. A cyclic snake is a connected graph whose block-cutpoint is a path and all its n blocks are isomorphic to the cycle C_m. - Christian Barrientos, Sep 05 2024
Also, with offset 1, the cogrowth sequence of the dihedral group with 16 elements, D8 = . - Sean A. Irvine, Nov 06 2024

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006516.
Cf. A134308.
Cf. A102573.
The number of words of length n with m letters, one of them appearing an even number of times is for m = 1..11: A000035, A011782, A007051, A007582, A081186, A081187, A081188, A081189, A081190, A060531, A081192. - Wolfdieter Lang, Jul 17 2017

Programs

  • Magma
    [Binomial(2^n + 1, 2) : n in [0..30]]; // Wesley Ivan Hurt, Jul 03 2020
  • Maple
    seq(binomial(-2^n, 2), n=0..23); # Zerinvary Lajos, Feb 22 2008
  • Mathematica
    Table[ Binomial[2^n + 1, 2], {n, 0, 23}] (* Robert G. Wilson v, Jul 30 2004 *)
    LinearRecurrence[{6,-8},{1,3},30] (* Harvey P. Dale, Apr 08 2013 *)
  • Maxima
    A007582(n):=2^(n-1)*(1+2^n)$ makelist(A007582(n),n,0,30); /* Martin Ettl, Nov 15 2012 */
    
  • PARI
    a(n)=if(n<0,0,2^(n-1)*(1+2^n))
    
  • PARI
    a(n)=sum(k=-n\4,n\4,binomial(2*n+1,n+1+4*k))
    

Formula

G.f.: (1-3*x)/((1-2*x)*(1-4*x)). C(1+2^n, 2) where C(n, 2) is n-th triangular number A000217.
Binomial transform of A007051. Inverse binomial transform of A081186. - Paul Barry, Apr 07 2003
E.g.f.: exp(3*x)*cosh(x). - Paul Barry, Apr 07 2003
a(n) = Sum_{k=0..floor(n/2)} C(n, 2*k)*3^(n-2*k). - Paul Barry, May 08 2003
a(n+1) = 4*a(n) - 2^n; see also A049775. a(n) = 2^(n-1)*A000051(n). - Philippe Deléham, Feb 20 2004
a(n) = 6*a(n-1) - 8*a(n-2). - Emeric Deutsch, Apr 01 2004
Row sums of triangle A134308. - Gary W. Adamson, Oct 19 2007
a(n) = StirlingS2(2^n + 1,2^n) = 1 + 2*StirlingS2(n+1,2) + 3*StirlingS2(n+1,3) + 3*StirlingS2(n+1,4) = StirlingS2(n+2,2) + 3(StirlingS2(n+1,3) + StirlingS2(n+1,4)). - Ross La Haye, Mar 01 2008
a(n) = StirlingS2(2^n + 1,2^n) = 1 + 2*StirlingS2(n+1,2) + 3*StirlingS2(n+1,3) + 3*StirlingS2(n+1,4) = StirlingS2(n+2,2) + 3(StirlingS2(n+1,3) + StirlingS2(n+1,4)). - Ross La Haye, Apr 02 2008
a(n) = A000079(n) + A006516(n). - Yosu Yurramendi, Aug 06 2008
a(n) = A028403(n+1) / 4. - Jaroslav Krizek, Jul 27 2009
a(n) = Sum_{k=-floor(n/4)..floor(n/4)} binomial(2*n,n+4*k)/2. - Mircea Merca, Jan 28 2012
G.f.: Q(0)/2 where Q(k) = 1 + 2^k/(1 - 2*x/(2*x + 2^k/Q(k+1) )); (continued fraction ). - Sergei N. Gladkovskii, Apr 10 2013
a(n) = Sum_{k=1..2^n} k. - Joerg Arndt, Sep 01 2013
a(n) = (1/3) * Sum_{k=2^n..2^(n+1)} k. - J. M. Bergot, Jan 26 2015
a(n+1) = 2*a(n) + 4^n. - Yuchun Ji, Mar 10 2017

A119467 A masked Pascal triangle.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 3, 0, 1, 1, 0, 6, 0, 1, 0, 5, 0, 10, 0, 1, 1, 0, 15, 0, 15, 0, 1, 0, 7, 0, 35, 0, 21, 0, 1, 1, 0, 28, 0, 70, 0, 28, 0, 1, 0, 9, 0, 84, 0, 126, 0, 36, 0, 1, 1, 0, 45, 0, 210, 0, 210, 0, 45, 0, 1, 0, 11, 0, 165, 0, 462, 0, 330, 0, 55, 0, 1, 1, 0, 66, 0, 495, 0, 924
Offset: 0

Views

Author

Paul Barry, May 21 2006

Keywords

Comments

Row sums are A011782. Diagonal sums are F(n+1)*(1+(-1)^n)/2 (aerated version of A001519). Product by Pascal's triangle A007318 is A119468. Schur product of (1/(1-x),x/(1-x)) and (1/(1-x^2),x).
Exponential Riordan array (cosh(x),x). Inverse is (sech(x),x) or A119879. - Paul Barry, May 26 2006
Rows give coefficients of polynomials p_n(x) = Sum_{k=0..n} (k+1 mod 2)*binomial(n,k)*x^(n-k) having e.g.f. exp(x*t)*cosh(t)= 1*(t^0/0!) + x*(t^1/1!) + (1+x^2)*(t^2/2!) + ... - Peter Luschny, Jul 14 2009
Inverse of the coefficient matrix of the Swiss-Knife polynomials in ascending order of x^i (reversed and aerated rows of A153641). - Peter Luschny, Jul 16 2012
Call this array M and for k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/ having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. The infinite matrix product M(0)*M(1)*M(2)*... is equal to A136630 but with the first row and column omitted. - Peter Bala, Jul 28 2014
The row polynomials SKv(n,x) = [(x+1)^n + (x-1)^n]/2 , with e.g.f. cosh(t)*exp(xt), are the umbral compositional inverses of the row polynomials of A119879 (basically the Swiss Knife polynomials SK(n,x) of A153641); i.e., umbrally SKv(n,SK(.,x)) = x^n = SK(n,SKv(.,x)). Therefore, this entry's matrix and A119879 are an inverse pair. Both sequences of polynomials are Appell sequences, i.e., d/dx P(n,x) = n * P(n-1,x) and (P(.,x)+y)^n = P(n,x+y). In particular, (SKv(.,0)+x)^n = SKv(n,x), reflecting that the first column has the e.g.f. cosh(t). The raising operator is R = x + tanh(d/dx); i.e., R SKv(n,x) = SKv(n+1,x). The coefficients of this operator are basically the signed and aerated zag numbers A000182, which can be expressed as normalized Bernoulli numbers. The triangle is formed by multiplying the n-th diagonal of the lower triangular Pascal matrix by the Taylor series coefficient a(n) of cosh(x). More relations for this type of triangle and its inverse are given by the formalism of A133314. - Tom Copeland, Sep 05 2015
The signed version of this matrix has the e.g.f. cos(t) e^{xt}, generating Appell polynomials that have only real, simple zeros and whose extrema are maxima above the x-axis and minima below and situated above and below the zeros of the next lower degree polynomial. The bivariate versions appear on p. 27 of Dimitrov and Rusev in conditions for entire functions that are cosine transforms of a class of functions to have only real zeros. - Tom Copeland, May 21 2020
The n-th row of the triangle is obtained by multiplying by 2^(n-1) the elements of the first row of the limit as k approaches infinity of the stochastic matrix P^(2k-1) where P is the stochastic matrix associated with the Ehrenfest model with n balls. The elements of a stochastic matrix P give the probabilities of arriving in a state j given the previous state i. In particular the sum of every row of the matrix must be 1, and so the sum of the terms of the n-th row of this triangle is 2^(n-1). Furthermore, by the properties of Markov chains, we can interpret P^(2k-1) as the (2k-1)-step transition matrix of the Ehrenfest model and its limit exists and it is again a stochastic matrix. The rows of the triangle divided by 2^(n-1) are the even rows (second, fourth, ...) and the odd rows (first, third, ...) of the limit matrix P^(2k-1). - Luca Onnis, Oct 29 2023

Examples

			Triangle begins
  1,
  0, 1,
  1, 0,  1,
  0, 3,  0,  1,
  1, 0,  6,  0,   1,
  0, 5,  0, 10,   0,   1,
  1, 0, 15,  0,  15,   0,   1,
  0, 7,  0, 35,   0,  21,   0,  1,
  1, 0, 28,  0,  70,   0,  28,  0,  1,
  0, 9,  0, 84,   0, 126,   0, 36,  0, 1,
  1, 0, 45,  0, 210,   0, 210,  0, 45, 0, 1
p[0](x) = 1
p[1](x) = x
p[2](x) = 1 + x^2
p[3](x) = 3*x + x^3
p[4](x) = 1 + 6*x^2 + x^4
p[5](x) = 5*x + 10*x^3 + x^5
Connection with A136630: With the arrays M(k) as defined in the Comments section, the infinite product M(0)*M(1)*M(2)*... begins
/1        \/1        \/1        \      /1         \
|0 1      ||0 1      ||0 1      |      |0 1       |
|1 0 1    ||0 0 1    ||0 0 1    |... = |1 0  1    |
|0 3 0 1  ||0 1 0 1  ||0 0 0 1  |      |0 4  0 1  |
|1 0 6 0 1||0 0 3 0 1||0 0 1 0 1|      |1 0 10 0 1|
|...      ||...      ||...      |      |...       |
- _Peter Bala_, Jul 28 2014
		

References

  • Paul and Tatjana Ehrenfest, Über zwei bekannte Einwände gegen das Boltzmannsche H-Theorem, Physikalische Zeitschrift, vol. 8 (1907), pp. 311-314.

Crossrefs

From Peter Luschny, Jul 14 2009: (Start)
p[n](k), n=0,1,...
k= 0: 1, 0, 1, 0, 1, 0, ... A128174
k= 1: 1, 1, 2, 4, 8, 16, ... A011782
k= 2: 1, 2, 5, 14, 41, 122, ... A007051
k= 3: 1, 3, 10, 36, 136, ... A007582
k= 4: 1, 4, 17, 76, 353, ... A081186
k= 5: 1, 5, 26, 140, 776, ... A081187
k= 6: 1, 6, 37, 234, 1513, ... A081188
k= 7: 1, 7, 50, 364, 2696, ... A081189
k= 8: 1, 8, 65, 536, 4481, ... A081190
k= 9: 1, 9, 82, 756, 7048, ... A060531
k=10: 1, 10, 101, 1030, ... A081192
p[n](k), k=0,1,...
p[0]: 1,1,1,1,1,1, ....... A000012
p[1]: 0,1,2,3,4,5, ....... A001477
p[2]: 1,2,5,10,17,26, .... A002522
p[3]: 0,4,14,36,76,140, .. A079908 (End)

Programs

  • Haskell
    a119467 n k = a119467_tabl !! n !! k
    a119467_row n = a119467_tabl !! n
    a119467_tabl = map (map (flip div 2)) $
                   zipWith (zipWith (+)) a007318_tabl a130595_tabl
    -- Reinhard Zumkeller, Mar 23 2014
    
  • Magma
    /* As triangle */ [[Binomial(n, k)*(1 + (-1)^(n - k))/2: k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Sep 26 2015
  • Maple
    # Polynomials: p_n(x)
    p := proc(n,x) local k, pow; pow := (n,k) -> `if`(n=0 and k=0,1,n^k);
    add((k+1 mod 2)*binomial(n,k)*pow(x,n-k),k=0..n) end;
    # Coefficients: a(n)
    seq(print(seq(coeff(i!*coeff(series(exp(x*t)*cosh(t),t,16),t,i),x,n),n=0..i)),i=0..8); # Peter Luschny, Jul 14 2009
  • Mathematica
    Table[Binomial[n, k] (1 + (-1)^(n - k))/2, {n, 0, 12}, {k, 0, n}] // Flatten (* Michael De Vlieger, Sep 06 2015 *)
    n = 15; "n-th row"
    mat = Table[Table[0, {j, 1, n + 1}], {i, 1, n + 1}];
    mat[[1, 2]] = 1;
    mat[[n + 1, n]] = 1;
    For[i = 2, i <= n, i++, mat[[i, i - 1]] = (i - 1)/n ];
    For[i = 2, i <= n, i++, mat[[i, i + 1]] = (n - i + 1)/n];
    mat // MatrixForm;
    P2 = Dot[mat, mat];
    R1 = Simplify[
      Eigenvectors[Transpose[P2]][[1]]/
       Total[Eigenvectors[Transpose[P2]][[1]]]]
    R2 = Table[Dot[R1, Transpose[mat][[k]]], {k, 1, n + 1}]
    odd = R2*2^(n - 1) (* _Luca Onnis *)
  • Sage
    @CachedFunction
    def A119467_poly(n):
        R = PolynomialRing(ZZ, 'x')
        x = R.gen()
        return R.one() if n==0 else R.sum(binomial(n,k)*x^(n-k) for k in range(0,n+1,2))
    def A119467_row(n):
        return list(A119467_poly(n))
    for n in (0..10) : print(A119467_row(n)) # Peter Luschny, Jul 16 2012
    

Formula

G.f.: (1-x*y)/(1-2*x*y-x^2+x^2*y^2);
T(n,k) = C(n,k)*(1+(-1)^(n-k))/2;
Column k has g.f. (1/(1-x^2))*(x/(1-x^2))^k*Sum_{j=0..k+1} binomial(k+1,j)*sin((j+1)*Pi/2)^2*x^j.
Column k has e.g.f. cosh(x)*x^k/k!. - Paul Barry, May 26 2006
Let Pascal's triangle, A007318 = P; then this triangle = (1/2) * (P + 1/P). Also A131047 = (1/2) * (P - 1/P). - Gary W. Adamson, Jun 12 2007
Equals A007318 - A131047 since the zeros of the triangle are masks for the terms of A131047. Thus A119467 + A131047 = Pascal's triangle. - Gary W. Adamson, Jun 12 2007
T(n,k) = (A007318(n,k) + A130595(n,k))/2, 0<=k<=n. - Reinhard Zumkeller, Mar 23 2014

Extensions

Edited by N. J. A. Sloane, Jul 14 2009

A060531 9th binomial transform of (1,0,1,0,1,...), A059841.

Original entry on oeis.org

1, 9, 82, 756, 7048, 66384, 631072, 6048576, 58388608, 567108864, 5536870912, 54294967296, 534359738368, 5274877906944, 52199023255552, 517592186044416, 5140737488355328, 51125899906842624, 509007199254740992, 5072057594037927936, 50576460752303423488
Offset: 0

Views

Author

N. J. A. Sloane, Apr 12 2001

Keywords

Comments

Binomial transform of A081190.
Number of strings of length n of the decimal digits 0..9 that contain an even number of 0's.
An equivalent formulation is: a(n) is also the number of words of length n over an alphabet of ten letters with a chosen letter appearing an even number of times. See a comment in A007582, also for the cross references for the 1- to 11-letter word cases. - Wolfdieter Lang, Jul 17 2017

Examples

			For n = 1 there are 9 strings: {1 2 3 4 5 6 7 8 9};
for n = 2 there are 82: {00 11 12 13 14 15 16 17 18 19 21 ... 96 97 98 99}.
		

Crossrefs

Programs

  • Magma
    [(8^n+10^n)/2: n in [0..20]]; // Vincenzo Librandi, Jul 18 2017
  • Maple
    A060531 := proc(n) option remember: if n = 1 then RETURN(9) fi: 8*A060531(n-1) + 10^(n-1): end: for n from 1 to 40 do printf(`%d,`, A060531(n)) od:
  • Mathematica
    Table[8^n/2 + 10^n/2, {n, 0, 19}] (* or *)
    LinearRecurrence[{18, -80}, {1, 9}, 19] (* or *)
    CoefficientList[Series[(1 - 9 x)/((1 - 8 x) (1 - 10 x)), {x, 0, 19}], x] (* Michael De Vlieger, Jul 17 2017 *)
  • PARI
    a(n) = { (8^n + 10^n)/2 } \\ Harry J. Smith, Jul 06 2009
    

Formula

G.f.: (1 - 9*x)/((1 - 8*x)*(1 -10*x)).
E.g.f.: exp(9*x)*cosh(x).
a(n) = (8^n + 10^n)/2 = 2^(n-1)*(4^n + 5^n).
a(n) = 18*a(n-1) - 80*a(n-2), a(0) = 1, a(1) = 9.
a(n) = 8*a(n-1) + 10^(n-1), a(1) = 9.

Extensions

Additional comments from Paul Barry, Mar 11 2003
Typo in definition corrected by Paolo P. Lava, Sep 18 2008
Edited by and new name from Wolfdieter Lang, Jul 18 2017

A161999 For n even a(n) = a(n-1) + 10*a(n-2), for n odd a(n) = a(n-3) + 10 a(n-2); with a(1) = 0, a(2) = 1.

Original entry on oeis.org

0, 1, 1, 10, 20, 101, 301, 1030, 4040, 10601, 51001, 110050, 620060, 1151501, 7352101, 12135070, 85656080, 128702801, 985263601, 1372684090, 11225320100, 14712104501, 126965305501, 158346365110, 1427999420120
Offset: 1

Views

Author

Mark Dols, Jun 24 2009, Jun 28 2009, Jul 13 2009

Keywords

Examples

			As pairs:
0, 1
1, 10
20, 101
301, 1030
4040, 10601
51001, 110050
620060, 1151501
7352101, 12135070
85656080, 128702801
		

Crossrefs

Combination of A081192 and A016190. Triangle A007318 (even /uneven rows). Partly same function as A015446. A001020 (as sum of pairs of 2n).A001019 (as difference of pairs of 2n)
Cf. A162849.

Programs

  • Mathematica
    nxt[{n_,a_,b_,c_}]:={n+1,b,c,If[OddQ[n],c+10b,a+10b]}; NestList[nxt,{2,0,1,1},30][[All,2]] (* or *) LinearRecurrence[{0,20,0,-99},{0,1,1,10},30] (* Harvey P. Dale, May 03 2018 *)

Formula

a(n)=20*a(n-2)-99*a(n-4). G.f.: -x^2*(-1-x+10*x^2)/((3*x-1)*(3*x+1)*(11*x^2-1)). [From R. J. Mathar, Jul 13 2009]

Extensions

Edited by N. J. A. Sloane, Jun 30 2009
NAME adapted to offset. - R. J. Mathar, Jun 19 2021
Showing 1-5 of 5 results.