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

A155701 a(n) = (4^n + 8)/3.

Original entry on oeis.org

3, 4, 8, 24, 88, 344, 1368, 5464, 21848, 87384, 349528, 1398104, 5592408, 22369624, 89478488, 357913944, 1431655768, 5726623064, 22906492248, 91625968984, 366503875928, 1466015503704, 5864062014808, 23456248059224, 93824992236888, 375299968947544
Offset: 0

Views

Author

Paul Curtz, Jan 25 2009

Keywords

Programs

Formula

a(n) = 3 + A002450(n).
a(n) = 5*a(n-1) - 4*a(n-2) = 4*a(n-1) - 8.
a(n) = A154879(2n) = A154890(2n).
a(n+1) - a(n) = A000302(n).
a(n+1) = 4*A047849(n) = 4*A078008(2n).
G.f.: (3-11*x)/((4*x-1)*(x-1)). - R. J. Mathar, Jul 23 2009

Extensions

Edited and extended by R. J. Mathar, Jul 23 2009

A213526 a(n) = 3*n AND n, where AND is the bitwise AND operator.

Original entry on oeis.org

0, 1, 2, 1, 4, 5, 2, 5, 8, 9, 10, 1, 4, 5, 10, 13, 16, 17, 18, 17, 20, 21, 2, 5, 8, 9, 10, 17, 20, 21, 26, 29, 32, 33, 34, 33, 36, 37, 34, 37, 40, 41, 42, 1, 4, 5, 10, 13, 16, 17, 18, 17, 20, 21, 34, 37, 40, 41, 42, 49, 52, 53, 58, 61, 64, 65, 66, 65, 68
Offset: 0

Views

Author

Alex Ratushnyak, Jun 13 2012

Keywords

Comments

Indices of 1's: A007583(n),
indices of 2's: A047849(n+1),
indices of 4's: A039301(n+2),
indices of 5's: A153643(n+3),
indices of 8's: A155701(n+2),
indices of 9's: A155701(n+2)+1 = A163868(n+2),
indices of 10's: A153643(n+4)+3^((n+1) mod 2),
indices of 13's: A039301(n+3)+3,
indices of 16's: A039301(n+3)+4,
indices of 17's: 17, 19, 27, 49, 51, 91, 177, 179, 347, 689, 691, 1371, 2737, 2739, 5467, 10929, 10931, 21851, 43697, 43699, 87387, 174769, 174771, 349531, 699057, 699059, 1398107, 2796209, 2796211, 5592411, 11184817, 11184819, 22369627, 44739249, 44739251, 89478491, ...
indices of 18's: A039301(n+3)+6,
n's such that a(n)<3: A005578, except the first term.

Programs

  • Maple
    a:= proc(n) local i, k, m, r;
          k, m, r:= n, 3*n, 0;
          for i from 0 while (m>0 or k>0) do
            r:= r +2^i* irem(m, 2, 'm') *irem(k, 2, 'k')
          od; r
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Jun 22 2012
  • Mathematica
    Table[BitAnd[n, 3*n], {n, 0, 68}] (* Arkadiusz Wesolowski, Jun 23 2012 *)
  • PARI
    a(n)=bitand(n,3*n) \\ Charles R Greathouse IV, Feb 05 2013
  • Python
    for n in range(99):
        print(3*n & n, end=',')
    

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

Original entry on oeis.org

1, 1, 3, 7, 19, 51, 143, 407, 1179, 3451, 10183, 30207, 89939, 268451, 802623, 2402407, 7196299, 21567051, 64657463, 193885007, 581480259, 1744091251, 5231574703, 15693326007, 47077181819, 141225953051, 423666674343
Offset: 0

Views

Author

Paul Barry, Sep 02 2003

Keywords

Comments

Binomial transform of A047849 (with interpolated zeros, 1,0,2,0,6,0,...). Binomial transform is A087433.

Crossrefs

First differences of A093379.

