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

A139782 Binomial transform of A077947.

Original entry on oeis.org

1, 2, 5, 15, 46, 139, 417, 1250, 3749, 11247, 33742, 101227, 303681, 911042, 2733125, 8199375, 24598126, 73794379, 221383137, 664149410, 1992448229, 5977344687, 17932034062, 53796102187, 161388306561, 484164919682, 1452494759045
Offset: 0

Views

Author

Paul Curtz, May 16 2008

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,0,-1,3},{1,2,5,15},30] (* Harvey P. Dale, Jan 12 2019 *)

Formula

a(n) = 3*a(n-1)-a(n-3)+3*a(n-4).
O.g.f.: -(1-x)^2/((3*x-1)*(x^2-x+1)). a(n) = (4*3^n+3*A010892(n)-A010892(n-1))/7. - R. J. Mathar, May 18 2008

Extensions

More terms from R. J. Mathar, May 18 2008

A373445 Triple convolution of the three tribonacci-like sequences A000073(n), A077947(n-2), and A103143(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 3, 9, 28, 75, 195, 498, 1229, 2978, 7115, 16756, 39031, 90089, 206228, 468795, 1059197, 2380257, 5323610, 11856514, 26306896, 58172254, 128246136, 281957282, 618367332, 1353112803
Offset: 0

Views

Author

Greg Dresden and Xiaoyuan Wang, Jun 05 2024

Keywords

Comments

If we set b(n)=A000073(n), c(n)=A077947(n-2) with c(0)=c(1)=0, and d(n)=A103143(n), then all three sequences b(n), c(n), and d(n) start with the terms 0,0,1,1,2 and have signatures {1,1,1}, {1,1,2}, and {1,1,3} respectively. The triple convolution is defined as a(n) = Sum_{i+j+k=n} b(i)*c(j)*d(k).

Examples

			For n=7 the triple convolution of the three sequences b(n)=A000073(n), c(n)=A077947(n-2) with c(0)=c(1)=0, and d(n)=A103143(n) has only three nonzero terms in the sum: b(2)*c(2)*d(3), b(2)*c(3)*d(2), and b(3)*c(2)*c(2). All three terms are 1, so the triple convolution adds up to 3. Hence, a(7) = 3.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^6/((1-x-x^2-x^3)(1-x-x^2-2x^3)(1-x-x^2-3x^3)), {x, 0, 30}], x]

Formula

a(n) = (A000073(n+2) + A103143(n+2))/2 - A077947(n).
a(n) = 3*a(n-1) + a(n-3) - 12*a(n-4) - 3*a(n-5) + 2*a(n-6) + 17*a(n-7) + 11*a(n-8) + 6*a(n-9).
G.f.: x^6/((1 - 2*x)*(1 + x + x^2)*(1 - x - x^2 - x^3)*(1 - x - x^2 - 3*x^3)).

A081577 Pascal-(1,2,1) array read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 7, 7, 1, 1, 10, 22, 10, 1, 1, 13, 46, 46, 13, 1, 1, 16, 79, 136, 79, 16, 1, 1, 19, 121, 307, 307, 121, 19, 1, 1, 22, 172, 586, 886, 586, 172, 22, 1, 1, 25, 232, 1000, 2086, 2086, 1000, 232, 25, 1, 1, 28, 301, 1576, 4258, 5944, 4258, 1576, 301, 28, 1
Offset: 0

Views

Author

Paul Barry, Mar 23 2003

Keywords

Comments

One of a family of Pascal-like arrays. A007318 is equivalent to the (1,0,1)-array. A008288 is equivalent to the (1,1,1)-array. Rows include A016777, A038764, A081583, A081584. Coefficients of the row polynomials in the Newton basis are given by A013610.
As a number triangle, this is the Riordan array (1/(1-x), x(1+2x)/(1-x)). It has row sums A002605 and diagonal sums A077947. - Paul Barry, Jan 24 2005
All entries are == 1 mod 3. - Roger L. Bagula, Oct 04 2008
Row sums are A002605. - Roger L. Bagula, Dec 09 2008
As a number triangle T, T(2n,n)=A069835(n). - Philippe Deléham, Jan 10 2014

Examples

			Square array begins as:
  1,  1,  1,   1,   1, ... A000012;
  1,  4,  7,  10,  13, ... A016777;
  1,  7, 22,  46,  79, ... A038764;
  1, 10, 46, 136, 307, ... A081583;
  1, 13, 79, 307, 886, ... A081584;
