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.

Showing 1-10 of 21 results. Next

A014417 Representation of n in base of Fibonacci numbers (the Zeckendorf representation of n). Also, binary words starting with 1 not containing 11, with the word 0 added.

Original entry on oeis.org

0, 1, 10, 100, 101, 1000, 1001, 1010, 10000, 10001, 10010, 10100, 10101, 100000, 100001, 100010, 100100, 100101, 101000, 101001, 101010, 1000000, 1000001, 1000010, 1000100, 1000101, 1001000, 1001001, 1001010, 1010000, 1010001, 1010010, 1010100, 1010101
Offset: 0

Views

Author

Keywords

Comments

Old name was: Representation of n in base of Fibonacci numbers (the Zeckendorf representation of n). Also, binary vectors not containing 11.
For n > 0, write n = Sum_{i >= 2} eps(i) Fib_i where eps(i) = 0 or 1 and no 2 consecutive eps(i) can be 1 (see A035517); then a(n) is obtained by writing the eps(i) in reverse order.
"One of the most important properties of the Fibonacci numbers is the special way in which they can be used to represent integers. Let's write j >> k <==> j >= k+2. Then every positive integer has a unique representation of the form n = F_k1 + F_k2 + ... + F_kr, where k1 >> k2 >> ... >> kr >> 0. (This is 'Zeckendorf's theorem.') ... We can always find such a representation by using a "greedy" approach, choosing F_k1 to be the largest Fibonacci number =< n, then choosing F_k2 to be the largest that is =< n - F_k1 and so on. Fibonacci representation needs a few more bits because adjacent 1's are not permitted; but the two representations are analogous." [Concrete Math.]
Since the binary representation of n in base of Fibonacci numbers allows only the successive bit pairs 00, 01, 10 and leaves 11 unused, we can use a ternary representation using all trits 0, 1, 2 where 00 --> 0, 01 --> 1 and 10 --> 2 (e.g. binary 1001010 as ternary 1022). - Daniel Forgues, Nov 30 2009
The same sequence also arises when considering the NegaFibonacci representations of the integers, as follows. Take the NegaFibonacci representations of n = 0, 1, 2, ... (A215022) and of n = -1, -2, -3, ... (A215023), sort the union of these two lists into increasing binary order, and we get A014417. Likewise the corresponding list of decimal representations, A003714, is the union of A215024 and A215025 sorted into increasing order. - N. J. A. Sloane, Aug 10 2012
Also, numbers, written in binary, such that no adjacent bits are equal to 1: A one-dimensional analog of the matrices considered in A228277/A228285, A228390, A228476, A228506 etc. - M. F. Hasler, Apr 27 2014
The sequence of final bits, starting with a(1), is the complement of the Fibonacci word A005614. - N. J. A. Sloane, Oct 03 2018
This representation is named after the Belgian Army doctor and mathematician Edouard Zeckendorf (1901-1983). - Amiram Eldar, Jun 11 2021

Examples

			The Zeckendorf expansions of 1, 2, ... are 1 = 1 = Fib_2 -> 1, 2 = 2 = Fib_3 -> 10, 3 = Fib_4 -> 100, 4 = 3+1 = Fib_4 + Fib_2 -> 101, 5 = 5 = Fib_5 -> 1000, 6 = 1+5 = Fib_2 + Fib_5 -> 1001, etc.
		

References

  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990.
  • Donald E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.3, p. 169.
  • Edouard Zeckendorf, Représentation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sci. Liège 41, 179-182, 1972.

Crossrefs

a(n) = A003714(n) converted to binary.
See A104326 for dual Zeckendorf representation of n.

