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
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
-
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
-
Table[BitAnd[n, 3*n], {n, 0, 68}] (* Arkadiusz Wesolowski, Jun 23 2012 *)
-
a(n)=bitand(n,3*n) \\ Charles R Greathouse IV, Feb 05 2013
-
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
-
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 *)
-
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
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
-
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 *)
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
-
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 *)
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
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;
-
[((k+2)^(n-k) +k)/(k+1): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 15 2021
-
Table[((k+2)^(n-k) +k)/(k+1), {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 14 2017 *)
-
for(n=0, 10, for(k=0,n, print1(((k+2)^(n-k)+k)/(k+1), ", "))) \\ G. C. Greubel, Oct 14 2017
-
flatten([[((k+2)^(n-k) +k)/(k+1) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 15 2021
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
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.
-
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 *)
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
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
-
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 *)
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
-
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
-
LinearRecurrence[{4, 1, -4}, {6, 21, 86}, 50] (* Vincenzo Librandi, Jun 14 2015 *)
-
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) }
-
Vec(x*(6-3*x-4*x^2)/((1-x)*(1+x)*(1-4*x)) + O(x^30)) \\ Colin Barker, Jun 13 2015
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
-
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 *)
Comments