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.

Previous Showing 21-30 of 60 results. Next

A263799 T(n,k)=Number of (n+1)X(k+1) 0..1 arrays with each row and column divisible by 3, read as a binary number with top and left being the most significant bits, and rows and columns lexicographically nonincreasing.

Original entry on oeis.org

2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 7, 3, 4, 4, 4, 7, 7, 4, 4, 5, 4, 14, 7, 14, 4, 5, 5, 5, 14, 17, 17, 14, 5, 5, 6, 5, 25, 18, 61, 18, 25, 5, 6, 6, 6, 25, 56, 130, 130, 56, 25, 6, 6, 7, 6, 41, 66, 494, 616, 494, 66, 41, 6, 7, 7, 7, 41, 218, 1435, 4991, 4991, 1435, 218, 41, 7, 7, 8, 7, 63, 272
Offset: 1

Views

Author

R. H. Hardin, Oct 26 2015

Keywords

Comments

Table starts
.2.2..3...3.....4.......4........5.........5.........6..........6.........7
.2.2..3...3.....4.......4........5.........5.........6..........6.........7
.3.3..7...7....14......14.......25........25........41.........41........63
.3.3..7...7....17......18.......56........66.......218........272.......798
.4.4.14..17....61.....130......494......1435......4917......13962.....41366
.4.4.14..18...130.....616.....4991.....30130....185795....1022105...5241463
.5.5.25..56...494....4991....62904....760671...8468941...90476206.850301770
.5.5.25..66..1435...30130...760671..20141827.445862545.9910247963
.6.6.41.218..4917..185795..8468941.445862545
.6.6.41.272.13962.1022105.90476206

Examples

			Some solutions for n=5 k=4
..1..1..0..0..0....1..1..1..1..0....1..1..0..0..0....1..1..0..0..0
..1..1..0..0..0....1..1..1..1..0....1..1..0..0..0....1..1..0..0..0
..1..1..0..0..0....1..1..1..1..0....1..1..0..0..0....1..1..0..0..0
..1..1..0..0..0....1..1..1..1..0....1..1..0..0..0....1..1..0..0..0
..0..0..1..1..0....1..1..1..1..0....0..0..0..0..0....1..1..0..0..0
..0..0..1..1..0....1..1..1..1..0....0..0..0..0..0....1..1..0..0..0
		

Crossrefs

Column 1 is A005578(n+1).

Formula

Empirical for column k:
k=1: a(n) = a(n-1) +a(n-2) -a(n-3)
k=2: a(n) = a(n-1) +a(n-2) -a(n-3)
k=3: a(n) = a(n-1) +3*a(n-2) -3*a(n-3) -3*a(n-4) +3*a(n-5) +a(n-6) -a(n-7)
k=4: [order 19]
k=5: [order 37]
k=6: [order 83]

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

Original entry on oeis.org

2, 1, 3, 4, 9, 16, 33, 64, 129, 256, 513, 1024, 2049, 4096, 8193, 16384, 32769, 65536, 131073, 262144, 524289, 1048576, 2097153, 4194304, 8388609, 16777216, 33554433, 67108864, 134217729, 268435456, 536870913, 1073741824, 2147483649
Offset: 0

Views

Author

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

Keywords

Comments

Equals row sums of triangle A178616 but replacing the 2 with a 1. - Gary W. Adamson, May 30 2010
Inverse binomial transform is (-1)^n * a(n). - Michael Somos, Jun 03 2014
An autosequence of the second kind whose first kind companion is A005578. - Jean-François Alcover, Mar 18 2020

Examples

			G.f. = 2 + x + 3*x^2 + 4*x^3 + 9*x^4 + 16*x^5 + 33*x^6 + 64*x^7 + 129*x^8 + ...
		

Crossrefs

Cf. A178616. - Gary W. Adamson, May 30 2010

