A038754
a(2n) = 3^n, a(2n+1) = 2*3^n.
Original entry on oeis.org
1, 2, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366, 59049, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646, 4782969, 9565938, 14348907, 28697814, 43046721, 86093442, 129140163, 258280326, 387420489
Offset: 0
In the interval [0,2^5) we have 11 multiples of 3 numbers, from which 10 are evil and only one (21) is odious. Thus a(4) = 10 - 1 = 9. - _Vladimir Shevelev_, May 16 2012
- Indranil Ghosh, Table of n, a(n) for n = 0..1500 (first 401 terms from T. D. Noe)
- S. V. Ault and C. Kicey, Counting paths in corridors using circular Pascal arrays, Discrete Mathematics, Vol. 332 (2014), pp. 45-54.
- Paul Barry, Three Études on a sequence transformation pipeline, arXiv:1803.06408 [math.CO], 2018.
- Nachum Dershowitz, Between Broadway and the Hudson, arXiv:2006.06516 [math.CO], 2020.
- Sean A. Irvine, Walks on Graphs.
- Richard L. Ollerton and Anthony G. Shannon, Some properties of generalized Pascal squares and triangles, Fib. Q., 36 (1998), 98-109. See pages 106-7.
- Vladimir Shevelev, On monotonic strengthening of Newman-like phenomenon on (2m+1)-multiples in base 2m, arXiv:0710.3177 [math.NT], 2007.
- M. B. Wells, Elements of Combinatorial Computing, Pergamon, Oxford, 1971. [Annotated scanned copy of pages 237-240]
- Index entries for linear recurrences with constant coefficients, signature (0,3).
-
import Data.List (transpose)
a038754 n = a038754_list !! n
a038754_list = concat $ transpose [a000244_list, a008776_list]
-- Reinhard Zumkeller, Oct 19 2015
-
[n le 2 select n else 3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 18 2016
-
a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=3*a[n-2]+2 od: seq(a[n]+1, n=0..34); # Zerinvary Lajos, Mar 20 2008
with(GraphTheory): P:=5: G:=PathGraph(P): A:= AdjacencyMatrix(G): nmax:=35; for n from 1 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..P) od: seq(a(n),n=1..nmax); # Johannes W. Meijer, May 29 2010
-
LinearRecurrence[{0,3},{1,2},40] (* Harvey P. Dale, Jan 26 2014 *)
CoefficientList[Series[(1+2x)/(1-3x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 18 2016 *)
Module[{nn=20,c},c=3^Range[0,nn];Riffle[c,2c]] (* Harvey P. Dale, Aug 21 2021 *)
-
a(n)=(1/6)*(5-(-1)^n)*3^floor(n/2)
-
a(n)=3^(n>>1)<
-
[2^(n%2)*3^((n-(n%2))/2) for n in range(61)] # G. C. Greubel, Oct 10 2022
A033484
a(n) = 3*2^n - 2.
Original entry on oeis.org
1, 4, 10, 22, 46, 94, 190, 382, 766, 1534, 3070, 6142, 12286, 24574, 49150, 98302, 196606, 393214, 786430, 1572862, 3145726, 6291454, 12582910, 25165822, 50331646, 100663294, 201326590, 402653182, 805306366, 1610612734, 3221225470
Offset: 0
Binary: 1, 100, 1010, 10110, 101110, 1011110, 10111110, 101111110, 1011111110, 10111111110, 101111111110, 1011111111110, 10111111111110,
G.f. = 1 + 4*x + 10*x^2 + 22*x^3 + 46*x^4 + 94*x^5 + 190*x^6 + 382*x^7 + ...
- J. Riordan, Series-parallel realization of the sum modulo 2 of n switching variables, in Claude Elwood Shannon: Collected Papers, edited by N. J. A. Sloane and A. D. Wyner, IEEE Press, NY, 1993, pp. 877-878.
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Paul Barry, The Triple Riordan Group, arXiv:2412.05461 [math.CO], 2024. See pp. 3, 10.
- Dennis E. Davenport, Shakuan K. Frankson, Louis W. Shapiro, and Leon C. Woodson, An Invitation to the Riordan Group, Enum. Comb. Appl. (2024) Vol. 4, No. 3, Art. #S2S1. See p. 22.
- Erik D. Demaine et al., Picture-Hanging Puzzles, arXiv:1203.3602 [cs.DS], 2012, 2014. See p. 8, actually length(Sn) is 2^n+2^(n-1)-2, that is, a(n-1).
- Sergey Kitaev, On multi-avoidance of right angled numbered polyomino patterns, Integers: Electronic Journal of Combinatorial Number Theory 4 (2004), A21, 20pp.
- Ross La Haye, Binary Relations on the Power Set of an n-Element Set, Journal of Integer Sequences, Vol. 12 (2009), Article 09.2.6.
- Egor Lappo and Noah A. Rosenberg, A lattice structure for ancestral configurations arising from the relationship between gene trees and species trees, Adv. Appl. Math. 343 (2024), 65-81.
- Eric Weisstein's World of Mathematics, Complete Tripartite Graph
- Eric Weisstein's World of Mathematics, Independent Vertex Set
- Eric Weisstein's World of Mathematics, Vertex Cover
- Index entries for linear recurrences with constant coefficients, signature (3,-2).
-
List([0..35], n-> 3*2^n -2); # G. C. Greubel, Nov 18 2019
-
a033484 = (subtract 2) . (* 3) . (2 ^)
a033484_list = iterate ((subtract 2) . (* 2) . (+ 2)) 1
-- Reinhard Zumkeller, Apr 23 2013
-
[3*2^n-2: n in [1..36]]; // Vincenzo Librandi, Nov 22 2010
-
with(combinat):a:=n->stirling2(n,2)+stirling2(n+1,2): seq(a(n), n=1..35); # Zerinvary Lajos, Oct 07 2007
a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=(a[n-1]+1)*2 od: seq(a[n], n=1..35); # Zerinvary Lajos, Feb 22 2008
-
Table[3 2^n - 2, {n, 0, 35}] (* Vladimir Joseph Stephan Orlovsky, Dec 16 2008 *)
(* Start from Eric W. Weisstein, Sep 21 2017 *)
3*2^Range[0, 35] - 2
LinearRecurrence[{3, -2}, {1, 4}, 36]
CoefficientList[Series[(1+x)/(1-3x+2x^2), {x, 0, 35}], x] (* End *)
-
a(n) = 3<Charles R Greathouse IV, Nov 02 2011
-
[3*2^n -2 for n in (0..35)] # G. C. Greubel, Nov 18 2019
A171861
Expansion of x*(1+x+x^2) / ( (x-1)*(x^3+x^2-1) ).
Original entry on oeis.org
1, 2, 4, 6, 9, 13, 18, 25, 34, 46, 62, 83, 111, 148, 197, 262, 348, 462, 613, 813, 1078, 1429, 1894, 2510, 3326, 4407, 5839, 7736, 10249, 13578, 17988, 23830, 31569, 41821, 55402, 73393, 97226, 128798, 170622, 226027, 299423, 396652, 525453, 696078, 922108
Offset: 1
a(n) enumerates length n+2 sequences on {H,T} that end in HHT but do not contain the contiguous subsequence TTT.
a(3)=4 because we have: TTHHT, THHHT, HTHHT, HHHHT.
a(4)=6 because we have: TTHHHT, THTHHT, THHHHT, HTTHHT, HTHHHT, HHHHHT. - _Geoffrey Critzer_, Mar 01 2014
Related sequences are
A000045 (HHH beats HHT, HTT beats TTH),
A006498 (HHH beats HTH),
A023434 (HHH beats HTT),
A000930 (HHH beats THT, HTH beats HHT),
A000931 (HHH beats TTH),
A077868 (HHT beats HTH),
A002620 (HHT beats HTT),
A000012 (HHT beats THH),
A004277 (HHT beats THT),
A070550 (HTH beats HHH),
A000027 (HTH beats HTT),
A097333 (HTH beats THH),
A040000 (HTH beats TTH),
A068921 (HTH beats TTT),
A054405 (HTT beats HHH),
A008619 (HTT beats HHT),
A038718 (HTT beats THT),
A128588 (HTT beats TTT).
Cf.
A164315 (essentially the same sequence).
-
A171861 := proc(n) option remember; if n <=4 then op(n,[1,2,4,6]); else procname(n-1)+procname(n-2)-procname(n-4) ; end if; end proc:
-
nn=44;CoefficientList[Series[x(1+x+x^2)/(1-x-x^2+x^4),{x,0,nn}],x] (* Geoffrey Critzer, Mar 01 2014 *)
-
a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,0,1,1]^(n-1)*[1;2;4;6])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
A303696
Number A(n,k) of binary words of length n with k times as many occurrences of subword 101 as occurrences of subword 010; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 2, 1, 2, 4, 1, 2, 4, 7, 1, 2, 4, 6, 12, 1, 2, 4, 6, 12, 21, 1, 2, 4, 6, 10, 20, 37, 1, 2, 4, 6, 10, 17, 38, 65, 1, 2, 4, 6, 10, 16, 28, 66, 114, 1, 2, 4, 6, 10, 16, 26, 49, 124, 200, 1, 2, 4, 6, 10, 16, 26, 42, 84, 224, 351, 1, 2, 4, 6, 10, 16, 26, 42, 70, 148, 424, 616
Offset: 0
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, ...
2, 2, 2, 2, 2, 2, 2, ...
4, 4, 4, 4, 4, 4, 4, ...
7, 6, 6, 6, 6, 6, 6, ...
12, 12, 10, 10, 10, 10, 10, ...
21, 20, 17, 16, 16, 16, 16, ...
37, 38, 28, 26, 26, 26, 26, ...
65, 66, 49, 42, 42, 42, 42, ...
114, 124, 84, 70, 68, 68, 68, ...
200, 224, 148, 116, 110, 110, 110, ...
351, 424, 263, 196, 178, 178, 178, ...
-
b:= proc(n, t, h, c, k) option remember; `if`(abs(c)>k*n, 0,
`if`(n=0, 1, b(n-1, [1, 3, 1][t], 2, c-`if`(h=3, k, 0), k)
+ b(n-1, 2, [1, 3, 1][h], c+`if`(t=3, 1, 0), k)))
end:
A:= (n, k)-> b(n, 1$2, 0, min(k, n)):
seq(seq(A(n, d-n), n=0..d), d=0..14);
-
b[n_, t_, h_, c_, k_] := b[n, t, h, c, k] = If[Abs[c] > k n, 0, If[n == 0, 1, b[n - 1, {1, 3, 1}[[t]], 2, c - If[h == 3, k, 0], k] + b[n - 1, 2, {1, 3, 1}[[h]], c + If[t == 3, 1, 0], k]]];
A[n_, k_] := b[n, 1, 1, 0, Min[k, n]];
Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Mar 20 2020, from Maple *)
A212829
T(n,k)=Number of 0..k arrays of length n with no adjacent pair equal to its immediately preceding adjacent pair, and new values introduced in 0..k order.
Original entry on oeis.org
1, 1, 2, 1, 2, 4, 1, 2, 5, 6, 1, 2, 5, 12, 10, 1, 2, 5, 13, 33, 16, 1, 2, 5, 13, 43, 90, 26, 1, 2, 5, 13, 44, 152, 246, 42, 1, 2, 5, 13, 44, 167, 559, 672, 68, 1, 2, 5, 13, 44, 168, 695, 2091, 1836, 110, 1, 2, 5, 13, 44, 168, 716, 3070, 7882, 5016, 178, 1, 2, 5, 13, 44, 168, 717
Offset: 1
Some solutions for n=8 k=4
..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0
..0....1....1....1....1....1....0....1....1....1....0....1....1....1....1....1
..1....2....2....2....2....1....1....2....2....2....0....2....2....0....2....0
..0....3....3....2....1....0....2....3....1....0....1....3....1....2....3....2
..0....4....3....1....3....2....3....1....0....1....2....0....0....1....4....2
..1....3....2....1....4....0....1....3....3....3....0....2....0....0....0....2
..2....3....1....3....2....1....0....2....3....4....1....2....3....0....0....3
..1....1....4....0....0....2....3....4....1....1....0....2....4....3....4....3
A078678
Number of binary strings with n 1's and n 0's avoiding zigzags, that is avoiding the substrings 101 and 010.
Original entry on oeis.org
1, 2, 4, 8, 18, 42, 100, 242, 592, 1460, 3624, 9042, 22656, 56970, 143688, 363348, 920886, 2338566, 5949148, 15157874, 38674978, 98803052, 252701484, 646990518, 1658066668, 4252908542, 10917422860, 28046438252, 72099983802, 185469011130, 477383400300
Offset: 0
For n = 2 : 0011, 0110, 1001, 1100.
For n = 3 : 000111, 011001, 100011, 110001, 001110, 011100, 100110, 111000.
- Vincenzo Librandi, Table of n, a(n) for n = 0..220
- Andrei Asinowski and Cyril Banderier, On Lattice Paths with Marked Patterns: Generating Functions and Multivariate Gaussian Distribution, 31st International Conference on Probabilistic, Combinatorial and Asymptotic Methods for the Analysis of Algorithms (AofA 2020) Leibniz International Proceedings in Informatics (LIPIcs) Vol. 159, 1:1-1:16.
- T. Doslic, Seven lattice paths to log-convexity, Acta Appl. Mathem. 110 (3) (2010) 1373-139, eq 4.
- Emanuele Munarini and N. Z. Salvi, Binary strings without zigzags, Séminaire Lotharingien de Combinatoire, B49h (2004), 15 pp.
- R. Pemantle and M. C. Wilson, Twenty Combinatorial Examples of Asymptotics Derived from Multivariate Generating Functions, arXiv:math/0512548 [math.CO], 2007.
-
a:= proc(n) option remember; `if`(n<5, [1, 2, 4, 8, 18][n+1],
(2*n*a(n-1)+(n-2)*a(n-2)+(2*n-8)*a(n-3)-(n-4)*a(n-4))/n)
end:
seq(a(n), n=0..40); # Alois P. Heinz, Feb 13 2020
-
Table[SeriesCoefficient[Series[Sqrt[(1 + x + x^2)/(1 - 3 x + x^2)], {x, 0, n}], n], {n, 0, 40}]
-
a(n):=coeff(taylor((1+x+x^2)/sqrt(1-2*x-x^2-2*x^3+x^4),x,0,n),x,n);
makelist(a(n),n,0,12); /* Emanuele Munarini, Jul 07 2011 */
-
my(x='x+O('x^99)); Vec(((1+x+x^2)/(1-3*x+x^2))^(1/2)) \\ Altug Alkan, Jul 18 2016
A232642
Sequence (or tree) generated by these rules: 1 is in S, and if x is in S, then x + 1 and 2*x + 2 are in S, and duplicates are deleted as they occur.
Original entry on oeis.org
1, 2, 4, 3, 6, 5, 10, 8, 7, 14, 12, 11, 22, 9, 18, 16, 15, 30, 13, 26, 24, 23, 46, 20, 19, 38, 17, 34, 32, 31, 62, 28, 27, 54, 25, 50, 48, 47, 94, 21, 42, 40, 39, 78, 36, 35, 70, 33, 66, 64, 63, 126, 29, 58, 56, 55, 110, 52, 51, 102, 49, 98, 96, 95, 190, 44
Offset: 1
Each x begets x + 1 and 2*x + 2, but if either has already occurred it is deleted. Thus, 1 begets 2 and 4; then 2 begets 3 and 6, and 4 begets 5 and 10, so that g(3) = (3,6,5,10).
First 5 generations, also showing the places where duplicates were removed:
. 1: 1
. 2: 2 4
. 3: 3 6 5 10
. 4: _ 8 7 14 _ 12 11 22
. 5: _ __ 9 18 _ 16 15 30 _ __ 13 26 __ 24 23 46
These are the corresponding complete rows of triangle A082560:
. 1: 1
. 2: 2 4
. 3: 3 6 5 10
. 4: 4 8 7 14 6 12 11 22
. 5: 5 10 9 18 8 16 15 30 7 14 13 26 12 24 23 46
-
import Data.List.Ordered (member); import Data.List (sort)
a232642 n k = a232642_tabf !! (n-1) !! (k-1)
a232642_row n = a232642_tabf !! (n-1)
a232642_tabf = f a082560_tabf [] where
f (xs:xss) zs = ys : f xss (sort (ys ++ zs)) where
ys = [v | v <- xs, not $ member v zs]
a232642_list = concat a232642_tabf
-- Reinhard Zumkeller, May 14 2015
-
z = 14; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1] + 2]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]] (* A232642 *)
Table[Length[g1[n]], {n, 1, z}] (* A000045 *)
Flatten[Table[Position[t, n], {n, 1, 200}]] (* A232643 *)
A163733
Number of n X 2 binary arrays with all 1's connected, all corners 1, and no 1 having more than two 1's adjacent.
Original entry on oeis.org
1, 1, 2, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634, 78176338
Offset: 1
All solutions for n=8:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1
0 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 1
0 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 1 0 1 1
0 1 1 0 1 1 0 1 0 1 1 0 0 1 1 1 1 0 1 0
0 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 0
0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
------
1 1 1 1 1 1 1 1 1 1 1 1
0 1 0 1 0 1 1 0 1 0 1 0
1 1 1 1 0 1 1 0 1 1 1 1
1 0 1 0 1 1 1 1 0 1 0 1
1 1 1 0 1 0 0 1 0 1 1 1
0 1 1 1 1 1 1 1 1 1 1 0
0 1 0 1 0 1 1 0 1 0 1 0
1 1 1 1 1 1 1 1 1 1 1 1
A111961
Expansion of 1/(sqrt(1-2x-3x^2)-x).
Original entry on oeis.org
1, 2, 6, 18, 56, 176, 558, 1778, 5686, 18230, 58558, 188366, 606588, 1955044, 6305418, 20347342, 65689088, 212146400, 685342218, 2214556478, 7157409064, 23136645472, 74801223162, 241863933094, 782131232390, 2529458676326
Offset: 0
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Paul Barry, On a transformation of Riordan moment sequences, arXiv:1802.03443 [math.CO], 2018.
- Paul Barry, Moment sequences, transformations, and Spidernet graphs, arXiv:2307.00098 [math.CO], 2023.
- Paul Barry, Notes on Riordan arrays and lattice paths, arXiv:2504.09719 [math.CO], 2025. See pp. 17, 29.
- Taras Goy and Mark Shattuck, Determinants of Some Hessenberg-Toeplitz Matrices with Motzkin Number Entries, J. Int. Seq., Vol. 26 (2023), Article 23.3.4.
-
CoefficientList[Series[1/(Sqrt[1-2*x-3*x^2]-x), {x, 0, 20}], x] (* Vaclav Kotesovec, Feb 08 2014 *)
Original entry on oeis.org
1, 1, 1, -1, 3, -5, 9, -15, 25, -41, 67, -109, 177, -287, 465, -753, 1219, -1973, 3193, -5167, 8361, -13529, 21891, -35421, 57313, -92735, 150049, -242785, 392835, -635621, 1028457, -1664079, 2692537, -4356617, 7049155, -11405773, 18454929
Offset: 1
a(5) = 3 = ( -3, 8, 0, -7, 5).
-
List([1..40], n-> (-1)^(n-1)*(2*Fibonacci(n-2)-1)); # G. C. Greubel, Jul 10 2019
-
[(-1)^(n-1)*(2*Fibonacci(n-2)-1): n in [1..40]]; // G. C. Greubel, Jul 10 2019
-
Table[(-1)^(n-1)*(2*Fibonacci[n-2] -1), {n, 40}] (* G. C. Greubel, Jul 10 2019 *)
-
vector(40, n, f=fibonacci; (-1)^(n-1)*(2*f(n-2)-1)) \\ G. C. Greubel, Jul 10 2019
-
[(-1)^(n-1)*(2*fibonacci(n-2)-1) for n in (1..40)] # G. C. Greubel, Jul 10 2019
Deleted certain dangerous or potentially dangerous links. -
N. J. A. Sloane, Jan 30 2021
Showing 1-10 of 17 results.
Comments