Programs

  • Mathematica
    CoefficientList[Series[1+x (1-x-4x^2)/((1+x)(1-2x)(1-3x)),{x,0,30}],x] (* or *) LinearRecurrence[{4,-1,-6},{1,1,3,7},30] (* Harvey P. Dale, Aug 23 2017 *)
  • PARI
    Vec((x-1)*(2*x^2+2*x-1)/((1+x)*(1-2*x)*(1-3*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012, corrected Nov 27 2014

Formula

a(n) = (-1)^n/6+2^n/3+3^n/6, n>0.
For n>4, a(n) = 6*a(n-1) - 9*a(n-2) - 4*a(n-3) + 12*a(n-4). - Gary W. Adamson, Jun 14 2006

A094233 Number of closed walks of length n at a vertex of the cyclic graph on 9 nodes C_9.

Original entry on oeis.org

1, 0, 2, 0, 6, 0, 20, 0, 70, 2, 252, 22, 924, 156, 3432, 910, 12870, 4760, 48622, 23256, 184796, 108528, 705894, 490314, 2708204, 2163150, 10430500, 9373652, 40313160, 40060078, 156305070, 169345560, 607812102, 709645552, 2369918628, 2952780320
Offset: 0

Views

Author

Herbert Kociemba, May 29 2004

Keywords

Comments

In general, a(n,m) = (2^n/m)*Sum_{k=0..m-1} cos(2*Pi*k/m)^n gives the number of closed walks of length n at a vertex of the cyclic graph on m nodes C_m.

Crossrefs

Programs

  • Mathematica
    f[n_] := FullSimplify[ TrigToExp[ 2^n/9 Sum[ Cos[2Pi*k/9]^n, {k, 0, 8}]]]; Table[ f[n], {n, 0, 40}] (* Robert G. Wilson v, Jun 01 2004 *)

Formula

a(n) = (2^n/9)*Sum_{k=0..8} cos(2*Pi*k/9)^n.
G.f.: -(x-1)*(x^3+3*x^2-1)/((2*x-1)*(x+1)*(x^3-3*x^2+1)). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009
9*a(n) = 2*(-1)^n +2^n +6*(-1)^n*A188048(n). - R. J. Mathar, Nov 03 2020

Extensions

More terms from Robert G. Wilson v, Jun 01 2004

A097165 Expansion of (1-3x)/((1-x)(1-4x)(1-5x)).

Original entry on oeis.org

1, 7, 41, 227, 1221, 6447, 33601, 173467, 889181, 4533287, 23015961, 116477907, 587981941, 2962279327, 14900875121, 74862289547, 375743103501, 1884442140567, 9445117195081, 47317211944387, 236952563597861
Offset: 0

Views

Author

Paul Barry, Jul 30 2004

Keywords

Comments

Partial sums of A085351. Convolution of A034478 and 4^n. Convolution of A047849 and 5^n. a(n)=A097162(2n+1)/3. Third binomial transform of A097164.

Programs

  • Mathematica
    CoefficientList[Series[(1-3x)/((1-x)(1-4x)(1-5x)),{x,0,30}],x] (* or *) LinearRecurrence[{10,-29,20},{1,7,41},30] (* Harvey P. Dale, Jan 24 2012 *)

Formula

a(n)=5*5^n/2-4*4^n/3-1/6; a(n)=sum{k=0..n, (5^k+1)4^(n-k)/2}; a(n)=sum{k=0..n, (4^k+2)5^(n-k)/3}; a(n)=10a(n-1)-29a(n-2)+20a(n-3).

A123490 Triangle whose k-th column satisfies a(n) = (k+3)*a(n-1)-(k+2)*a(n-2).

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 8, 5, 2, 1, 16, 14, 6, 2, 1, 32, 41, 22, 7, 2, 1, 64, 122, 86, 32, 8, 2, 1, 128, 365, 342, 157, 44, 9, 2, 1, 256, 1094, 1366, 782, 260, 58, 10, 2, 1, 512, 3281, 5462, 3907, 1556, 401, 74, 11, 2, 1, 1024, 9842, 21846, 19532, 9332, 2802, 586, 92, 12, 2, 1
Offset: 0

Views

Author

Paul Barry, Oct 01 2006

Keywords

Examples

			Triangle begins
     1;
     2,    1;
     4,    2,     1;
     8,    5,     2,     1;
    16,   14,     6,     2,    1;
    32,   41,    22,     7,    2,    1;
    64,  122,    86,    32,    8,    2,   1;
   128,  365,   342,   157,   44,    9,   2,  1;
   256, 1094,  1366,   782,  260,   58,  10,  2,  1;
   512, 3281,  5462,  3907, 1556,  401,  74, 11,  2, 1;
  1024, 9842, 21846, 19532, 9332, 2802, 586, 92, 12, 2, 1;
		

Crossrefs

Columns include A000079, A007051, A047849, A047850, A047851.
Cf. A047848, A103439 (row sums), A123491 (diagonal sums).

Programs

  • Magma
    [((k+2)^(n-k) +k)/(k+1): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 15 2021
    
  • Mathematica
    Table[((k+2)^(n-k) +k)/(k+1), {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 14 2017 *)
  • PARI
    for(n=0, 10, for(k=0,n, print1(((k+2)^(n-k)+k)/(k+1), ", "))) \\ G. C. Greubel, Oct 14 2017
    
  • Sage
    flatten([[((k+2)^(n-k) +k)/(k+1) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 15 2021

Formula

Column k has g.f.: x^k*(1-x(1+k))/((1-x)*(1-x(2+k))).
T(n,k) = ((k+2)^(n-k) + k)/(k+1), for 0 <= k <= n.
Sum_{k=0..n} T(n, k) = A103439(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A123491(n).

A210803 Triangle of coefficients of polynomials u(n,x) jointly generated with A210804; see the Formula section.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 8, 10, 3, 1, 22, 37, 21, 5, 1, 63, 125, 100, 45, 8, 1, 185, 409, 410, 260, 88, 13, 1, 550, 1321, 1562, 1240, 598, 169, 21, 1, 1644, 4238, 5706, 5331, 3258, 1319, 315, 34, 1, 4925, 13534, 20284, 21507, 15651, 8071, 2776, 578, 55, 1
Offset: 1

Views

Author

Clark Kimberling, Mar 27 2012

Keywords

Comments

Row n starts with 1 and ends with F(n), where F=A000045 (Fibonacci numbers).
Column 1: 1,1,1,1,1,1,1,1,1,1,1,...
Column 2: A047849
Row sums: A003462
Alternating row sums: 1,0,0,0,0,0,0,0,0,...
For a discussion and guide to related arrays, see A208510.
Essentially the same triangle as (1, 0, 3, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Jul 11 2012

Examples

			First five rows:
1
1...1
1...3....2
1...8....10...3
1...22...37...21...5
First three polynomials u(n,x): 1, 1 + x, 1 + 3x + 2x^2.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + (x + j)*v[n - 1, x] + c;
    d[x_] := h + x; e[x_] := p + x;
    v[n_, x_] := d[x]*u[n - 1, x] + e[x]*v[n - 1, x] + f;
    j = 0; c = 0; h = -1; p = 3; f = 0;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A210803 *)
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A210804 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]   (* A047849 *)
    Table[v[n, x] /. x -> 1, {n, 1, z}]   (* A000302 *)
    Table[u[n, x] /. x -> -1, {n, 1, z}]  (* A000007 *)
    Table[v[n, x] /. x -> -1, {n, 1, z}]  (* A000007 *)

Formula

u(n,x)=u(n-1,x)+x*v(n-1,x)+1,
v(n,x)=(x-1)*u(n-1,x)+(x+3)*v(n-1,x),
where u(1,x)=1, v(1,x)=1.
T(n,k) = 4*T(n-1,k) + T(n-1,k-1) - 3*T(n-2,k) - 2*T(n-2,k-1) + T(n-2,k-2), T(1,0) = T(2,0) = T(2,1) = T(3,0) = 1, T(3,1) = 3, T(3,2) = 2, T(n,k) = 0 if k<0 or if k >= n. - Philippe Deléham, Jul 11 2012
G.f.: (-1+3*x)*x*y/(-1+4*x-3*x^2-2*x^2*y+x*y+x^2*y^2). - R. J. Mathar, Aug 12 2015

A210804 Triangle of coefficients of polynomials v(n,x) jointly generated with A210803; see the Formula section.

Original entry on oeis.org

1, 2, 2, 5, 8, 3, 14, 27, 18, 5, 41, 88, 79, 40, 8, 122, 284, 310, 215, 80, 13, 365, 912, 1152, 980, 510, 156, 21, 1094, 2917, 4144, 4091, 2660, 1150, 294, 34, 3281, 9296, 14578, 16176, 12393, 6752, 2461, 544, 55, 9842, 29526, 50436, 61638, 53730
Offset: 1

Views

Author

Clark Kimberling, Mar 27 2012

Keywords

Comments

Row n ends with F(n), where F=A000045 (Fibonacci numbers).
Column 1: A007051.
Row sums: A000302 (powers of 4).
Alternating row sums: 1,0,0,0,0,0,0,0,0,...
For a discussion and guide to related arrays, see A208510.
Essentially the same triangle as given by (2, 1/2, 3/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (2, -1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham Jul 11 2012

Examples

			First five rows:
   1;
   2,  2;
   5,  8,  3;
  14, 27, 18,  5;
  41, 88, 79, 40,  8;
First three polynomials v(n,x):
  1
  2 + 2x
  5 + 8x + 3x^2
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + (x + j)*v[n - 1, x] + c;
    d[x_] := h + x; e[x_] := p + x;
    v[n_, x_] := d[x]*u[n - 1, x] + e[x]*v[n - 1, x] + f;
    j = 0; c = 0; h = -1; p = 3; f = 0;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A210803 *)
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A210804 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]   (* A047849 *)
    Table[v[n, x] /. x -> 1, {n, 1, z}]   (* A000302 *)
    Table[u[n, x] /. x -> -1, {n, 1, z}]  (* A000007 *)
    Table[v[n, x] /. x -> -1, {n, 1, z}]  (* A000007 *)

Formula

u(n,x) = u(n-1,x) + x*v(n-1,x) + 1, v(n,x) = (x-1)*u(n-1,x) + (x+3)*v(n-1,x), where u(1,x)=1, v(1,x)=1.
T(n,k) = 4*T(n-1,k) + T(n-1,k-1) - 3*T(n-2,k) - 2*T(n-2,k-1) + T(n-2,k-2), T(1,0) = 1, T(2,0) = T(2,1) = 2, T(3,0) = 5, T(3,1) = 8, T(3,2) = 3, T(n,k) = 0 if k < 0 or if k >= n. - Philippe Deléham, Jul 11 2012
G.f.: (-1+2*x-x*y)*x*y/(-1+4*x+x*y-3*x^2-2*x^2*y+x^2*y^2). - R. J. Mathar, Aug 12 2015

A088556 Numbers of the form (4^n + 4^(n-1) + ... + 1) + (n mod 2).

Original entry on oeis.org

6, 21, 86, 341, 1366, 5461, 21846, 87381, 349526, 1398101, 5592406, 22369621, 89478486, 357913941, 1431655766, 5726623061, 22906492246, 91625968981, 366503875926, 1466015503701, 5864062014806, 23456248059221, 93824992236886, 375299968947541, 1501199875790166
Offset: 1

Views

Author

Cino Hilliard, Nov 17 2003

Keywords

Crossrefs

Programs

  • Magma
    I:=[6,21,86]; [n le 3 select I[n] else 4*Self(n-1)+Self(n-2)-4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 14 2015
  • Mathematica
    LinearRecurrence[{4, 1, -4}, {6, 21, 86}, 50] (* Vincenzo Librandi, Jun 14 2015 *)
  • PARI
    trajpolypn(n1) = { for(x1=1,n1, y1 = polypn(4,x1); print1(y1",") ) }
    polypn(n,p) = { x=n; if(p%2,y=2,y=1); for(m=1,p, y=y+x^m; ); return(y) }
    
  • PARI
    Vec(x*(6-3*x-4*x^2)/((1-x)*(1+x)*(1-4*x)) + O(x^30)) \\ Colin Barker, Jun 13 2015
    

Formula

If n is even, then 4^n + ... + 1 = (4^(n+1) - 1)/3 = (2^(n+1) - 1)*(2^(n+1) + 1)/3. - R. K. Guy, Nov 17 2003
a(n) = 4*a(n-1) + a(n-2) - 4*a(n-3). - Colin Barker, Apr 02 2012
G.f.: x*(6-3*x-4*x^2) / ((1-x)*(1+x)*(1-4*x)). - Colin Barker, Apr 02 2012

A094659 Number of closed walks of length n at a vertex of the cyclic graph on 7 nodes C_7.

Original entry on oeis.org

1, 0, 2, 0, 6, 0, 20, 2, 70, 18, 252, 110, 924, 572, 3434, 2730, 12902, 12376, 48926, 54264, 187036, 232562, 720062, 980674, 2789164, 4086550, 10861060, 16878420, 42484682, 69242082, 166823430, 282580872, 657178982, 1148548016, 2595874468
Offset: 0

Views

Author

Herbert Kociemba, Jun 06 2004

Keywords

Comments

In general, a(n,m) = (2^n/m)*Sum_{k=0..m-1} cos(2*Pi*k/m)^n gives the number of closed walks of length n at a vertex of the cyclic graph on m nodes C_m.

Crossrefs

Cf. A199572 (m=2), A078008 (m=3), A199573 (m=4), A054877 (m=5), A047849 (bisection of m=6), A063376 (bisection of m=8), A094233 (m=9), A095929 (bisection of m=10), A087433 (bisection of m=12).

Programs

  • Mathematica
    f[n_] := FullSimplify[ TrigToExp[ 2^n/7 Sum[Cos[2Pi*k/7]^n, {k, 0, 6}]]]; Table[ f[n], {n, 0, 36}] (* Robert G. Wilson v, Jun 09 2004 *)
    LinearRecurrence[{1,4,-3,-2},{1,0,2,0},40] (* Harvey P. Dale, Jun 12 2014 *)

Formula

a(n) = (2^n/7)*Sum_{k=0..6} cos(2*Pi*k/7)^n.
a(n) = 7(a(n-2) - 2a(n-4) + a(n-6)) + 2a(n-7).
G.f.: (1-x-2x^2+x^3)/((2x-1)(-1-x+2x^2+x^3)).
a(0)=1, a(1)=0, a(2)=2, a(3)=0, a(n)=a(n-1)+4*a(n-2)-3*a(n-3)-2*a(n-4). - Harvey P. Dale, Jun 12 2014
7*a(n) = 2^n + 2*A094648(n). - R. J. Mathar, Nov 03 2020

Extensions

More terms from Robert G. Wilson v, Jun 09 2004
Previous Showing 21-30 of 40 results. Next