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 10 results.

A133872 Period 4: repeat [1, 1, 0, 0].

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Partial sums of A056594.
Let i=sqrt(-1) and S(n) = Sum_{k=0..n-1} exp(2*Pi*i*k^2/n) for n>=1 the famous Gauss sum. Then S(n) = (a(n)+a(n+1)*i)*sqrt(n). - Franz Vrabec, Nov 08 2007
a(A042948(n)) = 1; a(A042964(n)) = 0. - Reinhard Zumkeller, Oct 03 2008
a(n) is also the real part of partial sum of powers of the complex unit i. - Enrique Pérez Herrero, Aug 16 2009
Periodic sequences having a period of 2k and composed of k ones followed by k zeros have a closed formula of floor(((n+k) mod 2k)/k). Listed sequences of this form are: k=1..A000035(n+1), k=2..A133872(n), k=3..A088911, k=4..A131078(n), k=5..A112713(n-1). - Gary Detlefs, May 17 2011
0.repeat(0,0,1,1) is 1/5 in base 2, due to 1/5 = (3/16)/(1-1/16). For the general case see 1/A062158(n) in base n >= 2. Here n = 2. - Wolfdieter Lang, Jun 20 2014
a(n) (for n>=1) is the determinant of the n X n Toeplitz matrix M satisfying: M(i,j)=1 if -1<=j-i<=2 and 0 otherwise. - Dmitry Efimov, Jun 23 2015
a(n) (for n>=1) is the difference between numbers of even and odd permutations p of 1,2,...,n such that -1 <= p(i)-i <= 2 for i=1,2,...,n. - Dmitry Efimov, Jan 08 2016
The binomial transform is 1, 2, 3, 4, 6, 12,... (see A038504). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 + x + x^4 + x^5 + x^8 + x^9 + x^12 + x^13 + x^16 + x^17 + x^20 + ...
		

Crossrefs

Programs

Formula

a(n) = (1 + floor(n/2)) mod 2.
a(n) = A004526(A000035(n+2)).
a(n) = 1 + floor(n/2) - 2*floor((n+2)/4).
a(n) = (((n+2) mod 4) - (n mod 2))/2.
a(n) = ((n + 2 - (n mod 2))/2) mod 2.
a(n) = ((2*n + 3 + (-1)^n)/4) mod 2.
a(n) = (1 + (-1)^((2*n - 1 + (-1)^n)/4))/2.
a(n) = binomial(n+2, n) mod 2 = binomial(n+2, 2) mod 2.
a(n) = A000217(n+1) mod 2.
G.f.: (1+x)/(1-x^4) = 1/((1-x)(1+x^2)).
a(n) = 1/2 + (1/2)*cos(Pi*n/2) + (1/2)*sin(Pi*n/2). a(n) = A021913(n+2). - R. J. Mathar, Nov 15 2007
From Jaume Oliver Lafont, Dec 05 2008: (Start)
a(n) = 1/2 + sin((2n+1)Pi/4)/sqrt(2).
a(n) = 1/2 + cos((2n-1)Pi/4)/sqrt(2). (End)
a(n) = Re(Sum_{k=0..n} i^k), where i=sqrt(-1) and Re is the real part of a complex number. a(n) = (1/2)*((Sum_{k=0..n} i^k) + Sum_{k=0..n} i^-k) = Re((1/2)*(1 + i)*(1 - i^(n+1))). - Enrique Pérez Herrero, Aug 16 2009
a(n) = (1 + i^(n*(n-1)))/2, where i=sqrt(-1). - Bruno Berselli, May 18 2011
a(n) = (Sum_{k=1..n} k^j) mod 2, for any j. - Gary Detlefs, Dec 28 2011
a(n) = a(n-1) - a(n-2) + a(n-3) for n>2. - Jean-Christophe Hervé, May 01 2013
a(n) = 1 - floor(n/2) + 2*floor(n/4) = 1 - A004526(n) + A122461(n). - Wesley Ivan Hurt, Dec 06 2013
a(n) = (1 + (-1)^floor(n/2))/2. - Wesley Ivan Hurt, Apr 17 2014
a(n) = A054925(n+2) - A011848(n+2). - Wesley Ivan Hurt, Jun 09 2014
Euler transform of length 4 sequence [1, -1, 0, 1]. - Michael Somos, Sep 26 2014
a(n) = a(1-n) for all n in Z. - Michael Somos, Sep 26 2014
From Ilya Gutkovskiy, Jul 09 2016: (Start)
Inverse binomial transform of A038504(n+1).
E.g.f.: (exp(x) + sin(x) + cos(x))/2. (End)
a(n) = (1 + (-1)^(n*(n-1)/2))/2. - Guenther Schrack, Apr 04 2019

