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.

Previous Showing 31-40 of 106 results. Next

A374356 a(n) is the greatest fibbinary number f <= n such that n - f is also a fibbinary number whose binary expansion has no common 1's with that of f (where fibbinary numbers correspond to A003714).

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 4, 5, 8, 9, 10, 10, 8, 9, 10, 10, 16, 17, 18, 18, 20, 21, 20, 21, 16, 17, 18, 18, 20, 21, 20, 21, 32, 33, 34, 34, 36, 37, 36, 37, 40, 41, 42, 42, 40, 41, 42, 42, 32, 33, 34, 34, 36, 37, 36, 37, 40, 41, 42, 42, 40, 41, 42, 42, 64, 65, 66, 66
Offset: 0

Views

Author

Rémy Sigrist, Jul 06 2024

Keywords

Comments

To compute a(n): replace every other bit with zero (starting with the second bit) in each run of consecutive 1's in the binary expansion of n.
From Gus Wiseman, Jul 11 2025: (Start)
This is the greatest binary rank of a sparse subset of the binary indices of n, where:
1. The binary indices of a nonnegative integer are the positions of 1 in its reversed binary expansion.
2. A set is sparse iff 1 is not a first difference.
3. The binary rank of a set {S_1,S_2,...} is Sum_i 2^(S_i-1).
(End)

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     2      10         10
   3     2      11         10
   4     4     100        100
   5     5     101        101
   6     4     110        100
   7     5     111        101
   8     8    1000       1000
   9     9    1001       1001
  10    10    1010       1010
  11    10    1011       1010
  12     8    1100       1000
  13     9    1101       1001
  14    10    1110       1010
  15    10    1111       1010
  16    16   10000      10000
		

Crossrefs