Programs

  • GAP
    Concatenation([2], List([1..40], n-> (2^n +1 +(-1)^n)/2));  # G. C. Greubel, Oct 21 2019
  • Magma
    [2] cat [(2^n +1 +(-1)^n)/2: n in [1..40]]; // G. C. Greubel, Oct 21 2019
    
  • Maple
    spec:= [S,{S=Union(Sequence(Prod(Sequence(Z),Z)), Sequence(Prod(Z,Z)))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    seq(`if`(n=0, 2, (2^n +1 +(-1)^n)/2), n=0..40); # G. C. Greubel, Oct 21 2019
  • Mathematica
    a[n_]:= (2^n +1 +(-1)^n +Boole[n==0])/2; (* Michael Somos, Jun 03 2014 *)
    a[n_]:= If[ n<0, (1-n)! SeriesCoefficient[Sinh[x] +Exp[x/2], {x,0,1-n}], n! SeriesCoefficient[Cosh[x](1+Exp[x]), {x,0,n}]]; (* Michael Somos, Jun 04 2014 *)
    LinearRecurrence[{2,1,-2}, {2,1,3,4}, 40] (* G. C. Greubel, Oct 21 2019 *)
  • PARI
    {a(n)=(2^n+1+(-1)^n+(n==0))/2}; /* Michael Somos, Jun 03 2014 */
    
  • Sage
    [2]+[(2^n +1 +(-1)^n)/2 for n in (1..40)] # G. C. Greubel, Oct 21 2019
    

Formula

G.f.: (2-3*x-x^2+x^3)/((1-x^2)*(1-2*x)).
a(n) = a(n-1) + 2*a(n-2) - 1.
a(n) = 2^(n-1) + Sum_{alpha=RootOf(-1+z^2)} alpha^(-n)/2.
From Paul Barry, Sep 18 2003: (Start)
a(n) = (2^n + 1 + (-1)^n + 0^n)/2.
E.g.f.: cosh(x)*(1+exp(x)). (End)
a(2*n + 1) = 4 * a(2*n - 1) for all n in Z. a(2*n + 2) = 3*a(2*n + 1) + 2*a(2*n) if n>0. - Michael Somos, Jun 04 2014

Extensions

More terms from James Sellers, Jun 05 2000

A129761 First differences of Fibbinary numbers (A003714).

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 6, 1, 1, 2, 1, 11, 1, 1, 2, 1, 3, 1, 1, 22, 1, 1, 2, 1, 3, 1, 1, 6, 1, 1, 2, 1, 43, 1, 1, 2, 1, 3, 1, 1, 6, 1, 1, 2, 1, 11, 1, 1, 2, 1, 3, 1, 1, 86, 1, 1, 2, 1, 3, 1, 1, 6, 1, 1, 2, 1, 11, 1, 1, 2, 1, 3, 1, 1, 22, 1, 1, 2, 1, 3, 1, 1, 6, 1, 1, 2, 1, 171, 1, 1, 2, 1, 3, 1, 1, 6
Offset: 0

Views

Author

Ralf Stephan, May 14 2007

Keywords

Comments

Theorem: If the Zeckendorf representation of M ends with exactly k >= 0 zeros, ...10^k, then a(n) = ceiling(2^k/3). Also, if the Zeckendorf representation of n (A014417(n)) is even then a(n) is given by A319952, otherwise a(n) = 1. - Jeffrey Shallit and N. J. A. Sloane, Oct 03 2018

Crossrefs

Programs

  • Maple
    with(combinat): F:=fibonacci:
    A072649:= proc(n) local j; global F; for j from ilog[(1+sqrt(5))/2](n)
           while F(j+1)<=n do od; (j-1); end:
    A003714 := proc(n) global F; option remember; if(n < 3) then RETURN(n); else RETURN((2^(A072649(n)-1))+A003714(n-F(1+A072649(n)))); fi; end:
    A129761 := n -> A003714(n+1)-A003714(n):
    [seq(A129761(n),n=0..120)]; # N. J. A. Sloane, Oct 03 2018, borrowing programs from other sequences
  • Mathematica
    Differences[Select[Range[600], !MemberQ[Partition[IntegerDigits[#, 2], 2, 1], {1, 1}] &]] (* Harvey P. Dale, Jul 17 2011 *)

Formula

a(n) = A005578(A035614(n)). - Alan Michael Gómez Calderón, Nov 01 2023

Extensions

a(0)=1 added by N. J. A. Sloane, Oct 02 2018

A131271 Triangular array T(n,k), n>=0, k=1..2^n, read by rows in bracketed pairs such that highest ranked element is bracketed with lowest ranked.

Original entry on oeis.org

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

Views

Author

J. Demongeot (Jacques.Demongeot(AT)imag.fr), Jun 24 2007

Keywords

Comments

In a knockout competition with 2^n players, arranging the competition brackets (see Wikipedia) in T(n,k) order, where T(n,k) is the rank of the k-th player, ensures that highest ranked players cannot meet until the later stages of the competition. None of the top 2^p ranked players can meet earlier than the p-th from last round of the competition. At the same time the top ranked players in each match meet the lowest ranked player possible consistent with this rule. The sequence for the top ranked players meeting the highest ranked player possible is A049773. - Colin Hall, Feb 28 2012
Ranks in natural order of 2^n increasing real numbers appearing in limit cycles of interval iterations, or Median Spiral Order. [See the works by Demongeot & Waku]
From Andrey Zabolotskiy, Dec 06 2024 (Start):
For n>0, row n-1 is the permutation relating row n of Kepler's tree of fractions with row n of the left half of Stern-Brocot tree. Specifically, if K_n(k) [resp. SB_n(k)] is the k-th fraction in the n-th row of A294442 [resp. A057432], where 1/2 is in row 1 and k=1..2^(n-1), then K_n(k) = SB_n(T(n-1, k)).
The inverse permutation is row n of A088208.
When 1 is subtracted from each term, rows 3-5 become A240908, A240909, A240910. (End)

Examples

			Triangle begins:
1;
1,  2;
1,  4, 2, 3;
1,  8, 4, 5, 2,  7, 3,  6;
1, 16, 8, 9, 4, 13, 5, 12, 2, 15, 7, 10, 3, 14, 6, 11;
...
		

Crossrefs

Cf. A005578 (last elements in rows), A155944 (T(n,2^(n-1)) for n>0).

Programs

  • Maple
    T:= proc(n,k) option remember;
          `if`({n, k} = {1}, 1,
          `if`(irem(k, 2)=1, T(n-1, (k+1)/2), 2^(n-1)+1 -T(n-1, k/2)))
        end:
    seq(seq(T(n, k), k=1..2^(n-1)), n=1..7); # Alois P. Heinz, Feb 28 2012, with offset 1
  • Mathematica
    T[0, 1] = 1;
    T[n_, k_] := T[n, k] = If[Mod[k, 2] == 1, T[n, (k + 1)/2], 2^n + 1 - T[n, k/2]];
    Table[T[n, k], {n, 0, 6}, {k, 2^n}] // Flatten (* Jean-François Alcover, May 31 2018, after Alois P. Heinz *)

Formula

T(0,1) = 1, T(n,2k-1) = T(n-1,k), T(n,2k) = 2^n+1 - T(n-1,k).
T(n,1) = 1; for 1 < k <= 2^n, T(n,k) = 1 + (2^n)/m - T(n,k-m), where m = A006519(k-1). - Mathew Englander, Jun 20 2021

Extensions

Edited (with new name from Colin Hall) by Andrey Zabolotskiy, Dec 06 2024

A241138 T(n,k)=Number of nXk 0..2 arrays with no element equal to the same number of vertical neighbors as horizontal neighbors, with new values 0..2 introduced in row major order.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 5, 5, 2, 3, 17, 24, 17, 3, 6, 56, 152, 152, 56, 6, 11, 195, 935, 1670, 935, 195, 11, 22, 691, 6150, 19619, 19619, 6150, 691, 22, 43, 2476, 40504, 238607, 434444, 238607, 40504, 2476, 43, 86, 8941, 269481, 2939027, 9958520, 9958520, 2939027
Offset: 1

Views

Author

R. H. Hardin, Apr 16 2014

Keywords

Comments

Table starts
..0.....1........1..........2.............3..............6..............11
..1.....2........5.........17............56............195.............691
..1.....5.......24........152...........935...........6150...........40504
..2....17......152.......1670.........19619.........238607.........2939027
..3....56......935......19619........434444........9958520.......230889822
..6...195.....6150.....238607.......9958520......428855442.....18742128588
.11...691....40504....2939027.....230889822....18742128588...1546330012544
.22..2476...269481...36470565....5392206371...825015103540.128518782423157
.43..8941..1797120..454209512..126282435834.36426835430201
.86.32393.12006500.5665536042.2961490680709

Examples

			Some solutions for n=4 k=4
..0..1..1..1....0..1..2..0....0..1..0..2....0..1..2..0....0..1..0..1
..0..0..1..0....0..1..2..0....0..1..0..2....0..1..2..0....0..1..0..1
..0..2..2..0....2..2..1..1....2..1..1..1....0..2..1..0....2..2..0..1
..1..1..1..1....0..0..2..2....2..1..0..0....0..2..1..0....0..0..2..2
		

Crossrefs

Column 1 is A005578(n-2)

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -2*a(n-3) for n>4
k=2: a(n) = 4*a(n-1) +2*a(n-2) -11*a(n-3) -6*a(n-4) +8*a(n-5) for n>6
k=3: [order 26] for n>27

A354667 Triangle read by rows: T(n,k) is the number of tilings of an (n+4*k) X 1 board using k (1,1;5)-combs and n-k squares.

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 0, 2, 0, 1, 0, 4, 0, 1, 1, 1, 6, 0, 3, 0, 1, 2, 9, 0, 9, 0, 1, 1, 3, 12, 5, 18, 0, 4, 0, 1, 4, 16, 12, 36, 0, 16, 0, 1, 1, 5, 20, 25, 60, 15, 40, 0, 5, 0, 1, 6, 25, 42, 100, 42, 100, 0, 25, 0, 1, 1, 7, 31, 66, 150, 112, 200
Offset: 0

Views

Author

Michael A. Allen, Jun 05 2022

Keywords

Comments

This is the m=2, t=5 member of a two-parameter family of triangles such that T(n,k) is the number of tilings of an (n+(t-1)*k) X 1 board using k (1,m-1;t)-combs and n-k unit square tiles. A (1,g;t)-comb is composed of a line of t unit square tiles separated from each other by gaps of width g.
T(2*j+r-4*k,k) is the coefficient of x^k in (f(j,x))^(2-r)*(f(j+1,x))^r for r=0,1, where f(n,x) is a (1,5)-bonacci polynomial defined by f(n,x)=f(n-1,x)+x*f(n-5,x)+delta(n,0) where f(n<0,x)=0.
T(n+8-4*k,k) is the number of subsets of {1,2,...,n} of size k such that no two elements in a subset differ by 2, 4, 6, or 8.

Examples

			Triangle begins:
  1;
  1,   0;
  1,   0,   1;
  1,   0,   2,   0;
  1,   0,   4,   0,   1;
  1,   1,   6,   0,   3,   0;
  1,   2,   9,   0,   9,   0,   1;
  1,   3,  12,   5,  18,   0,   4,   0;
  1,   4,  16,  12,  36,   0,  16,   0,   1;
  1,   5,  20,  25,  60,  15,  40,   0,   5,   0;
  1,   6,  25,  42, 100,  42, 100,   0,  25,   0,   1;
  1,   7,  31,  66, 150, 112, 200,  35,  75,   0,   6,   0;
...
		

Crossrefs

Row sums are A005578.
Sums over k of T(n-4*k,k) are A224811.
Other members of the family of triangles: A007318 (m=1,t=2), A059259 (m=2,t=2), A350110 (m=3,t=2), A350111 (m=4,t=2), A350112 (m=5,t=2), A354665 (m=2,t=3), A354666 (m=2,t=4), A354668 (m=3,t=3).
Other triangles related to tiling using combs: A059259, A123521, A157897, A335964.

Programs

  • Mathematica
    T[n_,k_]:=If[k<0 || n
    				

Formula

T(n,k) = T(n-1,k) + T(n-1,k-1) - T(n-2,k-1) + 2*T(n-2,k-2) + T(n-3,k-1) - T(n-3,k-2) - 2*T(n-3,k-3) - T(n-4,k-1) + T(n-4,k-2) + T(n-4,k-3) - T(n-4,k-4) + T(n-5,k-1) - 2*T(n-5,k-3) + T(n-5,k-5) + delta(n,0)*delta(k,0) - delta(n,1)*delta(k,1) - delta(n,2)*delta(k,2) - delta(n,3)*(delta(k,1) - delta(k,3)) with T(n,k<0) = T(n
T(n,0) = 1.
T(n,n) = delta(n mod 2,0).
T(n,1) = n-4 for n>3.
T(2*j+r,2*j-1) = 0 for j>0, r=-1,0,1,2.
T(n,2*j) = C(n/2,j)^2 for j>0 and n even and 2*j <= n <= 2*j+8.
T(n,2*j) = C((n-1)/2,j)*C((n+1)/2,j) for j>0 and n odd and 2*j < n < 2*j+8.
T(2*j+3*p,2*j-p) = C(j+3,4)^p for j>0 and p=0,1,2.
G.f. of row sums: (1-x-x^2)/(1-2*x-x^2+2*x^3).
G.f. of sums of T(n-4*k,k) over k: (1-x^5-x^7-x^10+x^15)/(1-x-x^5+x^6-x^7+x^8-x^9-2*x^10+x^11-x^12+2*x^15-x^16+2*x^17+x^20-x^25).
T(n,k) = T(n-1,k) + T(n-1,k-1) for n>=4*k+1 if k>=0.

A085423 a(n) = floor(log_2(3n)).

Original entry on oeis.org

1, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 1

Author

Ralf Stephan, Jun 30 2003

Keywords

Comments

Length of the symmetric signed digit expansion of n with q=2 (i.e., the length of the representation of n in the (-1,0,1)_2 number system).
n occurs A001045(n) times. - Amiram Eldar, Feb 18 2024

Crossrefs

Programs

Formula

a(n) = A000523(A008585(n)). - Reinhard Zumkeller, Mar 16 2013
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) (A002162). - Amiram Eldar, Feb 18 2024

A072176 Unimodal analog of Fibonacci numbers: a(n+1) = Sum_{k=0..floor(n/2)} A071922(n-k,k).

Original entry on oeis.org

1, 1, 2, 3, 5, 9, 16, 30, 56, 106, 201, 382, 727, 1384, 2636, 5021, 9565, 18222, 34715, 66137, 126001, 240052, 457338, 871304, 1659978, 3162533, 6025150, 11478911, 21869232, 41664520, 79377833, 151227961, 288114394, 548905795
Offset: 1

Author

Michele Dondi (bik.mido(AT)tiscalinet.it), Jun 30 2002

Keywords

Comments

Based on the observation that F_{n+1} = Sum_{k} binomial (n-k,k). In both cases the sum is extended to 0<=2k<=n.

Crossrefs

Programs

  • GAP
    a:=[1,1,2,3,5];; for n in [6..40] do a[n]:=2*a[n-1]+a[n-2] -2*a[n-3]-a[n-4]+a[n-5]; od; a; # G. C. Greubel, Aug 26 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( x*(1-x-x^2)/((1-x)*(1-x-2*x^2+x^4)) )); // G. C. Greubel, Aug 26 2019
    
  • Maple
    seq(coeff(series(x*(1-x-x^2)/((1-x)*(1-x-2*x^2+x^4)), x, n+1), x, n), n = 1..40); # G. C. Greubel, Aug 26 2019
  • Mathematica
    Rest@CoefficientList[ Series[x(1-x-x^2)/((1-x)(1-x-2x^2+x^4)), {x, 0, 40}], x] (* or *) LinearRecurrence[{2,1,-2,-1,1}, {1,1,2,3,5}, 40] (* Harvey P. Dale, Jun 23 2011 *)
  • PARI
    my(x='x+O('x^40)); Vec(x*(1-x-x^2)/((1-x)*(1-x-2*x^2+x^4))) \\ G. C. Greubel, Aug 26 2019
    
  • Sage
    def A072176_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1-x-x^2)/((1-x)*(1-x-2*x^2+x^4)) ).list()
    a=A072176_list(40); a[1:] # G. C. Greubel, Aug 26 2019
    

Formula

G.f.: x*(1-x-x^2)/((1-x)*(1-x-2*x^2+x^4)).
a(1)=1, a(2)=1, a(3)=2, a(4)=3, a(5)=5, a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). - Harvey P. Dale, Jun 23 2011

A073097 Let x(n) denote the number of 4's among the n first elements of the continued fraction for sum k>=0 1/2^(2^k) (A007400), y(n) the number of 6's and z(n) the number of 2's. Then a(n)=x(n)-y(n)-z(n)-1.

Original entry on oeis.org

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

Author

Benoit Cloitre, Aug 18 2002

Keywords

Comments

The positive sequence has a(n) = mod(A000120(A047849(n)),2) = mod(A000120(A078008(2n)),2) - Paul Barry, Jan 13 2005
Cosh(1) in 'reflected factorial' base is 1.10101010101010101010101010101010101010101010... - see A091337 for Sinh(1) (from Robert G. Wilson v, May 04 2005)

Programs

  • PARI
    up_to = 65537;
    A007400(n) = if(n<3, [0, 1, 4][n+1], if(n%8==1, A007400((n+1)/2), if(n%8==2, A007400((n+2)/2), [2, 0, 0, 2, 4, 4, 6, 4, 2, 0, 0, 2, 4, 6, 4, 4][(n%16)+1]))); \\ From A007400
    A073097list(up_to) = { my(v=vector(up_to), x4=0, y6=0, z2=0, k); for(n=1, up_to, k=A007400(n); if(2==k,z2++,if(4==k,x4++,if(6==k,y6++))); v[n] = (x4-y6-z2-1)); (v); };
    v073097 = A073097list(up_to);
    A073097(n) = if(!n,-1,v073097[n]); \\ Antti Karttunen, Jan 12 2019

Formula

It seems that a(2k+1) = 0 for k>=1.
The positive sequence (assuming the pattern continues) has g.f. (1+x-x^2)/((1-x)(1-x^2)), with a(n)=(1-(1)^n)/2+0^n = mod((1+A001045(n+1))/2, 2) = mod(A005578, 2). The partial sums are A008619(n+1). - Paul Barry, Apr 28 2004

A099754 a(n) = (3^n +1)/2 + 2^n.

Original entry on oeis.org

2, 4, 9, 22, 57, 154, 429, 1222, 3537, 10354, 30549, 90622, 269817, 805354, 2407869, 7207222, 21588897, 64701154, 193972389, 581655022, 1744440777, 5232273754, 15694724109, 47079978022, 141231545457, 423677859154, 1271000023029
Offset: 0

Author

Miklos Kristof, Nov 11 2004

Keywords

Comments

Let b(0)=1, b(n) = A005578(n-1) = {1,1,2,3,6,11,22,43,86,171,342, ...} then a(n) = Sum_{k=0..n+1} C(n+1,k)*b(k).
Binomial transform of A135351. - R. J. Mathar, Aug 05 2009

Examples

			a(6) = (3^6+1)/2 + 2^6 = 365+64 = 429.
a(6) = 1 + 7*1 + 21*1 + 35*2 + 35*3 + 21*6 + 7*11 + 1*22 = 429.
		

Crossrefs

Cf. A005578.

Programs

  • GAP
    List([0..30], n-> (3^n +2^(n+1) +1)/2); # G. C. Greubel, Sep 03 2019
  • Magma
    [(3^n +2^(n+1) +1)/2: n in [0..30]]; // G. C. Greubel, Sep 03 2019
    
  • Maple
    seq((3^n +2^(n+1) +1)/2, n=0..30); # G. C. Greubel, Sep 03 2019
  • Mathematica
    Table[(3^n +2^(n+1) +1)/2, {n,0,30}] (* G. C. Greubel, Sep 03 2019 *)
    LinearRecurrence[{6,-11,6},{2,4,9},30] (* Harvey P. Dale, May 23 2021 *)
  • PARI
    a(n) = (3^n+1)/2 + 2^n; \\ Michel Marcus, Aug 15 2013
    
  • Sage
    [(3^n +2^(n+1) +1)/2 for n in (0..30)] # G. C. Greubel, Sep 03 2019
    

Formula

a(n) = (3^n + 2^(n+1) + 1)/2.
G.f.: (2-8*x+7*x^2)/((1-x)*(1-2*x)*(1-3*x)). - Jaume Oliver Lafont, Mar 06 2009
a(n) = A007051(n) + A000079(n). - Michel Marcus, Aug 15 2013
E.g.f.: (exp(x) + 2*exp(2*x) + exp(3*x))/2. - G. C. Greubel, Sep 03 2019

Extensions

Corrected and extended by T. D. Noe, Nov 07 2006
Previous Showing 21-30 of 60 results. Next