Extensions

Definition rewritten by N. J. A. Sloane, Apr 30 2009

A088911 Period 6: repeat [1, 1, 1, 0, 0, 0].

Original entry on oeis.org

1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Oct 22 2003

Keywords

Comments

For periodic sequences having a period of 2*k and composed of k ones followed by k zeros we have a(n) = floor(((n+k) mod 2*k)/k). Sequences of this form are A000035(n+1) (k=1), A133872(n) (k=2), this sequence (k=3), A131078(n) (k=4), and A112713(n-1) (k=5). - Gary Detlefs, May 17 2011

Crossrefs

Programs

  • Magma
    &cat [[1, 1, 1, 0, 0, 0]^^30]; // Wesley Ivan Hurt, Jul 05 2016
    
  • Maple
    seq(op([1, 1, 1, 0, 0, 0]), n=0..40); # Wesley Ivan Hurt, Jul 05 2016
  • Mathematica
    CoefficientList[Series[(1 + x + x^2)/(1 - x^6), {x, 0, 50}], x]
    Flatten[Table[{1,1,1,0,0,0},{20}]] (* Harvey P. Dale, Jul 17 2011 *)
  • PARI
    a(n)=n%6<3 \\ Jaume Oliver Lafont, Mar 17 2009
    
  • Python
    def A088911(n): return int(n % 6 < 3) # Chai Wah Wu, May 25 2022

Formula

G.f.: (1+x+x^2)/(1-x^6) = 1/((1-x)*(1+x)*(1-x+x^2)).
a(n) = a(n-6) for n>=6, a(0)=a(1)=a(2)=1, a(3)=a(4)=a(5)=0.
a(n) = ((-1)^floor((5*n + 2)/3) + 1)/2 = ( (-1)^floor(n/3) + 1 )/2. [Simplified by Bruno Berselli, Jul 09 2013]
a(n) = Sum_{k=0..floor(n/2)} U(n-2k, 1/2). - Paul Barry, Nov 15 2003
From Paul Barry, Mar 14 2004: (Start)
Partial sums of expansion of 1/(1+x^3), see A131531.
a(n) = 2*sin(Pi*n/3 + Pi/6)/3 + cos(Pi*n)/6 + 1/2. (End)
a(n) = floor(((n+3) mod 6)/3).
a(n) = floor((5*n-1)/3) mod 2. - Gary Detlefs, May 17 2011
a(n) = 1/2 + cos(Pi*n/3)/3 + sin(Pi*n/3)/sqrt(3) + (-1)^n/6. - R. J. Mathar, Oct 08 2011
a(n) = floor(((n+2)^2)/3) mod 2. - Wesley Ivan Hurt, Jun 29 2013
a(n) = A079979(n) + A079979(n-1) + A079979(n-2). - R. J. Mathar, Jul 10 2015
a(n) = a(n-1) - a(n-3) + a(n-4) for n > 3. - Wesley Ivan Hurt, Jul 05 2016
a(n) = 2*floor(n/6) - floor(n/3) + 1. - Ridouane Oudra, Dec 14 2021
E.g.f.: (2*cosh(x) + exp(x/2)*(cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) + sinh(x))/3. - Stefano Spezia, Aug 04 2025

A131074 Triangular array T read by rows: T(j,1) = 1 for ((j-1) mod 8) < 4, else 0; T(j,k) = T(j-1,k-1) + T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 4, 8, 0, 1, 3, 7, 15, 0, 0, 1, 4, 11, 26, 0, 0, 0, 1, 5, 16, 42, 0, 0, 0, 0, 1, 6, 22, 64, 1, 1, 1, 1, 1, 2, 8, 30, 94, 1, 2, 3, 4, 5, 6, 8, 16, 46, 140, 1, 2, 4, 7, 11, 16, 22, 30, 46, 92, 232, 1, 2, 4, 8, 15, 26, 42, 64, 94, 140, 232, 464, 0, 1, 3, 7, 15, 30, 56, 98
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

All columns are periodic with period length 8. The (4+8*i)-th row equals the first (4+8*i) terms of the main diagonal (i >= 0). Main diagonal and eighth subdiagonal agree; generally j-th subdiagonal equals (j+8)-th subdiagonal.

Examples

			First seven rows of T are
[ 1 ]
[ 1, 2 ]
[ 1, 2, 4 ]
[ 1, 2, 4, 8 ]
[ 0, 1, 3, 7, 15 ]
[ 0, 0, 1, 4, 11, 26 ]
[ 0, 0, 0, 1, 5, 16, 42 ].
		