Programs

  • Haskell
    a014417 0 = 0
    a014417 n = foldl (\v z -> v * 10 + z) 0 $ a189920_row n
    -- Reinhard Zumkeller, Mar 10 2013
    
  • Maple
    A014417 := proc(n)
        local nshi,Z,i ;
        if n <= 1 then
            return n;
        end if;
        nshi := n ;
        Z := [] ;
        for i from A130234(n) to 2 by -1 do
            if nshi >= A000045(i) and nshi > 0 then
                Z := [1,op(Z)] ;
                nshi := nshi-A000045(i) ;
            else
                Z := [0,op(Z)] ;
            end if;
        end do:
        add( op(i,Z)*10^(i-1),i=1..nops(Z)) ;
    end proc: # R. J. Mathar, Jan 31 2015
  • Mathematica
    fb[n_Integer] := Block[{k = Ceiling[Log[GoldenRatio, n * Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k-- ]; FromDigits[fr]]; Table[ fb[n], {n, 0, 30}] (* Robert G. Wilson v, May 15 2004 *)
    r = Map[Fibonacci, Range[2, 12]]; Table[Total[FromDigits@ PadRight[{1}, Flatten@ #] &@ Reverse@ Position[r, #] & /@ Abs@ Differences@ NestWhileList[Function[k, k - SelectFirst[Reverse@ r, # < k &]], n + 1, # > 1 &]], {n, 0, 33}] (* Michael De Vlieger, Mar 27 2016, Version 10 *)
    FromDigits/@Select[Tuples[{0,1},7],SequenceCount[#,{1,1}]==0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 14 2019 *)
  • PARI
    Zeckendorf(n)=my(k=0,v,m); while(fibonacci(k)<=n,k=k+1); m=k-1; v=vector(m-1); v[1]=1; n=n-fibonacci(k-1); while(n>0,k=0; while(fibonacci(k)<=n,k=k+1); v[m-k+2]=1; n=n-fibonacci(k-1)); v \\ Ralf Stephan
    
  • PARI
    Zeckendorf(n)= { local(k); a=0; while(n>0, k=0; while(fibonacci(k)<=n, k=k+1); a=a+10^(k-3); n=n-fibonacci(k-1); ); a }
    { for (n=0, 10000, Zeckendorf(n); print(n," ",a); write("b014417.txt", n, " ", a) ) } \\ Harry J. Smith, Jan 17 2009
    
  • Python
    from sympy import fibonacci
    def a(n):
        k=0
        x=0
        while n>0:
            k=0
            while fibonacci(k)<=n: k+=1
            x+=10**(k - 3)
            n-=fibonacci(k - 1)
        return x
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 07 2017, after PARI code by Harry J. Smith

Extensions

Comment layout fixed by Daniel Forgues, Dec 07 2009
Typo corrected by Daniel Forgues, Mar 25 2010
Definition expanded and Duchene et al. reference added by N. J. A. Sloane, Aug 07 2018
Name corrected by Michel Dekking, Nov 30 2020

A228277 Number of n X n binary arrays with top left value 1 and no two ones adjacent horizontally, vertically or nw-se diagonally.

Original entry on oeis.org

1, 1, 13, 133, 3631, 172082, 16566199, 3057290265, 1105411581741, 776531523355217, 1063228770141145384, 2834013489992345694498, 14712337761578682394367473, 148727865257442275211424889367
Offset: 1

Views

Author

R. H. Hardin, Aug 19 2013

Keywords

Comments

Main diagonal of A228285.

Examples

			The thirteen solutions for n=3 correspond to the thirteen possible values of 5-bit numbers with no two adjacent bits equal to 1, namely, the matrices
( 1 0 a )
( 0 0 b )
( e d c ) ; with abcde = A014417(0,...,12) = 0, 1, 10, 100, 101, 1000, 1001, 1010, 10000, 10001, 10010, 10100, 10101 (leading zeros omitted). - _M. F. Hasler_, Apr 27 2014
Some solutions for n=4:
.1..0..0..1.  .1..0..0..0.  .1..0..0..0.  .1..0..0..0.  .1..0..0..0
.0..0..0..0.  .0..0..0..1.  .0..0..0..0.  .0..0..1..0.  .0..0..0..0
.0..0..0..0.  .0..0..0..0.  .0..0..0..0.  .0..0..0..0.  .0..0..0..1
.1..0..0..1.  .0..1..0..1.  .0..1..0..1.  .0..1..0..0.  .0..0..1..0
The last example shows that sw-ne (= anti)diagonally adjacent "1"s are allowed. See A228476, A228506 and A228390 for other variants.
		

Crossrefs

See also the variants A228390, A228476, A228506, etc.

Formula

No known recurrence.

A226444 Number A(n,k) of tilings of a k X n rectangle using 1 X 1 squares and L-tiles; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 5, 6, 5, 1, 1, 1, 1, 8, 13, 13, 8, 1, 1, 1, 1, 13, 28, 42, 28, 13, 1, 1, 1, 1, 21, 60, 126, 126, 60, 21, 1, 1, 1, 1, 34, 129, 387, 524, 387, 129, 34, 1, 1, 1, 1, 55, 277, 1180, 2229, 2229, 1180, 277, 55, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 06 2013

Keywords

Comments

An L-tile is a 2 X 2 square with the upper right 1 X 1 subsquare removed and no rotations are allowed.

Examples

			A(3,3) = 6:
  ._____.  ._____.  ._____.  ._____.  ._____.  ._____.
  |_|_|_|  | |_|_|  |_|_|_|  |_| |_|  |_|_|_|  |_| |_|
  |_|_|_|  |___|_|  | |_|_|  |_|___|  |_| |_|  | |___|
  |_|_|_|  |_|_|_|  |___|_|  |_|_|_|  |_|___|  |___|_|.
Square array A(n,k) begins:
  1, 1,  1,   1,    1,     1,      1,       1,        1, ...
  1, 1,  1,   1,    1,     1,      1,       1,        1, ...
  1, 1,  2,   3,    5,     8,     13,      21,       34, ...
  1, 1,  3,   6,   13,    28,     60,     129,      277, ...
  1, 1,  5,  13,   42,   126,    387,    1180,     3606, ...
  1, 1,  8,  28,  126,   524,   2229,    9425,    39905, ...
  1, 1, 13,  60,  387,  2229,  13322,   78661,   466288, ...
  1, 1, 21, 129, 1180,  9425,  78661,  647252,  5350080, ...
  1, 1, 34, 277, 3606, 39905, 466288, 5350080, 61758332, ...
		

Crossrefs

Columns (or rows) k=0+1,2-10 give: A000012, A000045(n+1), A002478, A105262, A219737(n-1) for n>2, A219738 (n-1) for n>2, A219739(n-1) for n>1, A219740(n-1) for n>2, A226543, A226544.
Main diagonal gives A066864(n-1).
See A219741 for an array with very similar entries. - N. J. A. Sloane, Aug 22 2013
Cf. A322494.

Programs

  • Maple
    b:= proc(n, l) option remember; local k, t;
          if max(l[])>n then 0 elif n=0 or l=[] then 1
        elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
        else for k do if l[k]=0 then break fi od; b(n, subsop(k=1, l))+
            `if`(k b(max(n, k), [0$min(n, k)]):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
    [Zeilberger gives Maple code to find generating functions for the columns - see links in A228285. - N. J. A. Sloane, Aug 22 2013]
  • Mathematica
    b[n_, l_] := b[n, l] = Module[{k, t}, Which[Max[l] > n, 0, n == 0 || l == {}, 1, Min[l] > 0, t = Min[l]; b[n-t, l-t], True, k = Position[l, 0, 1][[1, 1]]; b[n, ReplacePart[l, k -> 1]] + If[k < Length[l] && l[[k+1]] == 0, b[n, ReplacePart[l, {k -> 1, k+1 -> 2}]], 0] ] ]; a[n_, k_] := b[Max[n, k], Array[0&, Min[n, k]]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 18 2013, translated from Maple *)

Formula

The k-th column satisfies a recurrence of order Fibonacci(k+1) [Zeilberger] - see links in A228285. - N. J. A. Sloane, Aug 22 2013

A228482 T(n,k)=Number of nXk binary arrays with top left value 1 and no two ones adjacent horizontally, vertically or antidiagonally.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 3, 5, 9, 14, 9, 5, 8, 19, 41, 41, 19, 8, 13, 41, 127, 172, 127, 41, 13, 21, 88, 386, 728, 728, 386, 88, 21, 34, 189, 1181, 3084, 4354, 3084, 1181, 189, 34, 55, 406, 3605, 13050, 25699, 25699, 13050, 3605, 406, 55, 89, 872, 11013, 55252, 152373
Offset: 1

Views

Author

R. H. Hardin Aug 22 2013

Keywords

Comments

Table starts
..1...1.....2......3.......5.........8.........13..........21............34
..1...2.....4......9......19........41.........88.........189...........406
..2...4....14.....41.....127.......386.......1181........3605.........11013
..3...9....41....172.....728......3084......13050.......55252........233875
..5..19...127....728....4354.....25699.....152373......902042.......5342712
..8..41...386...3084...25699....211588....1748684....14433982.....119188751
.13..88..1181..13050..152373...1748684...20185842...232542935....2680777055
.21.189..3605..55252..902042..14433982..232542935..3737615288...60122232373
.34.406.11013.233875.5342712.119188751.2680777055.60122232373.1349721589622
Same recurrences as A228285 except in addition this smaller one for k=5

Examples

			Some solutions for n=4 k=4
..1..0..0..1....1..0..1..0....1..0..0..1....1..0..1..0....1..0..1..0
..0..0..0..0....0..0..0..1....0..1..0..0....0..0..0..0....0..0..0..0
..0..0..0..1....0..0..0..0....0..0..1..0....0..1..0..0....0..0..0..0
..0..0..0..0....0..1..0..0....0..0..0..1....0..0..1..0....1..0..0..0
		

Crossrefs

Column 1 is A000045
Column 2 is A078039(n-1).

Formula

Recurrences for column k:
k=1: a(n) = a(n-1) +a(n-2)
k=2: a(n) = a(n-1) +2*a(n-2) +a(n-3)
k=3: a(n) = a(n-1) +5*a(n-2) +4*a(n-3) -a(n-5)
k=4: a(n) = a(n-1) +10*a(n-2) +15*a(n-3) +4*a(n-4) -6*a(n-5) -a(n-6) +3*a(n-7) -a(n-8)
k=5: a(n) = 3*a(n-1) +15*a(n-2) +16*a(n-3) -11*a(n-4) -20*a(n-5) +19*a(n-6) -8*a(n-7) +a(n-9)
k=6: a(n) = a(n-1) +42*a(n-2) +147*a(n-3) +70*a(n-4) -478*a(n-5) -449*a(n-6) +1199*a(n-7) +732*a(n-8) -2727*a(n-9) +659*a(n-10) +3827*a(n-11) -5776*a(n-12) +3926*a(n-13) -1152*a(n-14) -148*a(n-15) +154*a(n-16) +32*a(n-17) -29*a(n-18) -6*a(n-19) +3*a(n-20) +a(n-21)
k=7: a(n) = a(n-1) +85*a(n-2) +432*a(n-3) +192*a(n-4) -3711*a(n-5) -5096*a(n-6) +21164*a(n-7) +27340*a(n-8) -112654*a(n-9) -37244*a(n-10) +477721*a(n-11) -464722*a(n-12) -897815*a(n-13) +3102284*a(n-14) -4149918*a(n-15) +2761082*a(n-16) -138325*a(n-17) -1353257*a(n-18) +942033*a(n-19) +64683*a(n-20) -365483*a(n-21) +80904*a(n-22) +92350*a(n-23) -27097*a(n-24) -23292*a(n-25) +2585*a(n-26) +5635*a(n-27) +1405*a(n-28) -561*a(n-29) -545*a(n-30) -173*a(n-31) -14*a(n-32) +5*a(n-33) +a(n-34)

A219741 T(n,k) = Unmatched value maps: number of nXk binary arrays indicating the locations of corresponding elements not equal to any horizontal, vertical or antidiagonal neighbor in a random 0..1 nXk array.

Original entry on oeis.org

1, 2, 2, 4, 6, 4, 7, 13, 13, 7, 12, 28, 42, 28, 12, 21, 60, 126, 126, 60, 21, 37, 129, 387, 524, 387, 129, 37, 65, 277, 1180, 2229, 2229, 1180, 277, 65, 114, 595, 3606, 9425, 13322, 9425, 3606, 595, 114, 200, 1278, 11012, 39905, 78661, 78661, 39905, 11012, 1278, 200
Offset: 1

Views

Author

R. H. Hardin, Nov 26 2012

Keywords

Comments

Table starts
...1.....2......4........7.........12...........21.............37
...2.....6.....13.......28.........60..........129............277
...4....13.....42......126........387.........1180...........3606
...7....28....126......524.......2229.........9425..........39905
..12....60....387.....2229......13322........78661.........466288
..21...129...1180.....9425......78661.......647252........5350080
..37...277...3606....39905.....466288......5350080.......61758332
..65...595..11012...168925....2760690.....44159095......711479843
.114..1278..33636...715072...16350693....364647622.....8201909757
.200..2745.102733..3027049...96830726...3010723330....94531063074
.351..5896.313781.12813931..573456240..24858935864..1089590912023
.616.12664.958384.54243509.3396136349.205253857220.12558669019786

Examples

			Some solutions for n=3 k=4
..0..0..0..0....1..0..0..1....0..0..1..0....0..0..1..0....0..0..0..1
..0..1..0..0....0..0..0..0....1..0..0..0....0..0..0..0....0..1..0..0
..0..0..0..0....0..1..0..1....0..0..0..1....1..0..0..1....0..0..0..0
		

Crossrefs

Column 1 is A005251(n+2).
Column 2 is A002478(n+1).
Column 3 is A105262(n+1) for n>1.
Main diagonal is A066864.
See A226444 for an array with very similar entries. - N. J. A. Sloane, Aug 22 2013

Formula

Zeilberger's Maple code (see links in A228285) would presumably give recurrences for the columns of this array. - N. J. A. Sloane, Aug 22 2013

A219737 Unmatched value maps: number of n X 4 binary arrays indicating the locations of corresponding elements not equal to any horizontal, vertical or antidiagonal neighbor in a random 0..1 n X 4 array.

Original entry on oeis.org

7, 28, 126, 524, 2229, 9425, 39905, 168925, 715072, 3027049, 12813931, 54243509, 229621433, 972024617, 4114736810, 17418344167, 73734658344, 312130693269, 1321299533915, 5593273893746, 23677229915913, 100229530526756
Offset: 1

Views

Author

R. H. Hardin, Nov 26 2012

Keywords

Comments

Column 4 of A219741.

Examples

			Some solutions for n=3:
..0..1..0..1....0..0..1..0....0..0..0..1....1..0..1..0....1..0..0..0
..0..0..0..0....1..0..0..0....1..0..0..0....0..0..0..0....0..0..0..0
..1..0..0..0....0..1..0..1....0..1..0..0....0..1..0..1....1..0..0..0
		

Crossrefs

Cf. A219741.

Formula

Empirical: a(n) = a(n-1) + 10*a(n-2) + 15*a(n-3) + 4*a(n-4) - 6*a(n-5) - a(n-6) + 3*a(n-7) - a(n-8) for n>9.
Zeilberger's Maple code (see links in A228285) would give a proof that this recurrence is correct. - N. J. A. Sloane, Aug 22 2013
G.f.: x*(1 + x)*(7 + 14*x + 14*x^2 - x^3 - 2*x^4 - 2*x^5 + 3*x^6 - x^7) / (1 - x - 10*x^2 - 15*x^3 - 4*x^4 + 6*x^5 + x^6 - 3*x^7 + x^8). - Colin Barker, Mar 12 2018

A219738 Unmatched value maps: number of nX5 binary arrays indicating the locations of corresponding elements not equal to any horizontal, vertical or antidiagonal neighbor in a random 0..1 nX5 array.

Original entry on oeis.org

12, 60, 387, 2229, 13322, 78661, 466288, 2760690, 16350693, 96830726, 573456240, 3396136349, 20112704280, 119112043349, 705408898268, 4177593432263, 24740667779362, 146519915909536, 867724589734469, 5138864287202152
Offset: 1

Views

Author

R. H. Hardin Nov 26 2012

Keywords

Comments

Column 5 of A219741

Examples

			Some solutions for n=3
..0..1..0..0..0....0..1..0..0..0....1..0..1..0..0....0..0..1..0..0
..0..0..1..0..0....0..0..0..0..1....0..0..0..0..0....0..0..0..0..1
..1..0..0..1..0....0..1..0..0..0....1..0..1..0..0....0..1..0..0..0
		

Formula

Empirical: a(n) = a(n-1) +21*a(n-2) +48*a(n-3) +14*a(n-4) -69*a(n-5) -38*a(n-6) +68*a(n-7) +13*a(n-8) -57*a(n-9) +37*a(n-10) -8*a(n-11) -2*a(n-12) +a(n-13) for n>14
Zeilberger's Maple code (see links in A228285) would give a proof that this recurrence is correct. - N. J. A. Sloane, Aug 22 2013

A219739 Unmatched value maps: number of nX6 binary arrays indicating the locations of corresponding elements not equal to any horizontal, vertical or antidiagonal neighbor in a random 0..1 nX6 array.

Original entry on oeis.org

21, 129, 1180, 9425, 78661, 647252, 5350080, 44159095, 364647622, 3010723330, 24858935864, 205253857220, 1694729679245, 13992960979394, 115536377026413, 953955009802438, 7876568121973188, 65034854910941849, 536976546612691621
Offset: 1

Views

Author

R. H. Hardin Nov 26 2012

Keywords

Comments

Column 6 of A219741

Examples

			Some solutions for n=3
..1..0..1..0..1..0....0..0..1..0..0..0....0..0..0..0..0..0....0..0..1..0..0..1
..0..0..0..0..0..0....1..0..0..1..0..1....0..1..0..0..0..1....0..0..0..0..0..0
..1..0..0..1..0..0....0..0..0..0..0..0....0..0..0..1..0..0....0..1..0..1..0..1
		

Formula

Zeilberger's Maple code (see links in A228285) would give a recurrence for this sequence. - N. J. A. Sloane, Aug 22 2013

A219740 Unmatched value maps: number of nX7 binary arrays indicating the locations of corresponding elements not equal to any horizontal, vertical or antidiagonal neighbor in a random 0..1 nX7 array.

Original entry on oeis.org

37, 277, 3606, 39905, 466288, 5350080, 61758332, 711479843, 8201909757, 94531063074, 1089590912023, 12558669019786, 144752526242487, 1668430514943073, 19230483410164823, 221652312986931867
Offset: 1

Views

Author

R. H. Hardin Nov 26 2012

Keywords

Comments

Column 7 of A219741

Examples

			Some solutions for n=3
..0..0..1..0..0..0..1....1..0..0..0..0..0..1....0..0..1..0..0..1..0
..0..0..0..0..0..0..0....0..1..0..0..1..0..0....0..0..0..0..0..0..0
..1..0..1..0..0..0..1....0..0..0..0..0..1..0....0..1..0..1..0..0..0
		

Formula

Zeilberger's Maple code (see links in A228285) would give a recurrence for this sequence. - N. J. A. Sloane, Aug 22 2013

A228278 Number of n X 3 binary arrays with top left value 1 and no two ones adjacent horizontally, vertically or nw-se diagonally.

Original entry on oeis.org

2, 3, 13, 35, 112, 337, 1034, 3154, 9637, 29431, 89895, 274564, 838609, 2561372, 7823242, 23894643, 72981777, 222909351, 680835436, 2079486057, 6351405998, 19399196250, 59251261117, 180972030923, 552745635451, 1688259428536
Offset: 1

Views

Author

R. H. Hardin, Aug 19 2013

Keywords

Comments

Column 3 of A228285.

Examples

			Some solutions for n=4:
..1..0..0....1..0..0....1..0..0....1..0..1....1..0..0....1..0..1....1..0..0
..0..0..0....0..0..0....0..0..1....0..0..0....0..0..0....0..0..0....0..0..0
..0..0..1....0..0..0....0..0..0....0..0..0....1..0..0....0..0..1....0..1..0
..0..0..0....1..0..1....1..0..0....0..1..0....0..0..1....0..1..0....1..0..0
		

Crossrefs

See A228277-A228285, especially the latter.

Formula

a(n) = a(n-1) + 5*a(n-2) + 4*a(n-3) - a(n-5).
G.f.: x*(2 + x - x^3) / ((1 + x)*(1 - 2*x - 3*x^2 - x^3 + x^4)). - Colin Barker, Mar 16 2018

Extensions

Edited by N. J. A. Sloane, Aug 22 2013
Showing 1-10 of 21 results. Next