The union is A003714 (Fibbinary numbers).
For prime instead of binary indices we have A385216.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A166469 counts sparse submultisets of prime indices, maximal A385215.
A245564 counts sparse subsets of binary indices, maximal case A384883.
A319630 ranks sparse submultisets of prime indices, complement A104210.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    fbi[q_]:=If[q=={},0,Total[2^q]/2];
    Table[Max@@fbi/@Select[Subsets[bpe[n]],FreeQ[Differences[#],1]&],{n,0,100}] (* Gus Wiseman, Jul 11 2025 *)
  • PARI
    a(n) = { my (v = 0, e, x, y, b); while (n, x = y = 0; e = valuation(n, 2); for (k = 0, oo, if (bittest(n, e+k), n -= b = 2^(e+k); [x, y] = [y + b, x], v += x; break;););); return (v); }

Formula

a(n) = A374354(n, A277561(n)-1).
a(n) = n - A374355(n).
a(n) <= n with equality iff n is a fibbinary number.

A055244 Number of certain stackings of n+1 squares on a double staircase.

Original entry on oeis.org

1, 1, 3, 6, 12, 23, 43, 79, 143, 256, 454, 799, 1397, 2429, 4203, 7242, 12432, 21271, 36287, 61739, 104791, 177476, 299978, 506111, 852457, 1433593, 2407443, 4037454, 6762708, 11314391, 18909139, 31569799, 52657247, 87751624
Offset: 0

Views

Author

Wolfdieter Lang, May 10 2000

Keywords

Comments

a(n)= G_{n+1} of Turban reference eq.(3.9).
Equals A046854 * [1,2,3,...]. - Gary W. Adamson, Dec 23 2008
(1 + x + 3x^2 + 6x^3 + ...) = (1 + x + 2x^2 + 3x^3 + 5x^4 + 8x^5 + ...) * (1 + x^2 + 2x^3 + 3x^4 + 5x^5 + 8x^6 + ...). -Gary W. Adamson, Jul 27 2010
Column 1 of A194540. - R. H. Hardin, Aug 28 2011

References

  • L. Turban, Lattice animals on a staircase and Fibonacci numbers, J.Phys. A 33 (2000) 2587-2595.

Crossrefs

Programs

  • Maple
    a:= n-> (Matrix([[1,-1,2,-4]]). Matrix(4, (i,j)-> if (i=j-1) then 1 elif j=1 then [2,1,-2,-1][i] else 0 fi)^(n))[1,1] ; seq (a(n), n=0..33); # Alois P. Heinz, Aug 05 2008
  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = (((n-4)*n-6)*a[n-2] + ((n-5)*n-11)*a[n-1]) / ((n-6)*n-1); Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 11 2014 *)
    CoefficientList[Series[(1 - x + x^3)/(1 - x - x^2)^2, {x, 0, 50}], x] (* Vincenzo Librandi, Mar 13 2014 *)
    LinearRecurrence[{2,1,-2,-1},{1,1,3,6},60] (* Harvey P. Dale, Jul 13 2022 *)

Formula

G.f.: (1-x+x^3)/(1-x-x^2)^2. (from Turban reference eq.(3.3) with t=1).
a(n) = ((n+5)*F(n+1)+(2*n-3)*F(n))/5 with F(n)=A000045(n) (Fibonacci numbers) (from Turban reference eq.(3.9)).
a(n) = A001629(n+1) + F(n-1). - Gary W. Adamson, Jul 27 2007
a(n) = (((n-4)*n-6)*a(n-2) + ((n-5)*n-11)*a(n-1)) / ((n-6)*n-1). - Jean-François Alcover, Mar 11 2014

A076791 Triangle a(n,k) giving number of binary sequences of length n containing k subsequences 00.

Original entry on oeis.org

1, 2, 3, 1, 5, 2, 1, 8, 5, 2, 1, 13, 10, 6, 2, 1, 21, 20, 13, 7, 2, 1, 34, 38, 29, 16, 8, 2, 1, 55, 71, 60, 39, 19, 9, 2, 1, 89, 130, 122, 86, 50, 22, 10, 2, 1, 144, 235, 241, 187, 116, 62, 25, 11, 2, 1, 233, 420, 468, 392, 267, 150, 75, 28, 12, 2, 1, 377, 744, 894, 806, 588, 363, 188, 89, 31, 13, 2, 1
Offset: 0

Views

Author

Roger Cuculière, Nov 16 2002

Keywords

Comments

The triangle of numbers of n-sequences of 0,1 with k subsequences of consecutive 01 is A034867 because this number is C(n+1,2*k+1). I have not yet found a formula for subsequences 00.
The problem is equivalent to one encountered by David W. Wilson, Dept of Geography, University of Southampton, UK, in his work on Markov models for rainfall disaggregation. He asked for the number of ways in which there can be k instances of adjacent rainy days in a period of n consecutive days. Representing a rainy day by 0 and a fine day by 1, the problem is equivalent to that solved by this sequence. - E. Keith Lloyd (ekl(AT)soton.ac.uk), Nov 29 2004
Row n (n>=1) contains n terms.
Triangle, with zeros omitted, given by (2, -1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 12 2011
a(n-1,k) is also the number of permutations avoiding both 132 and 213 with k double descents, i.e., positions with w[i]>w[i+1]>w[i+2]. - Lara Pudwell, Dec 19 2018

Examples

			a(5,2) = 6 because the binary sequences of length 5 with 2 subsequences 00 are 10001, 11000, 01000, 00100, 00010, 00011.
Triangle begins
   1;
   2;
   3,  1;
   5,  2, 1;
   8,  5, 2, 1;
  13, 10, 6, 2, 1;
  ...
		

Crossrefs

Cf. a(n,1) = A001629, a(n,2) = A055243.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, 1,
          expand(b(n-1, 1)*x^l)+b(n-1, 0))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Sep 17 2019
  • Mathematica
    f[list_] := Select[list, #>0&]; nn=10; a=1/(1-y x); b= x/(1-y x) +1; c=1/(1-x); Map[f, CoefficientList[Series[c b/(1-(a x^2 c)), {x,0,nn}], {x,y}]]//Flatten (* Geoffrey Critzer, Mar 05 2012 *)
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + v[n - 1, x];
    v[n_, x_] := u[n - 1, x] + v[n - 1, x];
    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[%]    (* A053538 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A076791 *)
    (* Clark Kimberling, Mar 08 2012 *)
    T[ n_, k_] := If[n<2, (n+1)*Boole[n > -1 && k == 0], T[n, k] = T[n-1, k] + T[n-1, k-1] + T[n-2, k] - T[n-2, k-1] ]; (* Michael Somos, Sep 21 2024 *)
  • PARI
    {T(n, k) = if(n<2, (n+1)*(n > -1 && k == 0), T(n-1, k) + T(n-1, k-1) + T(n-2, k) - T(n-2, k-1) )}; /* Michael Somos, Sep 21 2024 */

Formula

Recurrence: a(n, k) = (a(n-1, k) + a(n-2, k)) + (a(n-3, k-1) + a(n-4, k-2) + ... + a(n-k-2, 0)).
Special values: a(n, 0) = Fibonacci(n+1); a(n, n-1) = 1 for n >= 2; a(n, n-2) = 2 for n >= 3; a(n, n-3) = n + 1 for n >= 4, etc.
a(n, n-4) = 3*n - 5 for n >= 5, a(n, n-5) = (n^2 + 5*n - 26)/2 for n >= 6, a(n, n-6) = 2*n^2 - 8*n - 4, for n >= 7 etc.
Recurrence relation: a(n+1, k) = a(n, k) + a(n-1, k) + a(n, k-1) - a(n-1, k-1) for k >= 1, n >= 1.
Generating function: a(n, k) is coefficient of x^n in ((x^(k + 1))*((1 - x)^(k - 1)))/((1 - x - x^2)^(k + 1)) for k >= 1. - E. Keith Lloyd (ekl(AT)soton.ac.uk), Nov 29 2004
G.f.: (1 + (1 - t)*x)/(1 - (1 + t)*x - (1 - t)*x^2). [Carlitz-Scoville] - Emeric Deutsch, May 19 2006
A076791 is jointly generated with A053538 as an array of coefficients of polynomials u(n,x): initially, u(1,x) = v(1,x) = 1; for n > 1, u(n,x) = x*u(n-1,x) + v(n-1)*x and v(n,x) = u(n-1,x) + v(n-1,x). See the Mathematica section. - Clark Kimberling, Mar 08 2012

Extensions

More terms from E. Keith Lloyd (ekl(AT)soton.ac.uk), Nov 29 2004

A202064 Triangle T(n,k), read by rows, given by (2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 4, 0, 0, 5, 10, 1, 0, 0, 6, 20, 6, 0, 0, 0, 7, 35, 21, 1, 0, 0, 0, 8, 56, 56, 8, 0, 0, 0, 0, 9, 84, 126, 36, 1, 0, 0, 0, 0, 10, 120, 252, 120, 10, 0, 0, 0, 0, 0, 11, 165, 462, 330, 55, 1, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 10 2011

Keywords

Comments

Riordan array (x/(1-x)^2, x^2/(1-x)^2).
Mirror image of triangle in A119900.
A203322*A130595 as infinite lower triangular matrices. - Philippe Deléham, Jan 05 2011
From Gus Wiseman, Jul 07 2025: (Start)
Also the number of subsets of {1..n} containing n with k maximal runs (sequences of consecutive elements increasing by 1). For example, row n = 5 counts the following subsets:
{5} {1,5} {1,3,5}
{4,5} {2,5}
{3,4,5} {3,5}
{2,3,4,5} {1,2,5}
{1,2,3,4,5} {1,4,5}
{2,3,5}
{2,4,5}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
For anti-runs instead of runs we have A053538.
Without requiring n see A210039, A202023, reverse A098158, A109446.
(End)

Examples

			Triangle begins :
1
2, 0
3, 1, 0
4, 4, 0, 0
5, 10, 1, 0, 0
6, 20, 6, 0, 0, 0
7, 35, 21, 1, 0, 0, 0
8, 56, 56, 8, 0, 0, 0, 0
		

Crossrefs

Cf. A007318, A005314 (antidiagonal sums), A119900, A084938, A130595, A203322.
Column k = 1 is A000027.
Row sums are A000079.
Column k = 2 is A000292.
Without zeros we have A034867.
Last nonzero term in each row appears to be A124625.
A034839 counts subsets by number of maximal runs, for anti-runs A384893.
A116674 counts strict partitions by number of maximal runs, for anti-runs A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Length[Split[#,#2==#1+1&]]==k&]],{n,12},{k,n}] (* Gus Wiseman, Jul 07 2025 *)

Formula

G.f.: 1/((1-x)^2-y*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000027(n+1), A000079(n), A000129(n+1), A002605(n+1), A015518(n+1), A063727(n), A002532(n+1), A083099(n+1), A015519(n+1), A003683(n+1), A002534(n+1), A083102(n), A015520(n+1), A091914(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 11, 12, 13 respectively.
T(n,k) = binomial(n+1,2k+1).
T(n,k) = 2*T(n-1,k) + T(n-2,k-1) - T(n-2,k), T(0,0) = 1, T(1,0) = 2, T(1,1) = 0 and T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Mar 15 2012

A268789 T(n,k)=Number of nXk binary arrays with some element plus some horizontally, vertically or antidiagonally adjacent neighbor totalling two exactly once.

Original entry on oeis.org

0, 1, 1, 2, 5, 2, 5, 17, 17, 5, 10, 48, 72, 48, 10, 20, 131, 302, 302, 131, 20, 38, 338, 1144, 1714, 1144, 338, 38, 71, 850, 4207, 9085, 9085, 4207, 850, 71, 130, 2091, 14984, 46195, 67100, 46195, 14984, 2091, 130, 235, 5061, 52335, 228384, 477128, 477128, 228384
Offset: 1

Views

Author

R. H. Hardin, Feb 13 2016

Keywords

Comments

Table starts
...0.....1......2........5........10..........20............38.............71
...1.....5.....17.......48.......131.........338...........850...........2091
...2....17.....72......302......1144........4207.........14984..........52335
...5....48....302.....1714......9085.......46195........228384........1105510
..10...131...1144.....9085.....67100......477128.......3295246.......22302699
..20...338...4207....46195....477128.....4725018......45515227......429442918
..38...850..14984...228384...3295246....45515227.....611932378.....8057509992
..71..2091..52335..1105510..22302699...429442918....8057509992...148013550916
.130..5061.179854..5267662.148575958..3988796543..104456486696..2677312316674
.235.12095.610504.24786180.977609634.36591758790.1337467436839.47829470133134

Examples

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

Crossrefs

Column 1 is A001629.

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -2*a(n-3) -a(n-4)
k=2: a(n) = 2*a(n-1) +3*a(n-2) -2*a(n-3) -6*a(n-4) -4*a(n-5) -a(n-6)
k=3: [order 10]
k=4: [order 16]
k=5: [order 26]
k=6: [order 42]
k=7: [order 68]

A038731 Number of columns in all directed column-convex polyominoes of area n+1.

Original entry on oeis.org

1, 3, 10, 32, 99, 299, 887, 2595, 7508, 21526, 61251, 173173, 486925, 1362627, 3797374, 10543724, 29180067, 80521055, 221610563, 608468451, 1667040776, 4558234018, 12441155715, 33900136297, 92230468249, 250570010499, 679844574322, 1842280003640
Offset: 0

Views

Author

Clark Kimberling, May 02 2000

Keywords

Comments

Apply Riordan array (1/(1-x), x/(1-x)^2) to n+1. - Paul Barry, Oct 13 2009
Binomial transform of (A001629 shifted left twice). - R. J. Mathar, Feb 06 2010

Crossrefs

Row-sums of array T as in A038730.
First differences of A030267.
Row sums of A318942(n+1).
Cf. A000045.

Programs

  • Haskell
    a038731 n = a038731_list !! n
    a038731_list = c [1] $ tail a000045_list where
       c us vs'@(v:vs) = (sum $ zipWith (*) us vs') : c (v:us) vs
    -- Reinhard Zumkeller, Oct 31 2013
  • Magma
    I:=[1, 3, 10, 32]; [n le 4 select I[n] else 6*Self(n-1)-11*Self(n-2)+6*Self(n-3)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Feb 04 2012
    
  • Mathematica
    Table[Sum[Binomial[n, k]*CoefficientList[Series[1/(1 - x - x^2)^2, {x, 0, k}], x][[-1]], {k, 0, n}], {n, 0, 27}] (* Arkadiusz Wesolowski, Feb 03 2012 *)
    LinearRecurrence[{6, -11, 6, -1}, {1, 3, 10, 32}, 30] (* Vincenzo Librandi, Feb 04 2012 *)

Formula

5*a(n) = (2n+1)*F(2n+2) - (n-4)*F(2n+1), where the F(n)'s are the Fibonacci numbers, F(0)=0, F(1)=1.
a(n) = Sum_{k=1..n+1} k*binomial(n+k-1, 2k-2). - Emeric Deutsch, Jun 11 2003
From Paul Barry, Oct 13 2009: (Start)
G.f.: (1-x)^3/(1-3x+x^2)^2.
a(n) = Sum_{k=0..n} binomial(n+k, 2k)*(k+1). (End)
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) - a(n-4). - R. J. Mathar, Feb 06 2010
a(n) = Sum_{k=0..n} (F(2k)+0^k)*F(2n-2k+1). - Paul Barry, Jun 23 2010
E.g.f.: exp(3*x/2)*(5*(5 + 4*x)*cosh(sqrt(5)*x/2) + sqrt(5)*(7 + 10*x)*sinh(sqrt(5)*x/2))/25. - Stefano Spezia, Mar 04 2025

Extensions

Entry improved by comments from Emeric Deutsch, Jun 14 2001

A245564 a(n) = Product_{i in row n of A245562} Fibonacci(i+2).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 3, 5, 2, 4, 4, 6, 3, 6, 5, 8, 2, 4, 4, 6, 4, 8, 6, 10, 3, 6, 6, 9, 5, 10, 8, 13, 2, 4, 4, 6, 4, 8, 6, 10, 4, 8, 8, 12, 6, 12, 10, 16, 3, 6, 6, 9, 6, 12, 9, 15, 5, 10, 10, 15, 8, 16, 13, 21, 2, 4, 4, 6, 4, 8, 6, 10, 4, 8, 8, 12, 6, 12, 10, 16, 4, 8, 8, 12, 8, 16, 12, 20, 6, 12, 12, 18
Offset: 0

Views

Author

N. J. A. Sloane, Aug 10 2014; revised Sep 05 2014

Keywords

Comments

This is the Run Length Transform of S(n) = Fibonacci(n+2).
The Run Length Transform of a sequence {S(n), n>=0} is defined to be the sequence {T(n), n>=0} given by T(n) = Product_i S(i), where i runs through the lengths of runs of 1's in the binary expansion of n. E.g. 19 is 10011 in binary, which has two runs of 1's, of lengths 1 and 2. So T(19) = S(1)*S(2). T(0)=1 (the empty product).
Also the number of sparse subsets of the binary indices of n, where a set is sparse iff 1 is not a first difference. The maximal case is A384883. For prime instead of binary indices we have A166469. - Gus Wiseman, Jul 05 2025

Examples

			From _Gus Wiseman_, Jul 05 2025: (Start)
The binary indices of 11 are {1,2,4}, with sparse subsets {{},{1},{2},{4},{1,4},{2,4}}, so a(11) = 6.
The maximal runs of binary indices of 11 are ((1,2),(4)), with lengths (2,1), so a(11) = F(2+2)*F(1+2) = 6.
The a(0) = 1 through a(12) = 3 sparse subsets are:
  0    1    2    3    4    5    6    7    8    9    10    11    12
  ------------------------------------------------------------------
  {}   {}   {}   {}   {}   {}   {}   {}   {}   {}    {}    {}    {}
       {1}  {2}  {1}  {3}  {1}  {2}  {1}  {4}  {1}   {2}   {1}   {3}
                 {2}       {3}  {3}  {2}       {4}   {4}   {2}   {4}
                           {1,3}     {3}       {1,4} {2,4} {4}
                                     {1,3}                 {1,4}
                                                           {2,4}
The greatest number whose set of binary indices is a member of column n above is A374356(n).
(End)
		

Crossrefs

A034839 counts subsets by number of maximal runs, strict partitions A116674.
A384877 gives lengths of maximal anti-runs of binary indices, firsts A384878.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Maple
    with(combinat); ans:=[];
    for n from 0 to 100 do lis:=[]; t1:=convert(n,base,2); L1:=nops(t1); out1:=1; c:=0;
    for i from 1 to L1 do
       if out1 = 1 and t1[i] = 1 then out1:=0; c:=c+1;
       elif out1 = 0 and t1[i] = 1 then c:=c+1;
       elif out1 = 1 and t1[i] = 0 then c:=c;
       elif out1 = 0 and t1[i] = 0 then lis:=[c,op(lis)]; out1:=1; c:=0;
       fi;
       if i = L1 and c>0 then lis:=[c,op(lis)]; fi;
                       od:
    a:=mul(fibonacci(i+2), i in lis);
    ans:=[op(ans),a];
    od:
    ans;
  • Mathematica
    a[n_] := Sum[Mod[Binomial[3k, k] Binomial[n, k], 2], {k, 0, n}];
    a /@ Range[0, 100] (* Jean-François Alcover, Feb 29 2020, after Chai Wah Wu *)
    spars[S_]:=Select[Subsets[S],FreeQ[Differences[#],1]&];
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Length[spars[bpe[n]]],{n,0,30}] (* Gus Wiseman, Jul 05 2025 *)
  • PARI
    a(n)=my(s=1,k); while(n, n>>=valuation(n,2); k=valuation(n+1,2); s*=fibonacci(k+2); n>>=k); s \\ Charles R Greathouse IV, Oct 21 2016
    
  • Python
    # use RLT function from A278159
    from sympy import fibonacci
    def A245564(n): return RLT(n,lambda m: fibonacci(m+2)) # Chai Wah Wu, Feb 04 2022

Formula

a(n) = Sum_{k=0..n} ({binomial(3k,k)*binomial(n,k)} mod 2). - Chai Wah Wu, Oct 19 2016

A268740 T(n,k)=Number of nXk binary arrays with some 1 horizontally or vertically adjacent to some other 1 exactly once.

Original entry on oeis.org

0, 1, 1, 2, 4, 2, 5, 15, 15, 5, 10, 48, 80, 48, 10, 20, 145, 396, 396, 145, 20, 38, 420, 1788, 2876, 1788, 420, 38, 71, 1183, 7831, 19591, 19591, 7831, 1183, 71, 130, 3264, 33170, 128232, 200204, 128232, 33170, 3264, 130, 235, 8865, 137868, 816009, 1971414
Offset: 1

Views

Author

R. H. Hardin, Feb 12 2016

Keywords

Comments

Table starts
...0.....1.......2.........5..........10............20.............38
...1.....4......15........48.........145...........420...........1183
...2....15......80.......396........1788..........7831..........33170
...5....48.....396......2876.......19591........128232.........816009
..10...145....1788.....19591......200204.......1971414.......18847982
..20...420....7831....128232.....1971414......29134076......418632185
..38..1183...33170....816009....18847982.....418632185.....9039552112
..71..3264..137868...5087814...176668038....5894815754...191307160577
.130..8865..563486..31228804..1629738420...81718671716..3985770068310
.235.23780.2275119.189328186.14851460143.1119014223138.82030747371058

Examples

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

Crossrefs

Column 1 is A001629.
Column 2 is A093967.

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -2*a(n-3) -a(n-4)
k=2: a(n) = 4*a(n-1) -2*a(n-2) -4*a(n-3) -a(n-4)
k=3: a(n) = 4*a(n-1) +8*a(n-2) -24*a(n-3) -38*a(n-4) +4*a(n-5) +12*a(n-6) -a(n-8)
k=4: [order 10]
k=5: [order 18]
k=6: [order 22]
k=7: [order 42]

A268766 T(n,k)=Number of nXk binary arrays with some element plus some horizontally, vertically, diagonally or antidiagonally adjacent neighbor totalling two exactly once.

Original entry on oeis.org

0, 1, 1, 2, 6, 2, 5, 15, 15, 5, 10, 44, 56, 44, 10, 20, 105, 223, 223, 105, 20, 38, 258, 762, 1148, 762, 258, 38, 71, 595, 2607, 5170, 5170, 2607, 595, 71, 130, 1368, 8500, 23156, 32056, 23156, 8500, 1368, 130, 235, 3069, 27411, 99057, 193573, 193573, 99057
Offset: 1

Views

Author

R. H. Hardin, Feb 13 2016

Keywords

Comments

Table starts
...0....1......2.......5........10.........20...........38............71
...1....6.....15......44.......105........258..........595..........1368
...2...15.....56.....223.......762.......2607.........8500.........27411
...5...44....223....1148......5170......23156........99057........418924
..10..105....762....5170.....32056.....193573......1129042.......6475898
..20..258...2607...23156....193573....1552272.....12111209......92571436
..38..595...8500...99057...1129042...12111209....127676872....1312123185
..71.1368..27411..418924...6475898...92571436...1312123185...18045771274
.130.3069..86622.1736105..36505596..696659613..13311824510..245588158242
.235.6830.270955.7122856.203462597.5178525870.133228716170.3292985469950

Examples

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

Crossrefs

Column 1 is A001629.
Column 2 is A193449.

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -2*a(n-3) -a(n-4)
k=2: a(n) = 2*a(n-1) +3*a(n-2) -4*a(n-3) -4*a(n-4)
k=3: a(n) = 4*a(n-1) +2*a(n-2) -16*a(n-3) -a(n-4) +12*a(n-5) -4*a(n-6)
k=4: [order 8]
k=5: [order 12]
k=6: [order 16]
k=7: [order 28]

A280440 T(n,k)=Number of nXk 0..1 arrays with no element equal to more than one of its horizontal and vertical neighbors, with the exception of exactly one element, and with new values introduced in order 0 sequentially upwards.

Original entry on oeis.org

0, 0, 0, 1, 4, 1, 2, 10, 10, 2, 5, 20, 21, 20, 5, 10, 38, 42, 42, 38, 10, 20, 68, 77, 80, 77, 68, 20, 38, 120, 136, 138, 138, 136, 120, 38, 71, 208, 236, 232, 225, 232, 236, 208, 71, 130, 358, 404, 386, 360, 360, 386, 404, 358, 130, 235, 612, 687, 640, 574, 548, 574, 640, 687
Offset: 1

Views

Author

R. H. Hardin, Jan 03 2017

Keywords

Comments

Table starts
...0...0....1....2....5...10...20...38...71..130...235...420...744..1308..2285
...0...4...10...20...38...68..120..208..358..612..1042..1768..2992..5052..8514
...1..10...21...42...77..136..236..404..687.1162..1959..3294..5528..9262.15497
...2..20...42...80..138..232..386..640.1062.1764..2934..4884..8134.13548.22562
...5..38...77..138..225..360..574..920.1487.2422..3971..6542.10814.17914.29713
..10..68..136..232..360..548..834.1284.2008.3188..5128..8332.13638.22436.37032
..20.120..236..386..574..834.1211.1784.2684.4128..6478.10334.16693.27208.44620
..38.208..404..640..920.1284.1784.2512.3620.5360..8152.12692.20136.32400.52660
..71.358..687.1062.1487.2008.2684.3620.4989.7078.10365.15642.24224.38290.61451
.130.612.1162.1764.2422.3188.4128.5360.7078.9604.13474.19576.29384.45340.71490

Examples

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

Crossrefs

Column 1 is A001629(n-1).
Column 2 is A279262.

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -2*a(n-3) -a(n-4)
k=2: a(n) = 3*a(n-1) -a(n-2) -3*a(n-3) +a(n-4) +a(n-5)
k=3: a(n) = 3*a(n-1) -a(n-2) -3*a(n-3) +a(n-4) +a(n-5) for n>6
k=4: a(n) = 4*a(n-1) -4*a(n-2) -2*a(n-3) +4*a(n-4) -a(n-6) for n>7
k=5: a(n) = 4*a(n-1) -4*a(n-2) -2*a(n-3) +4*a(n-4) -a(n-6) for n>7
k=6: a(n) = 4*a(n-1) -4*a(n-2) -2*a(n-3) +4*a(n-4) -a(n-6) for n>7
k=7: a(n) = 4*a(n-1) -4*a(n-2) -2*a(n-3) +4*a(n-4) -a(n-6) for n>7
Previous Showing 31-40 of 106 results. Next