Crossrefs

Cf. A131022, A129961 (main diagonal of T), A131075 (first subdiagonal of T), A131076 (row sums of T), A131077 (antidiagonal sums of T). First through sixth column of T are in A131078, A131079, A131080, A131081, A131082, A131083 resp.

Programs

  • Magma
    m:=13; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 8 lt 4 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; &cat[ [ M[j, k]: k in [1..j] ]: j in [1..m] ];
  • Mathematica
    T[j_, 1] := If[Mod[j-1, 8]<4, 1, 0]; T[j_, k_] := T[j, k] = T[j-1, k-1]+T[j, k-1]; Table[T[j, k], {j, 1, 13}, {k, 1, j}] // Flatten (* Jean-François Alcover, Mar 06 2014 *)
  • PARI
    {m=13; M=matrix(m, m); for(j=1, m, M[j, 1]=if((j-1)%8<4, 1, 0)); for(k=2, m, for(j=k, m, M[j, k]=M[j-1, k-1]+M[j, k-1])); for(j=1, m, for(k=1, j, print1(M[j, k], ",")))}
    

A129961 Main diagonal of triangular array T: T(j,1) = 1 for ((j-1) mod 8) < 4, else 0; T(j,k) = T(j-1,k-1)+T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 2, 4, 8, 15, 26, 42, 64, 94, 140, 232, 464, 1092, 2744, 6840, 16384, 37384, 81296, 169120, 338240, 654192, 1232288, 2280864, 4194304, 7761376, 14635712, 28384384, 56768768, 116566080, 243472256, 511907712, 1073741824, 2232713344
Offset: 1

Views

Author

Paul Curtz, Jun 10 2007

Keywords

Comments

First column is periodically 1 1 1 1 0 0 0 0 (see A131078).
First subdiagonal is 1, 2, 4, 7, 11, 16, 22, ... (see A131075); next subdiagonals are 1, 2, 3, 4, 5, 6, 8, 16, 46, 140, ..., 1, 1, 1, 1, 1, 2, 8, 30, 94, 256, ..., 0, 0, 0, 0, 1, 6, 22, 64, 162, 372, ..., 0, 0, 0, 1, 5, 16, 42, 98, 210, 420, ...., 0, 0, 1, 4, 11, 26, 56, 112, 210, 372, ..., 0, 1, 3, 7, 15, 30, 56, 98, 162, 256, ...,1, 2, 4, 8, 15, 26, 42, 64, 94, 140, ... . Main diagonal and eighth subdiagonal agree; generally j-th subdiagonal equals (j+8)-th subdiagonal.
Antidiagonal sums are 1, 1, 3, 3, 6, 5, 11, ... (see A131077).

Examples

			First seven rows of T are
[ 1 ]
[ 1, 2 ]
[ 1, 2, 4 ]
[ 1, 2, 4, 8 ]
[ 0, 1, 3, 7, 15 ]
[ 0, 0, 1, 4, 11, 26 ]
[ 0, 0, 0, 1, 5, 16, 42 ].
		

Crossrefs

Cf. A129339, A131074 (T read by rows), A131075 (first subdiagonal of T), A131076 (row sums of T), A131077 (antidiagonal sums of T). First through sixth column of T are in A131078, A131079, A131080, A131081, A131082, A131083 resp.

Programs

  • Magma
    m:=33; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 8 lt 4 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ M[n, n]: n in [1..m] ]; // Klaus Brockhaus, Jun 14 2007
    
  • Magma
    m:=33; S:=[ [1, 1, 1, 1, 0, 0, 0, 0][(n-1) mod 8 + 1]: n in [1..m] ]; [ &+[ Binomial(i-1, k-1)*S[k]: k in [1..i] ]: i in [1..m] ]; // Klaus Brockhaus, Jun 17 2007
  • PARI
    {m=33; v=concat([1, 2, 4, 8, 15], vector(m-5)); for(n=6, m, v[n]=6*v[n-1]-14*v[n-2]+16*v[n-3]-10*v[n-4]+4*v[n-5]); v} \\ Klaus Brockhaus, Jun 14 2007
    

Formula

G.f.: x*(1-x)^4/((1-2*x)*(1-4*x+6*x^2-4*x^3+2*x^4)).
a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 8, a(5) = 15; for n > 5, a(n) = 6*a(n-1)-14*a(n-2)+16*a(n-3)-10*a(n-4)+4*a(n-5).
Binomial transform of A131078. - Klaus Brockhaus, Jun 17 2007

Extensions

