0, 1, 1, 1, 2, 4, 7, 12, 21, 37, 65, 114, 200, 351, 616, 1081, 1897, 3329, 5842, 10252, 17991, 31572, 55405, 97229, 170625, 299426, 525456, 922111, 1618192, 2839729, 4983377, 8745217, 15346786, 26931732, 47261895, 82938844, 145547525, 255418101, 448227521
Offset: 0
A006498
a(n) = a(n-1) + a(n-3) + a(n-4), a(0) = a(1) = a(2) = 1, a(3) = 2.
Original entry on oeis.org
1, 1, 1, 2, 4, 6, 9, 15, 25, 40, 64, 104, 169, 273, 441, 714, 1156, 1870, 3025, 4895, 7921, 12816, 20736, 33552, 54289, 87841, 142129, 229970, 372100, 602070, 974169, 1576239, 2550409, 4126648, 6677056, 10803704, 17480761, 28284465, 45765225, 74049690, 119814916
Offset: 0
G.f. = 1 + x + x^2 + 2*x^3 + 4*x^4 + 6*x^5 + 9*x^6 + 15*x^7 + 25*x^8 + 40*x^9 + ...
From _Gus Wiseman_, Nov 27 2019: (Start)
The a(2) = 1 through a(7) = 15 subsets with no two elements differing by 2:
{} {} {} {} {} {}
{1} {1} {1} {1} {1}
{2} {2} {2} {2}
{1,2} {3} {3} {3}
{1,2} {4} {4}
{2,3} {1,2} {5}
{1,4} {1,2}
{2,3} {1,4}
{3,4} {1,5}
{2,3}
{2,5}
{3,4}
{4,5}
{1,2,5}
{1,4,5}
(End)
- E. Lozansky and C. Rousseau, Winning Solutions, Springer, 1996; see pp. 157 and 172.
- 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
- Katharine A. Ahrens, Combinatorial Applications of the k-Fibonacci Numbers: A Cryptographically Motivated Analysis, Ph. D. thesis, North Carolina State University (2020).
- Michael A. Allen, Connections between Combinations Without Specified Separations and Strongly Restricted Permutations, Compositions, and Bit Strings, arXiv:2409.00624 [math.CO], 2024. See pp. 16, 18.
- D. Applegate, M. LeBrun, and N. J. A. Sloane, Dismal Arithmetic, J. Int. Seq. 14 (2011) # 11.9.8.
- Said Amrouche and Hacène Belbachir, Unimodality and linear recurrences associated with rays in the Delannoy triangle, Turkish Journal of Mathematics (2019) Vol. 44, 118-130.
- Joerg Arndt, Matters Computational (The Fxtbook), section 14.10.1, p.320.
- Vladimir Baltic, On the number of certain types of strongly restricted permutations, Applicable Analysis and Discrete Mathematics Vol. 4, No 1 (2010), 119-135.
- V. Baltic, Applications of the finite state automata for counting restricted permutations and variations, Yug. J. Oper. Res. 22 (2012) 183-198, Sec. 3
- G. E. Bergum and V. E. Hoggatt, Jr., A combinatorial problem involving recursive sequences and tridiagonal matrices, Fib. Quart., 16 (1978), 113-118.
- M. El-Mikkawy, T. Sogabe, A new family of k-Fibonacci numbers, Appl. Math. Comput. 215 (2010) 4456-4461.
- K. Edwards, A Pascal-like triangle related to the tribonacci numbers, Fib. Q., 46/47 (2008/2009), 18-25.
- Steven Finch, Cantor-solus and Cantor-multus distributions, arXiv:2003.09458 [math.CO], 2020.
- T. Guardia and D. Jiménez, Fiboquadratic Sequences and Extensions of the Cassini Identity Raised From the Study of Rithmomachia, arXiv preprint arXiv:1509.03177 [math.HO], 2015-2016.
- John Konvalina, Yi-Hsin Liu, subsets without q-separation and binomial products of Fibonacci numbers, J. Comb. Theo. A 57 (2) (1991) 306-310, T_n.
- Andreas M. Hinz and Paul K. Stockmeyer, Precious Metal Sequences and Sierpinski-Type Graphs, J. Integer Seq., Vol 25 (2022), Article 22.4.8.
- 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
- M. Tetiva, Subsets that make no difference d, Mathematics Magazine 84 (2011), no. 4, 300-301.
- Dominika Závacká, Cristina Dalfó, and Miquel Angel Fiol, Integer sequences from k-iterated line digraphs, CEUR: Proc. 24th Conf. Info. Tech. - Appl. and Theory (ITAT 2024) Vol 3792, 156-161. See p. 161, Table 2.
- Index entries for sequences related to Chebyshev polynomials.
- Index entries for two-way infinite sequences
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,1).
Diagonal sums of number triangle
A059259.
Numbers whose binary expansion has no subsequence (1,0,1) are
A048716.
-
a006498 n = a006498_list !! n
a006498_list = 1 : 1 : 1 : 2 : zipWith (+) (drop 3 a006498_list)
(zipWith (+) (tail a006498_list) a006498_list)
-- Reinhard Zumkeller, Apr 07 2012
-
[ n eq 1 select 1 else n eq 2 select 1 else n eq 3 select 1 else n eq 4 select 2 else Self(n-1)+Self(n-3)+ Self(n-4): n in [1..40] ]; // Vincenzo Librandi, Aug 20 2011
-
LinearRecurrence[{1,0,1,1},{1,1,1,2},50] (* Harvey P. Dale, Jul 13 2011 *)
Table[Fibonacci[Floor[n/2] + 2]^Mod[n, 2]*Fibonacci[Floor[n/2] + 1]^(2 - Mod[n, 2]), {n, 0, 40}] (* David Nacin, Feb 29 2012 *)
a[ n_] := Fibonacci[ Quotient[ n+2, 2]] Fibonacci[ Quotient[ n+3, 2]] (* Michael Somos, Jan 19 2014 *)
Table[Length[Select[Subsets[Range[n]],!MatchQ[#,{_,x_,_,y_,_}/;x+2==y]&]],{n,10}] (* Gus Wiseman, Nov 27 2019 *)
-
{a(n) = fibonacci( (n+2)\2 ) * fibonacci( (n+3)\2 )} /* Michael Somos, Mar 10 2004 */
-
Vec(1/(1-x-x^3-x^4)+O(x^66))
-
def a(n, adict={0:1, 1:1, 2:1, 3:2}):
if n in adict:
return adict[n]
adict[n]=a(n-1)+a(n-3)+a(n-4)
return adict[n] # David Nacin, Mar 07 2012
A005314
For n = 0, 1, 2, a(n) = n; thereafter, a(n) = 2*a(n-1) - a(n-2) + a(n-3).
Original entry on oeis.org
0, 1, 2, 3, 5, 9, 16, 28, 49, 86, 151, 265, 465, 816, 1432, 2513, 4410, 7739, 13581, 23833, 41824, 73396, 128801, 226030, 396655, 696081, 1221537, 2143648, 3761840, 6601569, 11584946, 20330163, 35676949, 62608681, 109870576, 192809420, 338356945, 593775046
Offset: 0
G.f. = x + 2*x^2 + 3*x^3 + 5*x^4 + 9*x^5 + 16*x^6 + 28*x^7 + 49*x^8 + ...
From _Gus Wiseman_, Nov 25 2019: (Start)
a(n) is the number of subsets of {1..n} containing n such that if x and x + 2 are both in the subset, then so is x + 1. For example, the a(1) = 1 through a(5) = 9 subsets are:
{1} {2} {3} {4} {5}
{1,2} {2,3} {1,4} {1,5}
{1,2,3} {3,4} {2,5}
{2,3,4} {4,5}
{1,2,3,4} {1,2,5}
{1,4,5}
{3,4,5}
{2,3,4,5}
{1,2,3,4,5}
(End)
- 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..400
- Isha Agarwal, Matvey Borodin, Aidan Duncan, Kaylee Ji, Tanya Khovanova, Shane Lee, Boyan Litchev, Anshul Rastogi, Garima Rastogi, and Andrew Zhao, From Unequal Chance to a Coin Game Dance: Variants of Penney's Game, arXiv:2006.13002 [math.HO], 2020.
- Marilena Barnabei, Flavio Bonetti, Niccolò Castronuovo, and Matteo Silimbani, Permutations avoiding a simsun pattern, The Electronic Journal of Combinatorics (2020) Vol. 27, Issue 3, P3.45.
- P. Chinn and S. Heubach, Integer Sequences Related to Compositions without 2's, J. Integer Seqs., Vol. 6, 2003.
- Hung Viet Chu and Zachary Louis Vasseur, Schreier Sets of Multiples of an Integer, Linear Recurrence, and Pascal Triangle, arXiv:2506.14312 [math.CO], 2025. See Table 1 p. 2.
- Christian Ennis, William Holland, Omer Mujawar, Aadit Narayanan, Frank Neubrander, Marie Neubrander, and Christina Simino, Words in Random Binary Sequences I, arXiv:2107.01029 [math.GM], 2021.
- R. L. Graham and N. J. A. Sloane, Anti-Hadamard matrices, Linear Alg. Applic., 62 (1984), 113-137.
- Jia Huang, A coin flip game and generalizations of Fibonacci numbers, arXiv:2501.07463 [math.CO], 2025. See pp. 8, 10.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 426
- L. A. Medina and A. Straub, On multiple and infinite log-concavity, 2013, preprint Annals of Combinatorics, March 2016, Volume 20, Issue 1, pp 125-138.
- Denis Neiter and Amsha Proag, Links Between Sums Over Paths in Bernoulli's Triangles and the Fibonacci Numbers, Journal of Integer Sequences, Vol. 19 (2016), Article 16.8.3.
- 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
- Bojan Vučković and Miodrag Živković, Row Space Cardinalities Above 2^(n - 2) + 2^(n - 3), ResearchGate, January 2017, p. 3.
- Index entries for linear recurrences with constant coefficients, signature (2,-1,1).
Equals row sums of triangle
A099557.
Equals row sums of triangle
A224838.
Cf.
A011973 (starting with offset 1 = Falling diagonal sums of triangle with rows displayed as centered text).
First differences of
A005251, shifted twice to the left.
-
a005314 n = a005314_list !! n
a005314_list = 0 : 1 : 2 : zipWith (+) a005314_list
(tail $ zipWith (-) (map (2 *) $ tail a005314_list) a005314_list)
-- Reinhard Zumkeller, Oct 14 2011
-
[0] cat [n le 3 select n else 2*Self(n-1) - Self(n-2) + Self(n-3):n in [1..35]]; // Marius A. Burtea, Oct 24 2019
-
R:=PowerSeriesRing(Integers(), 36); [0] cat Coefficients(R!( x/(1-2*x+x^2-x^3))); // Marius A. Burtea, Oct 24 2019
-
A005314 := proc(n)
option remember ;
if n <=2 then
n;
else
2*procname(n-1)-procname(n-2)+procname(n-3) ;
end if;
end proc:
seq(A005314(n),n=0..20) ; # R. J. Mathar, Feb 25 2024
-
LinearRecurrence[{2, -1, 1}, {0, 1, 2}, 100] (* Vladimir Joseph Stephan Orlovsky, Jul 03 2011 *)
Table[Sum[Binomial[n - Floor[(k + 1)/2], n - Floor[(3 k - 1)/2]], {k, 0, n}], {n, 0, 100}] (* John Molokach, Jul 21 2013 *)
Table[Sum[Binomial[n - Floor[(4 n + 15 - 6 k + (-1)^k)/12], n - Floor[(4 n + 15 - 6 k + (-1)^k)/12] - Floor[(2 n - 1)/3] + k - 1], {k, 1, Floor[(2 n + 2)/3]}], {n, 0, 100}] (* John Molokach, Jul 25 2013 *)
a[ n_] := If[ n < 0, SeriesCoefficient[ x^2 / (1 - x + 2 x^2 - x^3), {x, 0, -n}], SeriesCoefficient[ x / (1 - 2 x + x^2 - x^3), {x, 0, n}]]; (* Michael Somos, Dec 13 2013 *)
RecurrenceTable[{a[0]==0,a[1]==1,a[2]==2,a[n]==2a[n-1]-a[n-2]+a[n-3]},a,{n,40}] (* Harvey P. Dale, May 13 2018 *)
Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&!MatchQ[#,{_,x_,y_,_}/;x+2==y]&]],{n,0,10}] (* Gus Wiseman, Nov 25 2019 *)
-
{a(n) = sum(k=0, (2*n-1)\3, binomial(n-1-k\2, k))}
-
{a(n) = if( n<0, polcoeff( x^2 / (1 - x + 2*x^2 - x^3) + x * O(x^-n), -n), polcoeff( x / (1 - 2*x + x^2 - x^3) + x * O(x^n), n))}; /* Michael Somos, Sep 18 2012 */
-
def A005314(n): return sum( binomial(n-k, 2*k+1) for k in range(floor((n+2)/3)) )
[A005314(n) for n in range(51)] # G. C. Greubel, Nov 10 2023
A247100
The number of ways to write an n-bit binary string and then define each run of ones as an element in an equivalence relation.
Original entry on oeis.org
1, 2, 4, 9, 21, 51, 127, 324, 844, 2243, 6073, 16737, 46905, 133556, 386062, 1132107, 3365627, 10137559, 30920943, 95457178, 298128278, 941574417, 3006040523, 9697677885, 31602993021, 104001763258, 345524136076, 1158570129917, 3919771027105, 13377907523151
Offset: 0
The labeled-run binary strings can be written as follows.
For n=1: 0, 1.
For n=2: 00, 01, 10, 11.
For n=3: 000, 001, 010, 100, 011, 110, 111, 101, 102.
For n=4: 0000, 0001, 0010, 0100, 1000, 0011, 0110, 1100, 0111, 1110, 1111, 0101, 0102, 1001, 1002, 1010, 1020, 1011, 1022, 1101, 1102.
For n=5, the original binary string 10101 can be written as 10101, 10102, 10201, 10202, or 10203 because there are 3 runs of ones and Bell(3)=5.
-
with(combinat):
a:= n-> (t-> add(binomial(t, 2*j)*bell(j), j=0..t/2))(n+1):
seq(a(n), n=0..30); # Alois P. Heinz, Aug 10 2015
-
Table[1 + Sum[Binomial[n+1,2*k] * BellB[k],{k,1,Ceiling[n/2]}],{n,1,40}] (* Vaclav Kotesovec, Jan 08 2015 after Andrew Woods *)
A261134
Number of partitions of subsets s of {1,...,n}, where all integers belonging to a run of consecutive members of s are required to be in different parts.
Original entry on oeis.org
1, 2, 4, 9, 23, 66, 209, 722, 2697, 10825, 46429, 211799, 1023304, 5217048, 27974458, 157310519, 925326848, 5680341820, 36315837763, 241348819913, 1664484383610, 11893800649953, 87931422125632, 671699288516773, 5295185052962371, 43029828113547685
Offset: 0
a(3) = 9: {}, 1, 2, 3, 1|2, 2|3, 13, 1|3, 1|2|3.
a(4) = 23: {}, 1, 2, 3, 4, 1|2, 1|3, 13, 1|4, 14, 2|3, 2|4, 24, 3|4, 1|2|3, 1|2|4, 1|24, 14|2, 1|3|4, 13|4, 14|3, 2|3|4, 1|2|3|4.
-
g:= proc(n, s, t) option remember; `if`(n=0, 1, add(
`if`(j in s, 0, g(n-1, `if`(j=0, {}, s union {j}),
`if`(j=t, t+1, t))), j=0..t))
end:
a:= n-> g(n, {}, 1):
seq(a(n), n=0..20);
-
g[n_, s_List, t_] := g[n, s, t] = If[n == 0, 1, Sum[If[MemberQ[s, j], 0, g[n-1, If[j == 0, {}, s ~Union~ {j}], If[j == t, t+1, t]]], {j, 0, t}]]; a[n_] := g[n, {}, 1]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Feb 04 2017, translated from Maple *)
A261489
Number of partitions of subsets of {1,...,n}, where consecutive integers and the elements in {1, n} are required to be in different parts.
Original entry on oeis.org
1, 2, 4, 8, 25, 82, 313, 1318, 6098, 30603, 165282, 954065, 5853242, 37987146, 259751877, 1864926846, 14016442573, 109985575616, 898948324164, 7637000950875, 67310106587314, 614420757079213, 5799709014601124, 56530981389520624, 568255134674637557
Offset: 0
a(3) = 8: {}, 1, 2, 3, 1|2, 1|3, 2|3, 1|2|3.
a(4) = 25: {}, 1, 2, 3, 4, 1|2, 1|3, 13, 1|4, 2|3, 2|4, 24, 3|4, 1|2|3, 13|2, 1|2|4, 1|24, 1|3|4, 13|4, 2|3|4, 24|3, 1|2|3|4, 13|2|4, 1|3|24, 13|24.
-
g:= proc(n, l, t, f) option remember; `if`(n=0, 1,
add(`if`(l>0 and j=l or f=1 and n=1 and j=1, 0,
g(n-1, j, t+`if`(j=t, 1, 0), f)), j=0..t))
end:
a:= n-> `if`(n=0, 1, g(n-1, 0, 1, 0)+g(n-1, 1, 2, 1)):
seq(a(n), n=0..25);
-
g[n_, l_, t_, f_] := g[n, l, t, f] = If[n==0, 1, Sum[If[l>0 && j==l || f==1 && n==1 && j==1, 0, g[n-1, j, t+If[j==t, 1, 0], f]], {j, 0, t}]]; a[n_] := If[n==0, 1, g[n-1, 0, 1, 0]+g[n-1, 1, 2, 1]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 02 2017, translated from Maple *)
A261492
Number of partitions of subsets of {1,...,n}, where consecutive integers are required to be in the same part and the elements of {1, n} are required to be in the same part if they are both members of a subset.
Original entry on oeis.org
1, 2, 4, 8, 18, 42, 102, 254, 648, 1688, 4486, 12146, 33474, 93810, 267112, 772124, 2264214, 6731254, 20275118, 61841886, 190914356, 596256556, 1883148834, 6012081046, 19395355770, 63205986042, 208003526516, 691048272152, 2317140259834, 7839542054210
Offset: 0
a(3) = 8: {}, 1, 2, 3, 12, 23, 13, 123.
a(4) = 18: {}, 1, 2, 3, 4, 12, 13, 1|3, 14, 23, 24, 2|4, 34, 123, 124, 134, 234, 1234.
-
with(combinat):
a:= n-> `if`(n=0, 1, 2*add(binomial(n, 2*j)*bell(j), j=0..n/2)):
seq(a(n), n=0..35);
-
a[n_] := If[n==0, 1, 2*Sum[Binomial[n, 2*j]*BellB[j], {j, 0, n/2}]]; Table[ a[n], {n, 0, 35}] (* Jean-François Alcover, Feb 22 2017, translated from Maple *)
A376077
Number of partitions of subsets of [n] containing n > 0, where consecutive integers are required to be in different parts.
Original entry on oeis.org
1, 1, 2, 6, 19, 68, 269, 1168, 5516, 28117, 153668, 895345, 5534292, 36137736, 248364343, 1790801964, 13508326353, 106329846806, 871423555238, 7420685528453, 65539734707912, 599363070599885, 5666859173305898, 55317197561841526, 556788566486730535
Offset: 0
a(3) = 6: 3, 13, 1|3, 2|3, 13|2, 1|2|3.
-
b:= proc(n, m, i) option remember; `if`(n=0, 1, add(
`if`(i=j and j>0, 0, b(n-1, max(m, j), j)), j=0..m+1))
end:
a:= n-> b(n, 0$2)-`if`(n>0, b(n-1, 0$2), 0):
seq(a(n), n=0..30);
-
b[n_, m_, i_] := b[n, m, i] = If[n == 0, 1, Sum[If[i == j && j > 0, 0, b[n-1, Max[m, j], j]], {j, 0, m+1}]];
a[n_] := b[n, 0, 0] - If[n > 0, b[n-1, 0, 0], 0];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Sep 18 2024, after Alois P. Heinz *)
Comments