A197054
T(n,k)=Number of nXk 0..4 arrays with each element equal to the number of its horizontal and vertical zero neighbors.
Original entry on oeis.org
1, 2, 2, 2, 2, 2, 3, 4, 4, 3, 4, 6, 10, 6, 4, 5, 10, 18, 18, 10, 5, 7, 16, 38, 42, 38, 16, 7, 9, 26, 78, 108, 108, 78, 26, 9, 12, 42, 156, 274, 358, 274, 156, 42, 12, 16, 68, 320, 692, 1132, 1132, 692, 320, 68, 16, 21, 110, 654, 1754, 3580, 4468, 3580, 1754, 654, 110, 21, 28
Offset: 1
Table starts
..1...2....2.....3......4.......5........7.........9.........12..........16
..2...2....4.....6.....10......16.......26........42.........68.........110
..2...4...10....18.....38......78......156.......320........654........1326
..3...6...18....42....108.....274......692......1754.......4442.......11248
..4..10...38...108....358....1132.....3580.....11382......36270......114992
..5..16...78...274...1132....4468....17742.....70616.....281202.....1117442
..7..26..156...692...3580...17742....88056....439338....2192602....10912392
..9..42..320..1754..11382...70616...439338...2745186...17155374...106972582
.12..68..654..4442..36270..281202..2192602..17155374..134355866..1049189170
.16.110.1326.11248.114992.1117442.10912392.106972582.1049189170.10264692132
...
Some solutions for n=6 k=4
..0..2..1..0....0..2..0..1....2..0..2..0....0..3..0..2....0..2..1..0
..2..0..1..2....1..1..1..1....0..2..1..1....2..0..4..0....3..0..1..2
..1..1..2..0....1..0..2..0....2..1..0..2....1..2..0..2....0..3..1..0
..0..3..0..3....1..1..1..1....0..2..2..0....0..1..1..1....2..0..1..2
..3..0..4..0....0..3..0..2....3..0..1..2....1..1..1..0....1..1..2..0
..0..3..0..2....2..0..3..0....0..2..1..0....1..0..1..1....0..2..0..2
A006367
Number of binary vectors of length n+1 beginning with 0 and containing just 1 singleton.
Original entry on oeis.org
1, 0, 2, 2, 5, 8, 15, 26, 46, 80, 139, 240, 413, 708, 1210, 2062, 3505, 5944, 10059, 16990, 28646, 48220, 81047, 136032, 228025, 381768, 638450, 1066586, 1780061, 2968040, 4944519, 8230370, 13689118, 22751528, 37786915, 62716752, 104028245
Offset: 0
a(4) = 5 because among the 2^4 compositions of 5 only 4+1,1+4,2+2+1,2+1+2,1+2+2 contain exactly one 1.
a(4) = 5 because the binary vectors of length 4+1 beginning with 0 and with exactly one singleton are: 00001, 00100, 00110, 01100, 01111. - _Michael Somos_, Nov 29 2014
G.f. = 1 + 2*x^2 + 2*x^3 + 5*x^4 + 8*x^5 + 15*x^6 + 26*x^7 + 46*x^8 + ...
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Ricardo Gómez Aíza, Symbolic dynamical scales: modes, orbitals, and transversals, arXiv:2009.02669 [math.DS], 2020.
- Jia Huang, Partially Palindromic Compositions, J. Int. Seq. (2023) Vol. 26, Art. 23.4.1. See pp. 4, 11.
- Mengmeng Liu and Andrew Yezhou Wang, The Number of Designated Parts in Compositions with Restricted Parts, J. Int. Seq., Vol. 23 (2020), Article 20.1.8.
- J. J. Madden, A generating function for the distribution of runs in binary words, arXiv:1707.04351 [math.CO], 2017, Theorem 1.1, r=k=1.
- T. Mansour and A. Robertson, Refined restricted permutations avoiding subsets of patterns of length three, arXiv:math/0204005 [math.CO], 2002.
- Index entries for linear recurrences with constant coefficients, signature (2,1,-2,-1).
-
I:=[1,0]; [n le 2 select I[n] else Self(n-1)+Self(n-2)+Fibonacci(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 20 2014
-
nn=36; CoefficientList[Series[1/(1 -x/(1-x) +x)^2, {x, 0, nn}], x] (* Geoffrey Critzer, Feb 18 2014 *)
a[n_]:= If[ n<0, SeriesCoefficient[((1-x)/(1+x-x^2))^2, {x, 0, -2-n}], SeriesCoefficient[((1-x)/(1-x-x^2))^2, {x, 0, n}]]; (* Michael Somos, Nov 29 2014 *)
-
Vec( (1-x)^2/(1-x-x^2)^2 + O(x^66) ) \\ Joerg Arndt, Feb 20 2014
-
{a(n) = if( n<0, n = -2-n; polcoeff( (1 - x)^2 / (1 + x - x^2)^2 + x * O(x^n), n), polcoeff( (1 - x)^2 / (1 - x - x^2)^2 + x * O(x^n), n))}; /* Michael Somos, Nov 29 2014 */
-
from sympy import fibonacci
from sympy.core.cache import cacheit
@cacheit
def a(n): return 1 if n==0 else 0 if n==1 else a(n - 1) + a(n - 2) + fibonacci(n - 3)
print([a(n) for n in range(51)]) # Indranil Ghosh, Jul 20 2017
-
def A006367(n): return (1/5)*(n*lucas_number2(n-2, 1, -1) + fibonacci(n+1) + 4*fibonacci(n-1))
[A006367(n) for n in (0..40)] # G. C. Greubel, Apr 06 2022
A118658
a(n) = 2*F(n-1) = L(n) - F(n), where F(n) and L(n) are Fibonacci and Lucas numbers respectively.
Original entry on oeis.org
2, 0, 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: 0
Bill Jones (b92057(AT)yahoo.com), May 18 2006
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Tanya Khovanova, Recursive Sequences
- Eric Weisstein's World of Mathematics, Independent Edge Set
- Eric Weisstein's World of Mathematics, Ladder Graph
- Eric Weisstein's World of Mathematics, Matching
- Eric Weisstein's World of Mathematics, Maximal Independent Vertex Set
- Eric Weisstein's World of Mathematics, Minimal Vertex Cover
- Eric Weisstein's World of Mathematics, Pan Graph
- Index entries for linear recurrences with constant coefficients, signature (1,1).
-
List([0..40],n->2*Fibonacci(n-1)); # Muniru A Asiru, Oct 07 2018
-
[Lucas(n) - Fibonacci(n): n in [0..40]]; // Vincenzo Librandi, Sep 14 2014
-
with(combinat): seq(2*fibonacci(n-1),n=0..40); # Muniru A Asiru, Oct 07 2018
a := n -> -2*I^n*ChebyshevU(n-2, -I/2):
seq(simplify(a(n)), n = 0..39); # Peter Luschny, Dec 03 2023
-
LinearRecurrence[{1, 1}, {2, 0}, 100] (* Vladimir Joseph Stephan Orlovsky, Jun 05 2011 *)
Table[LucasL[n] - Fibonacci[n], {n, 0, 40}] (* Vincenzo Librandi, Sep 14 2014 *)
Table[2 Fibonacci[n - 1], {n, 0, 20}] (* Eric W. Weisstein, Jun 30 2017 *)
2 Fibonacci[Range[0, 20] - 1] (* Eric W. Weisstein, Jun 30 2017 *)
Subtract @@@ (Through[{LucasL, Fibonacci}[#]] & /@ Range[0, 20]) (* Eric W. Weisstein, Jun 30 2017 *)
CoefficientList[Series[(2 (-1 + x))/(-1 + x + x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Jun 30 2017 *)
-
a(n)=fibonacci(n-1)<<1 \\ Charles R Greathouse IV, Jun 05 2011
A220062
Number A(n,k) of n length words over k-ary alphabet, where neighboring letters are neighbors in the alphabet; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 2, 0, 0, 1, 4, 4, 2, 0, 0, 1, 5, 6, 6, 2, 0, 0, 1, 6, 8, 10, 8, 2, 0, 0, 1, 7, 10, 14, 16, 12, 2, 0, 0, 1, 8, 12, 18, 24, 26, 16, 2, 0, 0, 1, 9, 14, 22, 32, 42, 42, 24, 2, 0, 0, 1, 10, 16, 26, 40, 58, 72, 68, 32, 2, 0, 0
Offset: 0
A(5,3) = 12: there are 12 words of length 5 over 3-ary alphabet {a,b,c}, where neighboring letters are neighbors in the alphabet: ababa, ababc, abcba, abcbc, babab, babcb, bcbab, bcbcb, cbaba, cbabc, cbcba, cbcbc.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 3, 4, 5, 6, 7, ...
0, 0, 2, 4, 6, 8, 10, 12, ...
0, 0, 2, 6, 10, 14, 18, 22, ...
0, 0, 2, 8, 16, 24, 32, 40, ...
0, 0, 2, 12, 26, 42, 58, 74, ...
0, 0, 2, 16, 42, 72, 104, 136, ...
0, 0, 2, 24, 68, 126, 188, 252, ...
Columns k=0, 2-10 give:
A000007,
A040000,
A029744(n+2) for n>0,
A006355(n+3) for n>0,
A090993(n+1) for n>0,
A090995(n-1) for n>2,
A129639,
A153340,
A153362,
A153360.
-
b:= proc(n, i, k) option remember; `if`(n=0, 1,
`if`(i=0, add(b(n-1, j, k), j=1..k),
`if`(i>1, b(n-1, i-1, k), 0)+
`if`(i b(n, 0, k):
seq(seq(A(n, d-n), n=0..d), d=0..14);
-
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, Sum[b[n-1, j, k], {j, 1, k}], If[i>1, b[n-1, i-1, k], 0] + If[iJean-François Alcover, Jan 19 2015, after Alois P. Heinz *)
-
TransferGf(m,u,t,v,z)=vector(m,i,u(i))*matsolve(matid(m)-z*matrix(m,m,i,j,t(i,j)),vectorv(m,i,v(i)));
ColGf(m,z)=1+z*TransferGf(m, i->1, (i,j)->abs(i-j)==1, j->1, z);
a(n,k)=Vec(ColGf(k,x) + O(x^(n+1)))[n+1];
for(n=0, 7, for(k=0, 7, print1( a(n,k), ", ") ); print(); );
\\ Andrew Howroyd, Apr 17 2017
A002062
a(n) = Fibonacci(n) + n.
Original entry on oeis.org
0, 2, 3, 5, 7, 10, 14, 20, 29, 43, 65, 100, 156, 246, 391, 625, 1003, 1614, 2602, 4200, 6785, 10967, 17733, 28680, 46392, 75050, 121419, 196445, 317839, 514258, 832070, 1346300, 2178341, 3524611, 5702921, 9227500, 14930388, 24157854, 39088207, 63246025
Offset: 0
- R. Honsberger, Ingenuity in Math., Random House, 1970, p. 96.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- T. D. Noe, Table of n, a(n) for n = 0..500
- Hung Viet Chu, A Note on the Fibonacci Sequence and Schreier-type Sets, arXiv:2205.14260 [math.CO], 2022.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
- Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,1).
-
List([0..50], n-> Fibonacci(n)+n); # G. C. Greubel, Jul 09 2019
-
a002062 n = a000045 n + toInteger n
a002062_list = 0 : 2 : 3 : (map (subtract 1) $
zipWith (-) (map (* 2) $ drop 2 a002062_list) a002062_list)
-- Reinhard Zumkeller, Oct 03 2012
-
[Fibonacci(n)+n: n in [0..50]]; // G. C. Greubel, Jul 09 2019
-
a:= n-> combinat[fibonacci](n)+n: seq(a(n), n=0..50); # Zerinvary Lajos, Mar 20 2008
-
Table[Fibonacci[n]+n,{n,0,50}] (* Harvey P. Dale, Jul 27 2011 *)
-
numlib::fibonacci(n)+n $ n = 0..50; // Zerinvary Lajos, May 08 2008
-
a(n)=fibonacci(n) + n \\ Charles R Greathouse IV, Oct 03 2016
-
[fibonacci(n)+n for n in (0..50)] # G. C. Greubel, Jul 09 2019
A200871
T(n,k)=Number of 0..k arrays x(0..n+1) of n+2 elements without any interior element greater than both neighbors or less than both neighbors.
Original entry on oeis.org
6, 17, 10, 36, 37, 16, 65, 94, 77, 26, 106, 195, 236, 163, 42, 161, 356, 567, 602, 343, 68, 232, 595, 1168, 1673, 1528, 723, 110, 321, 932, 2163, 3886, 4917, 3882, 1523, 178, 430, 1389, 3704, 7973, 12890, 14455, 9858, 3209, 288, 561, 1990, 5973, 14932, 29325
Offset: 1
Some solutions for n=4 k=3
..3....2....0....0....2....0....1....0....0....2....3....3....1....1....1....3
..2....2....0....2....0....2....2....2....0....3....1....3....2....1....2....3
..2....1....3....3....0....2....2....2....0....3....0....3....2....2....2....3
..2....0....3....3....3....0....1....0....2....3....0....2....2....2....0....2
..2....0....0....1....3....0....1....0....2....3....0....2....2....2....0....2
..3....2....0....1....1....0....2....3....3....2....2....1....3....2....0....0
-
t[0,k_,x_,y_] := 1; t[n_,k_,x_,y_] := t[n,k,x,y] = Sum[If[z <= x <= y || y <= x <= z, t[n-1, k, z, x], 0], {z, k+1}]; t[n_, k_] := Sum[t[n, k, x, y], {x, k+1}, {y, k+1}]; TableForm@ Table[t[n, k], {n, 8}, {k, 8}] (* Giovanni Resta, Mar 05 2014 *)
A218064
T(n,k) = Number of n X k arrays of the minimum value of corresponding elements and their horizontal or antidiagonal neighbors in a random 0..1 n X k array.
Original entry on oeis.org
2, 2, 4, 4, 6, 8, 6, 18, 16, 16, 10, 42, 74, 42, 32, 16, 108, 260, 308, 110, 64, 26, 268, 1046, 1664, 1282, 288, 128, 42, 676, 3974, 10246, 10566, 5338, 754, 256, 68, 1694, 15578, 60804, 99934, 66978, 22228, 1974, 512, 110, 4258, 60242, 368220, 925904, 975296
Offset: 1
Some solutions for n=3, k=4
..1..0..0..0....0..0..1..0....1..1..1..1....0..0..0..0....1..0..0..0
..1..0..1..0....0..0..0..0....1..1..0..0....1..1..0..0....0..0..0..0
..0..0..0..0....1..0..0..1....1..0..0..0....0..0..0..0....1..1..0..1
A218897
T(n,k)=Number of nXk arrays of the minimum value of corresponding elements and their horizontal, diagonal or antidiagonal neighbors in a random 0..1 nXk array.
Original entry on oeis.org
2, 2, 4, 4, 6, 8, 6, 18, 16, 16, 10, 34, 72, 38, 32, 16, 86, 212, 286, 98, 64, 26, 180, 786, 1096, 1162, 244, 128, 42, 426, 2594, 6280, 6422, 4700, 614, 256, 68, 930, 9110, 28598, 54726, 35812, 19046, 1542, 512, 110, 2140, 31062, 149238, 373612, 463746, 202662
Offset: 1
Some solutions for n=3 k=4
..0..0..0..0....1..1..0..1....1..1..0..1....1..0..0..0....1..0..1..0
..1..0..1..0....1..0..0..0....1..0..0..0....0..0..0..0....0..0..0..0
..1..0..0..0....1..0..0..0....0..0..0..1....0..0..1..1....0..0..1..0
A245869
T(n,k)=Number of length n+2 0..k arrays with some pair in every consecutive three terms totalling exactly k.
Original entry on oeis.org
6, 19, 10, 36, 45, 16, 61, 100, 103, 26, 90, 193, 256, 239, 42, 127, 318, 549, 676, 553, 68, 168, 493, 960, 1629, 1764, 1281, 110, 217, 712, 1579, 3102, 4753, 4624, 2967, 178, 270, 993, 2368, 5515, 9726, 13961, 12100, 6873, 288, 331, 1330, 3433, 8840, 18505, 30900
Offset: 1
Some solutions for n=6 k=4
..1....4....0....4....0....1....2....3....1....2....0....3....3....0....2....4
..4....2....1....1....4....2....4....1....0....3....1....0....3....4....1....3
..0....2....4....0....3....2....0....3....3....1....3....1....1....2....3....1
..4....0....0....4....0....1....4....0....1....1....1....3....0....0....4....3
..4....2....4....4....4....2....1....4....4....3....2....1....4....4....1....2
..0....2....0....0....3....2....0....0....0....3....2....2....4....3....0....2
..2....0....4....4....0....1....4....4....3....1....4....3....0....1....4....2
..4....4....0....1....1....2....3....0....1....4....0....1....0....2....1....2
A248461
T(n,k)=Number of length n+2 0..k arrays with no three consecutive terms having the sum of any two elements equal to twice the third.
Original entry on oeis.org
6, 18, 10, 48, 36, 16, 96, 148, 72, 26, 174, 380, 460, 144, 42, 282, 862, 1512, 1436, 288, 68, 432, 1652, 4272, 6040, 4488, 576, 110, 624, 2956, 9684, 21182, 24160, 14040, 1152, 178, 870, 4860, 20236, 56782, 105026, 96736, 43940, 2304, 288, 1170, 7642, 37868
Offset: 1
Some solutions for n=5 k=4
..3....4....4....0....1....4....3....1....0....0....1....1....1....1....3....4
..4....4....0....1....3....1....2....1....2....3....1....0....3....3....0....1
..4....1....4....1....0....2....3....4....3....1....0....1....4....4....3....1
..3....4....4....0....1....1....3....1....2....0....1....0....0....0....3....4
..0....0....1....4....1....2....2....4....3....1....4....3....0....0....4....1
..3....4....2....0....2....1....3....1....3....4....4....4....3....1....1....4
..3....3....4....0....2....1....2....2....4....2....0....4....1....3....1....4
Comments