Edited and extended by Klaus Brockhaus, Jun 14 2007
G.f. corrected by Klaus Brockhaus, Oct 15 2009

A112713 Expansion of x/(1 - x + x^5 - x^6).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0
Offset: 0

Views

Author

Paul Barry, Sep 15 2005

Keywords

Comments

Decimal expansion of 10000/900009. - Elmo R. Oliveira, May 08 2024

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x/(1 - x + x^5 - x^6), {x, 0, 100}], x] (* or *) LinearRecurrence[{1, 0, 0, 0, -1, 1}, {0, 1, 1, 1, 1, 1}, 100] (* Harvey P. Dale, Feb 16 2014 *)

Formula

G.f.: x/(1 - x + x^5 - x^6) = x/((1-x)*(1+x)*(1-x+x^2-x^3+x^4)).
a(n) = a(n-1) - a(n-5) + a(n-6).
a(n) = a(n-10).
a(n) = (Sum_{k=0..floor((n+2)/2)} (-1)^(k+1)*C(n-k+2, k-1)*F(n-2*k+2)) mod 2.
a(n) = A112712(n) mod 2.

Extensions

Incorrect g.f. removed by Georg Fischer, May 15 2019

A130198 Single paradiddle. In percussion, the paradiddle is a four-note drum sticking pattern consisting of two alternating notes followed by two notes on the same hand.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1
Offset: 0

Views

Author

Simone Severini, May 16 2007

Keywords

Comments

Also the binary expansion of the constant 5/17 = 2^(-2) + 2^(-5) + 2^(-7) + ... - R. J. Mathar, Mar 27 2009
Period 8: repeat [0, 1, 0, 0, 1, 0, 1, 1]. - Wesley Ivan Hurt, Aug 23 2015

Crossrefs

Cf. A121262, A131078. - Jaume Oliver Lafont, Mar 19 2009
Cf. A165211.

Programs

Formula

From R. J. Mathar, Mar 27 2009: (Start)
a(n) = a(n-8) = a(n-1) - a(n-4) + a(n-5).
G.f.: -x*(1+x^3-x)/((x-1)*(1+x^4)). (End)
a(n) = (1-(-1)^((n+5)*(n+6)*(n^2+11*n+32)/8))/2. - Wesley Ivan Hurt, Aug 23 2015
a(n) = A165211(n+5). - Wesley Ivan Hurt, Aug 23 2015

A131075 First subdiagonal of triangular array T: T(j,1) = 1 for ((j-1) mod 8) < 4, else 0; T(j,k) = T(j-1,k-1) + T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 2, 4, 7, 11, 16, 22, 30, 46, 92, 232, 628, 1652, 4096, 9544, 21000, 43912, 87824, 169120, 315952, 578096, 1048576, 1913440, 3567072, 6874336, 13748672, 28384384, 59797312, 126906176, 268435456, 561834112, 1158971520, 2353246336, 4706492672, 9292452352
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Also first differences of main diagonal A129961.

Examples

			For first seven rows of T see A131074 or A129961.
		

Crossrefs

Cf. A131074 (T read by rows), A129961 (main diagonal of T), A131076 (row sums of T), A131077 (antidiagonal sums of T). First through sixth column of T are in A131078, A131079, A131080, A131081, A131082, A131083 resp.

Programs

  • Magma
    m:=34; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 8 lt 4 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ M[n+1, n]: n in [1..m-1] ];
    
  • PARI
    lista(m) = my(v=concat([1, 2, 4, 7, 11], vector(m-5))); for(n=6, m, v[n]=6*v[n-1]-14*v[n-2]+16*v[n-3]-10*v[n-4]+4*v[n-5]); v

Formula

a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 7, a(5) = 11; for n > 5, a(n) = 6*a(n-1)-14*a(n-2)+16*a(n-3)-10*a(n-4)+4*a(n-5).
G.f.: x*(1-4*x+6*x^2-5*x^3+3*x^4)/((1-2*x)*(1-4*x+6*x^2-4*x^3+2*x^4)).

A131076 Row sums of triangular array T: T(j,1) = 1 for ((j-1) mod 8) < 4, else 0; T(j,k) = T(j-1,k-1) + T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 3, 7, 15, 26, 42, 64, 93, 139, 231, 463, 1092, 2744, 6840, 16384, 37383, 81295, 169119, 338239, 654192, 1232288, 2280864, 4194304, 7761375, 14635711, 28384383, 56768767, 116566080, 243472256, 511907712, 1073741824, 2232713343, 4585959679, 9292452351
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Sum of n-th row equals (n+1)-th term of main diagonal minus (n+1)-th term of first column: a(n) = A129961(n+1) - A131078(n+1).