From _Roger L. Bagula_, Dec 09 2008: (Start)
As a triangle this begins:
  1;
  1,  1;
  1,  4,   1;
  1,  7,   7,    1;
  1, 10,  22,   10,    1;
  1, 13,  46,   46,   13,    1;
  1, 16,  79,  136,   79,   16,    1;
  1, 19, 121,  307,  307,  121,   19,    1;
  1, 22, 172,  586,  886,  586,  172,   22,   1;
  1, 25, 232, 1000, 2086, 2086, 1000,  232,  25,  1;
  1, 28, 301, 1576, 4258, 5944, 4258, 1576, 301, 28, 1; (End)
		

Crossrefs

Cf. Pascal-(1,a,1) array: A123562 (a=-3), A098593 (=-2), A000012 (a=-1), A007318 (a=0), A008288 (a=1), A081577(a=2), A081578 (a=3), A081579 (a=4), A081580 (a=5), A081581 (a=6), A081582 (a=7), A143683(a=8). [From Roger L. Bagula, Dec 09 2008], Philippe Deléham, Jan 10 2014, Mar 16 2014.

Programs

  • Haskell
    a081577 n k = a081577_tabl !! n !! k
    a081577_row n = a081577_tabl !! n
    a081577_tabl = map fst $ iterate
        (\(us, vs) -> (vs, zipWith (+) (map (* 2) ([0] ++ us ++ [0])) $
                           zipWith (+) ([0] ++ vs) (vs ++ [0]))) ([1], [1, 1])
    -- Reinhard Zumkeller, Mar 16 2014
    
  • Magma
    A081577:= func< n,k | (&+[Binomial(k,j)*Binomial(n-j,k)*2^j: j in [0..n-k]]) >;
    [A081577(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, May 25 2021
    
  • Mathematica
    a[0]={1}; a[1]={1, 1}; a[n_]:= a[n]= 2*Join[{0}, a[n-2], {0}] + Join[{0}, a[n-1]] + Join[a[n-1], {0}]; Table[a[n], {n,0,10}]//Flatten (* Roger L. Bagula, Dec 09 2008 *)
    Table[Hypergeometric2F1[-k, k-n, 1, 3], {n,0,10}, {k,0,n}]//Flatten (* Jean-François Alcover, May 24 2013 *)
  • Sage
    flatten([[hypergeometric([-k, k-n], [1], 3).simplify() for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 25 2021

Formula

Square array T(n, k) defined by T(n, 0) = T(0, k) = 1, T(n, k) = T(n, k-1) + 2*T(n-1, k-1) + T(n-1, k).
Rows are the expansions of (1+2*x)^k/(1-x)^(k+1).
G.f.: 1/(1-x-y-2*x*y). - Ralf Stephan, Apr 28 2004
T(n,k) = Sum_{j=0..n} binomial(k,j-k)*binomial(n+k-j,k)*2^(j-k). - Paul Barry, Oct 23 2006
a(n) = 2*{0, a(n-2), 0} + {0, a(n-1)} + {a(n-1), 0}. - Roger L. Bagula, Dec 09 2008
T(n, k) = Hypergeometric2F1([-k, k-n], [1], 3). - Jean-François Alcover, May 24 2013
The e.g.f. for the n-th subdiagonal, n = 0,1,2,..., equals exp(x)*P(n,x), where P(n,x) is the polynomial Sum_{k = 0..n} binomial(n,k)*(3*x)^k/k!. For example, the e.g.f. for the second subdiagonal is exp(x)*(1 + 6*x + 9*x^2/2) = 1 + 7*x + 22*x^2/2! + 46*x^3/3! + 79*x^4/4! + 121*x^5/5! + .... - Peter Bala, Mar 05 2017
Sum_{k=0..n} T(n,k) = A002605(n). - G. C. Greubel, May 25 2021

A113405 Expansion of x^3/(1 - 2*x + x^3 - 2*x^4) = x^3/( (1-2*x)*(1+x)*(1-x+x^2) ).

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 7, 14, 28, 57, 114, 228, 455, 910, 1820, 3641, 7282, 14564, 29127, 58254, 116508, 233017, 466034, 932068, 1864135, 3728270, 7456540, 14913081, 29826162, 59652324, 119304647, 238609294, 477218588, 954437177, 1908874354, 3817748708
Offset: 0

Views

Author

Paul Barry, Oct 28 2005

Keywords

Comments

A transform of the Jacobsthal numbers. A059633 is the equivalent transform of the Fibonacci numbers.
Paul Curtz, Aug 05 2007, observes that the inverse binomial transform of 0,0,0,1,2,4,7,14,28,57,114,228,455,910,1820,... gives the same sequence up to signs. That is, the extended sequence is an eigensequence for the inverse binomial transform (an autosequence).
The round() function enables the closed (non-recurrence) formula to take a very simple form: see Formula section. This can be generalized without loss of simplicity to a(n) = round(b^n/c), where b and c are very small, incommensurate integers (c may also be an integer fraction). Particular choices of small integers for b and c produce a number of well-known sequences which are usually defined by a recurrence - see Cross Reference. - Ross Drewe, Sep 03 2009

Crossrefs

From Ross Drewe, Sep 03 2009: (Start)
Other sequences a(n) = round(b^n / c), where b and c are very small integers:
A001045 b = 2; c = 3
A007910 b = 2; c = 5
A016029 b = 2; c = 5/3
A077947 b = 2; c = 7
abs(A078043) b = 2; c = 7/3
A007051 b = 3; c = 2
A015518 b = 3; c = 4
A034478 b = 5; c = 2
A003463 b = 5; c = 4
A015531 b = 5; c = 6
(End)

Programs

  • Magma
    [Round(2^n/9): n in [0..40]]; // Vincenzo Librandi, Aug 11 2011
    
  • Maple
    A010892 := proc(n) op((n mod 6)+1,[1,1,0,-1,-1,0]) ; end proc:
    A113405 := proc(n) (2^n-(-1)^n)/9 -A010892(n-1)/3; end proc: # R. J. Mathar, Dec 17 2010
  • Mathematica
    CoefficientList[Series[x^3/(1-2x+x^3-2x^4),{x,0,40}],x] (* or *) LinearRecurrence[{2,0,-1,2},{0,0,0,1},40] (* Harvey P. Dale, Apr 30 2011 *)
  • PARI
    a(n)=2^n\/9 \\ Charles R Greathouse IV, Jun 05 2011
    
  • Python
    def A113405(n): return ((1<Chai Wah Wu, Apr 17 2025

Formula

a(n) = 2a(n-1) - a(n-3) + 2a(n-4).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*A001045(k).
a(n) = Sum_{k=0..n} binomial((n+k)/2,k)*A001045((n-k)/2)*(1+(-1)^(n-k))/2.
a(3n) = A015565(n), a(3n+1) = 2*A015565(n), a(3n+2) = 4*A015565(n). - Paul Curtz, Nov 30 2007
From Paul Curtz, Dec 16 2007: (Start)
a(n+1) - 2a(n) = A131531(n).
a(n) + a(n+3) = 2^n. (End)
a(n) = round(2^n/9). - Ross Drewe, Sep 03 2009
9*a(n) = 2^n + (-1)^n - 3*A010892(n). - R. J. Mathar, Mar 24 2018

Extensions

Edited by N. J. A. Sloane, Dec 13 2007

A033138 a(n) = floor(2^(n+2)/7).

Original entry on oeis.org

1, 2, 4, 9, 18, 36, 73, 146, 292, 585, 1170, 2340, 4681, 9362, 18724, 37449, 74898, 149796, 299593, 599186, 1198372, 2396745, 4793490, 9586980, 19173961, 38347922, 76695844, 153391689, 306783378, 613566756, 1227133513, 2454267026
Offset: 1

Views

Author

Keywords

Comments

Previous name was: "Base 2 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,0".
Here we let p = 3 to produce the above sequence, but p can be an arbitrary natural number. By letting p = 2, 4, 6, 7 we produce A000975, A083593, A195904 and A117302. We denote by U[p,n,m] the number of cases in which the first player in a game of Russian roulette gets killed when p players use a gun with n chambers and m bullets. They never rotate the cylinder after the game starts.
The chambers can be represented by the list {1,2,...,n}. We are going to calculate the following (0), (1),...(t) separately. (0) The first player gets killed when one bullet is in the first chamber and the remaining (m-1)- bullets are in {2,3,...,n}. We have binomial(n-1,m-1) cases for this. (1) The first gets killed when one bullet is in the (p+1)st chamber and the rest of the bullets are in {p+2,..,n}. We have binomial(n-p-1,m-1) cases for this. We continue to calculate and the last is (t), where t = floor((n-m)/p). (t) The first gets killed when one bullet is in the (pt+1)st chamber and the remaining bullets are in {pt+2,...,n}. We have binomial(n-pt-1,m-1) cases for this.
Therefore U[p,n,m] = Sum_{z=0..t} binomial(n-pz-1,m-1), where t = floor((n-m)/p). Let A[p,n] be the number of the cases in which the first player gets killed when p players use a gun with n chambers and the number of bullets can be from 1 to n. Then A[p,n] = Sum_{m=1..n} U[p,n,m]. - Ryohei Miyadera, Tomohide Hashiba, Yuta Nakagawa, Hiroshi Matsui, Jun 04 2006
Partial sums of A077947. - Mircea Merca, Dec 28 2010
a(n+1) is the number of partitions of n into two kinds of part 1 and one kind of part 2. - Joerg Arndt, Mar 10 2015
A078010(n) = b(n+1) - 2*b(n) + b(n-1) where b=A078010. - Michael Somos, Nov 18 2020

Crossrefs

Programs

  • Magma
    [Round((4*2^n-2)/7): n in [1..40]]; // Vincenzo Librandi, Jun 25 2011
    
  • Maple
    seq(iquo(2^n,7),n=3..34); # Zerinvary Lajos, Apr 20 2008
  • Mathematica
    U[p_, n_, m_, v_]:=Block[{t}, t=Floor[(1+p-m+n-v)/p];Sum[Binomial[n-v-p*z,m-1],{z,0,t-1}]]; A[p_,n_,v_]:=Sum[U[p,n,k,v],{k,1,n}]; (* Here we let p = 3 to produce the above sequence, but this code can produce A000975, A083593, A195904, A117302 for p = 2,4,6,7. *) Table[A[3,n,1], {n,1,20}] (* Ryohei Miyadera, Tomohide Hashiba, Yuta Nakagawa, Hiroshi Matsui, Jun 04 2006 *)
  • PARI
    a(n)=2^(n+2)\7 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = 2*a(n-1) + a(n-3) - 2*a(n-4). -John W. Layman
G.f.: 1/((1-x^3)*(1-2*x)); a(n) = sum{k=0..floor(n/3), 2^(n-3*k)}; a(n) = Sum_{k=0..n} 2^k*( cos(2*Pi*(n-k)/3 + Pi/3)/3 + sqrt(3)*sin(2*Pi*(n-k)/3 + Pi/3)/3 + 1/3 ). - Paul Barry, Apr 16 2005
a(n) = floor(2^(n+2)/7). - Gary Detlefs, Sep 06 2010
a(n) = floor((4*2^n - 1)/7) = ceiling((4*2^n - 4)/7) = round((4*2^n - 2)/7) = round((8*2^n - 5)/14); a(n) = a(n-3) + 2^(n-1), n>3. - Mircea Merca, Dec 28 2010
a(n) = 4/7*2^n - 5/21*cos(2/3*Pi*n) + 1/21*3^(1/2)*sin(2/3*Pi*n)-1/3. - Leonid Bedratyuk, May 13 2012

Extensions

Edited by Jeremy Gardiner, Oct 08 2011
New name (using formula form Gary Detlefs) from Joerg Arndt, Mar 10 2015

A078429 Number of integers k among 1..n for which gcd(k,n) is a cube.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 5, 6, 4, 10, 4, 12, 6, 8, 9, 16, 6, 18, 8, 12, 10, 22, 10, 20, 12, 19, 12, 28, 8, 30, 18, 20, 16, 24, 12, 36, 18, 24, 20, 40, 12, 42, 20, 24, 22, 46, 18, 42, 20, 32, 24, 52, 19, 40, 30, 36, 28, 58, 16, 60, 30, 36, 37, 48, 20, 66, 32, 44, 24, 70, 30, 72, 36, 40, 36
Offset: 1

Views

Author

Vladeta Jovovic, Dec 29 2002

Keywords

Crossrefs

Cf. A061020, A206369, A327626 (inv. Mob. Trans.).

Programs

  • Mathematica
    nn = 76; f[list_, i_] := list[[i]]; a = Table[If[IntegerQ[n^(1/3)], 1, 0], {n, 1, nn}]; b =Table[EulerPhi[n], {n, 1, nn}]; Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Feb 25 2015 *)
  • PARI
    a(n) = sum(k=1, n, ispower(gcd(n, k), 3)); \\ Michel Marcus, Feb 25 2015
    
  • PARI
    a(n) = sumdiv(n, d, eulerphi(n/d) * ispower(d, 3)); \\ Daniel Suteu, Jun 27 2018

Formula

a(n) is multiplicative.
G.f. for a(p^n), p a prime, is given by 1/(1+x+x^2)/(1-p*x).
a(2^n) = A077947(n), a(3^n) = A077834(n).
a(p) = p-1, a(p^2) = p*(p-1), a(p^3) = p^3-p^2+1, a(p^4) = (p-1)*(p+1)*(p^2-p+1), ...
Dirichlet g.f.: zeta(s - 1)*zeta(3*s)/zeta(s). - Geoffrey Critzer, Feb 25 2015
a(n) = Sum_{d|n, d is a perfect cube} phi(n/d), where phi(k) is the Euler totient function. Dirichlet convolution of A000010 and A010057. - Daniel Suteu, Jun 27 2018
Sum_{k=1..n} a(k) ~ Pi^4 * n^2 / 315. - Vaclav Kotesovec, Feb 07 2019
Dirichlet convolution of A000027 and A210826. - R. J. Mathar, Jun 05 2020
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} A010057(gcd(n,k)).
a(n) = Sum_{k=1..n} A010057(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)

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

Original entry on oeis.org

0, 0, 1, 1, 2, 6, 11, 23, 52, 108, 229, 493, 1046, 2226, 4751, 10115, 21544, 45912, 97801, 208345, 443882, 945630, 2014547, 4291823, 9143260, 19478724, 41497453, 88405957, 188339582, 401237898, 854795351, 1821051995, 3879561040, 8264999088, 17607716113
Offset: 0

Views

Author

Paul Barry, Jan 24 2005

Keywords

Comments

Diagonal sums of the Pascal-(1,3,1) triangle A081578.

Crossrefs

Programs

Formula

G.f.: 1/(1-x-x^2-3x^3).

Extensions

Name clarified by Michel Marcus, Aug 07 2022

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

Original entry on oeis.org

1, 0, 1, 3, 4, 9, 19, 36, 73, 147, 292, 585, 1171, 2340, 4681, 9363, 18724, 37449, 74899, 149796, 299593, 599187, 1198372, 2396745, 4793491, 9586980, 19173961, 38347923, 76695844, 153391689, 306783379, 613566756, 1227133513, 2454267027, 4908534052
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

For n > 0, a(n) is the number of ways to tile a strip of length n with squares, dominoes, and two colors of trominoes, with the restriction that the first tile cannot be a square. - Greg Dresden and Bora Bursalı, Aug 31 2023

Examples

			a(6) = 19 = A077947(4) + 2*A077947(3) = 9 + 2*5 = 19.
G.f. = 1 + x^2 + 3*x^3 + 4*x^4 + 9*x^5 + 19*x^6 + 36*x^7 + 73*x^8 + ... - _Michael Somos_, Nov 18 2020
		

Crossrefs

Programs

  • GAP
    a:=[1,0,1];; for n in [4..50] do a[n]:=a[n-1]+a[n-2]+2*a[n-3]; od; a; # G. C. Greubel, Jun 28 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x)/(1-x-x^2-2*x^3) )); // G. C. Greubel, Jun 28 2019
    
  • Mathematica
    CoefficientList[Series[(1-x)/(1-x-x^2-2*x^3), {x,0,50}],x]  (* Harvey P. Dale, Mar 17 2011 *)
    LinearRecurrence[{1, 1, 2}, {1, 0, 1}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *)
  • PARI
    Vec((1-x)/(1-x-x^2-2*x^3)+O(x^50)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • PARI
    {a(n) = ([0, 1, 1; 1, 1, 0; 0, 2, 0]^n)[1, 1]}; /* Michael Somos, Nov 18 2020 */
    
  • Sage
    ((1-x)/(1-x-x^2-2*x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 28 2019
    

Formula

a(0)=1, a(1)=0, a(2)=1, a(n) = a(n-1) + a(n-2) + 2*a(n-3) for n > 2. - Philippe Deléham, Sep 19 2006
a(n) + a(n+1) = A122552(n+1). - Philippe Deléham, Sep 25 2006
If p[1]=0, p[2]=1, p[i]=3, (i>2), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n >= 1, a(n)=det A. - Milan Janjic, May 02 2010
For n > 3, a(n) = A077947(n-2) + 2*A077947(n-3), with A077947 beginning (1, 2, 5, 9, 18, 37, ...); "1" has offset 1. - Gary W. Adamson, May 13 2013
a(n) = 2^(n-1) - 3*floor((2^(n-1))/7) - 1, for n >= 1. - Ridouane Oudra, Dec 02 2019
G.f.: (1 - x) / ((1 - 2*x) * (1 + x + x^2)). - Michael Somos, Nov 18 2020

A173593 Numbers having in binary representation exactly two ones in three consecutive digits.

Original entry on oeis.org

3, 5, 6, 11, 13, 22, 27, 45, 54, 91, 109, 182, 219, 365, 438, 731, 877, 1462, 1755, 2925, 3510, 5851, 7021, 11702, 14043, 23405, 28086, 46811, 56173, 93622, 112347, 187245, 224694, 374491, 449389, 748982, 898779, 1497965, 1797558, 2995931, 3595117
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 22 2010

Keywords

Comments

a(2*n-1) = A033129(n+1);
a(3*n-2) = A113836(n+1);
a(6*n-5) = A083713(n);
a(2*n) - a(2*n-1) = A077947(n+1);
a(2*n+1) - a(2*n) = A077947(n).

Examples

			a(10) =   91 =      1011011_2
a(11) =  109 =      1101101_2
a(12) =  182 =     10110110_2
a(13) =  219 =     11011011_2
a(14) =  365 =    101101101_2
a(15) =  438 =    110110110_2
a(16) =  731 =   1011011011_2
a(17) =  877 =   1101101101_2
a(18) = 1462 =  10110110110_2
a(19) = 1755 =  11011011011_2
a(20) = 2925 = 101101101101_2
		

Crossrefs

Cf. A007088.
Bisections A033129, A033120.

Programs

  • Mathematica
    LinearRecurrence[{0, 2, 1, 0, -2}, {3, 5, 6, 11, 13}, 50] (* Jean-François Alcover, Feb 17 2018 *)

Formula

From R. J. Mathar, Feb 24 2010: (Start)
a(n) = 2*a(n-2) + a(n-3) - 2*a(n-5).
G.f.: x*(-3-5*x+2*x^3+4*x^4)/ ((1-x) * (1+x+x^2) * (2*x^2-1)). (End)

A077972 Expansion of 1/(1+x-x^2+2*x^3).

Original entry on oeis.org

1, -1, 2, -5, 9, -18, 37, -73, 146, -293, 585, -1170, 2341, -4681, 9362, -18725, 37449, -74898, 149797, -299593, 599186, -1198373, 2396745, -4793490, 9586981, -19173961, 38347922, -76695845, 153391689, -306783378, 613566757, -1227133513, 2454267026, -4908534053, 9817068105
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Cf. A077947.

Programs

  • GAP
    a:=[1,-1,2];; for n in [4..40] do a[n]:=-a[n-1]+a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, Jun 24 2019
    
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/(1+x-x^2+2*x^3) )); // G. C. Greubel, Jun 24 2019
    
  • Mathematica
    LinearRecurrence[{-1,1,-2}, {1,-1,2}, 40] (* or *) CoefficientList[ Series[1/(1+x-x^2+2*x^3), {x,0,40}], x] (* G. C. Greubel, Jun 24 2019 *)
  • PARI
    Vec(1/(1+x-x^2+2*x^3)+O(x^40)) \\ Charles R Greathouse IV, Sep 27 2012
    
  • Python
    def A077972(n): return -(((4<Chai Wah Wu, Apr 22 2025
  • Sage
    (1/(1+x-x^2+2*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 24 2019
    

Formula

a(n) = (-1)^n * A077947(n).
G.f.: Q(0)/2 , where Q(k) = 1 + 1/(1 - x*(4*k+1 - x + 2*x^2 )/( x*(4*k+3 - x + 2*x^2 ) - 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 09 2013
Showing 1-10 of 20 results. Next