Examples

			For first seven rows of T see A131074 or A129961.
		

Crossrefs

Cf. A131074 (T read by rows), A129961 (main diagonal of T), A131075 (first subdiagonal of T), A131077 (antidiagonal sums of T). First through sixth column of T are in A131078, A131079, A131080, A131081, A131082, A131083 resp.

Programs

  • Magma
    m:=32; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 8 lt 4 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ &+[ M[j, k]: k in [1..j] ]: j in [1..m] ];
    
  • Mathematica
    LinearRecurrence[{7,-20,30,-27,21,-24,30,-26,14,-4},{1,3,7,15,26,42,64,93,139,231},40] (* Harvey P. Dale, Jun 23 2025 *)
  • PARI
    lista(m) = my(M=matrix(m, m)); for(j=1, m, M[j, 1]=if((j-1)%8<4, 1, 0)); for(k=2, m, for(j=k, m, M[j, k]=M[j-1, k-1]+M[j, k-1])); for(j=1, m, print1(sum(k=1, j, M[j, k]), ", "))

Formula

G.f.: x*(1-4*x+6*x^2-4*x^3-2*x^4+10*x^5-10*x^6+5*x^7-x^8)/((1-x)*(1-2*x)*(1+x^4)*(1-4*x+6*x^2-4*x^3+2*x^4)).

A131077 Antidiagonal sums of triangular array T: T(j,1) = 1 for ((j-1) mod 8) < 4, else 0; T(j,k) = T(j-1,k-1) + T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 1, 3, 3, 6, 5, 11, 8, 20, 14, 35, 24, 59, 41, 100, 77, 178, 162, 341, 364, 705, 837, 1542, 1915, 3458, 4282, 7741, 9280, 17021, 19461, 36482, 39559, 76042, 78218, 154261, 151184, 305445, 287509, 592954, 542223, 1135178, 1023210, 2158389, 1949312, 4107701
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Examples

			For first seven rows of T see A131074 or A129961.
		

Crossrefs

Cf. A131074 (T read by rows), A129961 (main diagonal of T), A131075 (first subdiagonal of T), A131076 (row sums of T). First through sixth column of T are in A131078, A131079, A131080, A131081, A131082, A131083 resp.

Programs

  • Magma
    m:=44; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 8 lt 4 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ &+[ M[j-k+1, k]: k in [1..(j+1) div 2] ]: j in [1..m] ];
  • PARI
    lista(m) = my(M=matrix(m, m)); for(j=1, m, M[j, 1]=if((j-1)%8<4, 1, 0)); for(k=2, m, for(j=k, m, M[j, k]=M[j-1, k-1]+M[j, k-1])); for(j=1, m, print1(sum(k=1, (j+1)\2, M[j-k+1, k]), ", "))
    

Formula

G.f.: x*(1-4*x^2+6*x^4-x^5-4*x^6+3*x^7+x^8-3*x^9+x^10+2*x^11-x^12) / ((1-x)*(1-2*x^2)*(1+x^4)*(1-4*x^2+6*x^4-4*x^6+2*x^8)).

A083651 Triangular array, read by rows: T(n,k) = k-th bit in binary representation of n (0<=k<=n).

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2003

Keywords

Comments

n = Sum(T(n,k)*2^k: 0<=k<=n);
T(n, A070939(n))=1 for n>0, T(n,k)=0 for k>A070939(n);
T(n,0)=A000035(n); T(n,n)=0;
A021913(0)=T(0,0), A021913(n)=T(n,1) for n>0.

Examples

			The triangle starts
0
1 0
0 1 0
1 1 0 0
0 0 1 0 0
1 0 1 0 0 0
0 1 1 0 0 0 0
1 1 1 0 0 0 0 0
0 0 0 1 0 0 0 0 0
1 0 0 1 0 0 0 0 0 0
0 1 0 1 0 0 0 0 0 0 0
1 1 0 1 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0 0 0 0 0 0
1 0 1 1 0 0 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0 0 0 0 0 0 0 0
		

Crossrefs

Cf. A000035 (column k=0), A133872 (k=1), A131078 (k=2), A000120 (row sums).

Programs

  • Maple
    A083651 := proc(n,k)
        floor(n/2^k) ;
        modp(%,2) ;
    end proc:  # R. J. Mathar, Apr 21 2021
  • Mathematica
    row[n_] := row[n] = PadRight[Reverse[IntegerDigits[n, 2]], n+1];
    T[n_, k_] := row[n][[k+1]];
    Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten
Showing 1-10 of 10 results.