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 11-18 of 18 results.

A111927 Expansion of x^3 / ((x-1)*(2*x-1)*(x^2-x+1)).

Original entry on oeis.org

0, 0, 0, 1, 4, 10, 21, 42, 84, 169, 340, 682, 1365, 2730, 5460, 10921, 21844, 43690, 87381, 174762, 349524, 699049, 1398100, 2796202, 5592405, 11184810, 22369620, 44739241, 89478484, 178956970, 357913941, 715827882, 1431655764, 2863311529, 5726623060
Offset: 0

Views

Author

Creighton Dement, Aug 21 2005

Keywords

Comments

Binomial transform of sequence (0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0). Note: the binomial transform of the sequence (0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0) is A111926; the binomial transform of the sequence (0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0) is A024495 (disregarding first two terms, which are both zero).
The sequence relates the calculation of the logarithm of the Twin Prime Constants of order 3 to the sequence of prime zeta functions, see definition 7 in arXiv:0903.2514. - R. J. Mathar, Mar 28 2009

Crossrefs

Programs

  • Maple
    seq(sum(binomial(n, k*3), k=1..n), n=0..33); # Zerinvary Lajos, Oct 23 2007
  • Mathematica
    LinearRecurrence[{4,-6,5,-2},{0,0,0,1},40] (* Harvey P. Dale, Jul 04 2017 *)
  • PARI
    concat(vector(3), Vec(x^3/((x-1)*(2*x-1)*(x^2-x+1)) + O(x^40))) \\ Colin Barker, Feb 10 2017

Formula

a(n+2) - a(n+1) + a(n) = A000225(n).
a(n) - a(n-1) = A024495(n-1).
From Colin Barker, Feb 10 2017: (Start)
a(n) = 2^n/3 + 2*cos((Pi*n)/3)/3 - 1. [Cournot]
a(n) = 4*a(n-1) - 6*a(n-2) + 5*a(n-3) - 2*a(n-4) for n > 3. (End)
a(n) = (2^n+A087204(n))/3 - 1. - R. J. Mathar, Aug 07 2017
a(n) = (1/3)*Sum_{k=0..n-1} binomial(n, 3*floor(k/3)+3). - Taras Goy, Jan 26 2025
E.g.f.: (exp(x)*(exp(x) - 3) + 2*exp(x/2)*cos(sqrt(3)*x/2))/3. - Stefano Spezia, Feb 06 2025

A081374 Size of "uniform" Hamming covers of distance 1, that is, Hamming covers in which all vectors of equal weight are treated the same, included or excluded from the cover together.

Original entry on oeis.org

1, 2, 2, 5, 10, 22, 43, 86, 170, 341, 682, 1366, 2731, 5462, 10922, 21845, 43690, 87382, 174763, 349526, 699050, 1398101, 2796202, 5592406, 11184811, 22369622, 44739242, 89478485, 178956970, 357913942, 715827883, 1431655766, 2863311530, 5726623061
Offset: 1

Views

Author

David Applegate, Aug 22 2003

Keywords

Comments

Motivation: consideration of the "hats" problem (which boils down to normal hamming covering codes) in the case when the people are indistinguishable or unlabeled.
From Paul Curtz, May 26 2011: (Start)
If we add a(0)=1 in front and build the table of a(n) and iterated differences in further rows we get:
1, 1, 2, 2, 5, 10,
0, 1, 0, 3, 5, 12,
1, -1, 3, 2, 7, 9,
-2, 4, -1, 5, 2, 13,
6, -5, 6, -3, 11, 6
-11, 11, -9, 14, -5, 21.
The first column is the inverse binomial transform, which is 1,0 followed by (-1)^n*A083322(n-1), n>=2.
The main diagonal in the table above is A001045, the adjacent upper diagonals are A078008, A048573 and A062092. (End)

Crossrefs

Cf. A083322.

Programs

  • Magma
    I:=[1,2,2,5]; [n le 4 select I[n] else 2*Self(n-1)-Self(n-3)+2*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 08 2016
  • Maple
    hatwork := proc(n,i,covered) local val, val2; options remember;
    # computes the minimum cover of the i-bit through n-bit words.
    # if covered is true the i-bit words are already covered (by the (i-1)-bit words)
    if (i>n or (i = n and covered)) then 0; elif (i = n and not covered) then 1; else
    # one choice is to include the i-bit words in the cover
    val := hatwork(n, i+1, true) + binomial(n,i);
    # the other choice is not to include the i-bit words in the cover
    if (covered) then val2 := hatwork (n, i+1, false); if (val2 < val) then val := val2; fi; else
    # if the i-bit words were not covered by (i-1), they must be covered by the (i+1)-bit words
    if (i <= n) then val2 := hatwork (n, i+2, true) + binomial(n,i+1); if (val2 < val) then val := val2; fi; fi; fi; val; fi; end proc;
    A081374 := proc (n) hatwork(n, 0, false); end proc;
  • Mathematica
    LinearRecurrence[{2,0,-1,2},{1,2,2,5},40] (* Harvey P. Dale, Feb 11 2015 *)

Formula

If (n mod 6 = 5) then sum(binomial(n, 3*i+1), i=0..n/3); elif (n mod 6 = 2) then sum(binomial(n, 3*i), i=0..n/3)+1; else sum(binomial(n, 3*i), i=0..n/3); fi;
G.f.: x*(2*x^3-2*x^2+1)/( (1-2*x)*(1+x)*(1-x+x^2) ).
a(n)=2*a(n-1)-a(n-3)+2*a(n-4).
From Paul Curtz, May 26 2011: (Start)
a(n+1) - 2*a(n) has period length 6: repeat 0, -2, 1, 0, 2, -1 (see A080425).
a(n) - A083322(n-1) = A010892(n-1) has period length 6.
a(n) + a(n+3) = 3*2^n = A007283(n).
a(n+6)-a(n) = 21*2^n = A175805(n).
a(n) - A131708(n) = -A131531(n). (End)

A131090 First differences of A131666.

Original entry on oeis.org

0, 1, 0, 1, 1, 4, 7, 15, 28, 57, 113, 228, 455, 911, 1820, 3641, 7281, 14564, 29127, 58255, 116508, 233017, 466033, 932068, 1864135, 3728271, 7456540, 14913081, 29826161, 59652324, 119304647, 238609295, 477218588, 954437177, 1908874353
Offset: 0

Views

Author

Paul Curtz, Sep 24 2007

Keywords

Comments

The first differences b(n)=a(n+1)-a(n) obey the recurrence b(n+1)-2b(n) = (-3,3,-2,3,-3,2), continued with period 6.
The 2nd differences c(n)=b(n+1)-b(n) obey the recurrence c(n+1)-2c(n) = (6,-5,5,-6,5,-5), periodically continued with period 6.
The hexaperiodic coefficients in these recurrences for A113405, A131666 and their higher order differences define a table,
0, 0, 1, 0, 0, -1 <- A113405
0, 1, -1, 0, -1, 1 <- A131666
1, -2, 1, -1, 2, -1 <- a(n)
-3, 3, -2, 3, -3, 2 <- b(n)
6, -5, 5, -6, 5, -5 <- c(n)
-11,10,-11, 11,-10, 11
21,-21,22,-21, 21,-22
...
in which the first three columns are A024495, A131708 and A024493, multiplied by a checkerboard pattern of signs.

Programs

  • Mathematica
    LinearRecurrence[{2,0,-1,2},{0,1,0,1},40] (* Harvey P. Dale, Jan 15 2016 *)

Formula

a(n) = A131666(n+1)-A131666(n).
a(n+1)-2a(n) = A131556(n), a sequence with period length 6.
G.f.: -(x-1)^2*x / ((x+1)*(2*x-1)*(x^2-x+1)). - Colin Barker, Mar 04 2013

Extensions

Edited by R. J. Mathar, Jun 28 2008

A167613 Array T(n,k) read by antidiagonals: the k-th term of the n-th difference of A131531.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 0, -1, -2, -3, 0, 0, 1, 3, 6, -1, -1, -1, -2, -5, -11, 0, 1, 2, 3, 5, 10, 21, 0, 0, -1, -3, -6, -11, -21, -42, 1, 1, 1, 2, 5, 11, 22, 43, 85, 0, -1, -2, -3, -5, -10, -21, -43, -86, -171, 0, 0, 1, 3, 6, 11, 21, 42, 85, 171, 342, -1, -1, -1, -2, -5, -11, -22, -43, -85, -170, -341, -683, 0, 1, 2, 3, 5, 10, 21, 43, 86, 171, 341, 682, 1365
Offset: 0

Views

Author

Paul Curtz, Nov 07 2009

Keywords

Comments

The array contains A131708(0) in diagonal 0, then -A024495(0..1) in diagonal 1, then A024493(0..2) in diagonal 2, then -A131708(0..3), then A024495(0..4), then -A024493(0..5).

Examples

			The table starts in row n=0 with columns k >= 0 as:
0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0 A131531
0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1 A092220
1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2 A131556
-3, 3, -2, 3, -3, 2, -3, 3, -2, 3, -3, 2, -3, 3, -2, 3, -3, 2, -3 A164359
6, -5, 5, -6, 5, -5, 6, -5, 5, -6, 5, -5, 6, -5, 5, -6, 5, -5, 6, -5
-11, 10, -11, 11, -10, 11, -11, 10, -11, 11, -10, 11, -11, 10, -11
21, -21, 22, -21, 21, -22, 21, -21, 22, -21, 21, -22, 21, -21, 22
		

Crossrefs

Cf. A167617 (antidiagonal sums).

Programs

  • Maple
    A131531 := proc(n) op((n mod 6)+1,[0,0,1,0,0,-1]) ; end proc:
    A167613 := proc(n,k) option remember; if n= 0 then A131531(k); else procname(n-1,k+1)-procname(n-1,k) ; end if;end proc: # R. J. Mathar, Dec 17 2010
  • Mathematica
    nmax = 13;
    A131531 = Table[{0, 0, 1, 0, 0, -1}, {nmax}] // Flatten;
    T[n_] := T[n] = Differences[A131531, n];
    T[n_, k_] := T[n][[k]];
    Table[T[n-k, k], {n, 1, nmax}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Oct 20 2023 *)

Formula

T(0,k) = A131531(k). T(n,k) = T(n-1,k+1) - T(n-1,k), n > 0.
T(n,n) = A001045(n). T(n,n+1) = -A001045(n). T(n,n+2) = A078008(n).
T(n,0) = -T(n,3) = (-1)^(n+1)*A024495(n).
T(n,1) = (-1)^(n+1)*A131708(n).
T(n,2) = (-1)^n*A024493(n).
T(n,k+6) = T(n,k).
a(n) = A131708(0), -A024495(0,1), A024493(0,1,2), -A131708(0,1,2,3), A024495(0,1,2,3,4), -A024493(0,1,2,3,4,5).

A138635 a(n) =3*a(n-3)-3*a(n-6)+2*a(n-9).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 2, 1, 3, 3, 2, 6, 5, 5, 11, 10, 11, 21, 21, 22, 42, 43, 43, 85, 86, 85, 171, 171, 170, 342, 341, 341, 683, 682, 683, 1365, 1365, 1366, 2730, 2731, 2731, 5461, 5462, 5461, 10923, 10923, 10922, 21846, 21845, 21845, 43691, 43690, 43691, 87381
Offset: 0

Views

Author

Paul Curtz, May 14 2008

Keywords

Comments

As the recurrence shows, these are three interleaved sequences which obey recurrences b(n)=3*b(n-1)-3*b(n-2)+2*b(n-3), indicating that the b(n) equal their third differences.
These three sequences are A024495, A024494 (or A131708) and A024493 (or A130781).
Their starting "vectors" b(0,1,2) are 0,0,1 and 0,1,2 and 1,1,1, respectively, therefore linearly independent, such that other sequences with the same recursion as b(n) can be written as linear combinations of these.

Crossrefs

Formula

a(18*n) = 21*A133853(n).
G.f.: -x^2*(1+x^2-2*x^3+x^4-x^5+x^6)/((2*x^3-1)*(x^6-x^3+1)). - R. J. Mathar, May 17 2009

Extensions

Edited by R. J. Mathar, May 17 2009

A290285 Determinant of circulant matrix of order 3 with entries in the first row (-1)^j * Sum_{k>=0} binomial(n,3*k+j), j=0,1,2.

Original entry on oeis.org

1, 0, 0, 62, 666, 5292, 39754, 307062, 2456244, 19825910, 159305994, 1274445900, 10184391946, 81430393590, 651443132340, 5212260963062, 41700950994186, 333607607822412, 2668815050206474, 21350337149539062, 170802697195263924, 1366424509598012150
Offset: 0

Views

Author

Vladimir Shevelev, Jul 26 2017

Keywords

Comments

In the Shevelev link the author proved that, for even N>=2 and every n>=1, the determinant of circulant matrix of order N with entries in the first row being (-1)^j*Sum_{k>=0} binomial(n,N*k+j), j=0..N-1, is 0. This sequence shows what happens for the first odd N>2.

Crossrefs

Programs

  • Maple
    a:= n-> LinearAlgebra[Determinant](Matrix(3, shape=Circulant[seq(
            (-1)^j*add(binomial(n, 3*k+j), k=0..(n-j)/3), j=0..2)])):
    seq(a(n), n=0..25);  # Alois P. Heinz, Jul 27 2017
  • Mathematica
    ro[n_] := Table[(-1)^j Sum[Binomial[n, 3k+j], {k, 0, n/3}], {j, 0, 2}];
    M[n_] := Table[RotateRight[ro[n], m], {m, 0, 2}];
    a[n_] := Det[M[n]];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Aug 09 2018 *)
  • PARI
    mj(j,n) = (-1)^j*sum(k=0, n\3, binomial(n, 3*k+j));
    a(n) = {m = matrix(3, 3); for (j=1, 3, m[1, j] = mj(j-1,n)); for (j=2, 3, m[2, j] = m[1, j-1]); m[2, 1] = m[1, 3]; for (j=2, 3, m[3, j] = m[2, j-1]); m[3, 1] = m[2, 3]; matdet(m);} \\ Michel Marcus, Jul 26 2017
    
  • Python
    from sympy.matrices import Matrix
    from sympy import binomial
    def mj(j, n):
        return (-1)**j*sum(binomial(n, 3*k + j) for k in range(n//3 + 1))
    def a(n):
        m=Matrix(3, 3, [0]*9)
        for j in range(3):m[0, j]=mj(j, n)
        for j in range(1, 3):m[1, j]=m[0, j - 1]
        m[1, 0]=m[0, 2]
        for j in range(1, 3):m[2, j] = m[1, j - 1]
        m[2, 0]=m[1, 2]
        return m.det()
    print([a(n) for n in range(22)]) # Indranil Ghosh, Jul 31 2017

Formula

G.f.: (1-12*x+48*x^2-73*x^3+6*x^4-60*x^5+736*x^6-576*x^7)/((1+x)*(-1+2*x)*(-1+8*x)* (1-x+x^2)*(1+2*x+4*x^2)*(1-4*x+16*x^2)). - Peter J. C. Moses, Jul 26 2017

Extensions

More terms from Peter J. C. Moses, Jul 26 2017

A086953 Binomial transform of (-1)^mod(n,3) (A257075).

Original entry on oeis.org

1, 0, 0, 2, 6, 12, 22, 42, 84, 170, 342, 684, 1366, 2730, 5460, 10922, 21846, 43692, 87382, 174762, 349524, 699050, 1398102, 2796204, 5592406, 11184810, 22369620, 44739242, 89478486, 178956972, 357913942, 715827882, 1431655764, 2863311530, 5726623062
Offset: 0

Views

Author

Paul Barry, Jul 25 2003

Keywords

Crossrefs

Programs

Formula

a(n+3)/2 = A024495(n+2). - corrected by Vladimir Shevelev, Aug 08 2017
a(n) = 0^n + Sum{k=0..floor((n-1)/3)} C(n-1, 3*k+2).
a(n) = Sum{k=0..n} C(n, k)(-1)^mod(k, 3).
G.f.: (1 - 3*x + 3*x^2)/((1 - 2*x)*(1 - x + x^2)). - Paul Barry, Dec 14 2004
From Vladimir Shevelev, Aug 02 2017: (Start)
a(n) = A024493(n) - A131708(n) + A024495(n);
a(n) = A024495(n) if and only if n == 1 (mod 3);
a(n) = A024495(n) - 1 if and only if n == 2 or 3 (mod 6);
a(n) = A024495(n) + 1 if and only if n == 0 or 5 (mod 6);
a(3*k+1) = 2*A024495(3*k). (End)
a(n) = A131370(n+1)/2. - Rick L. Shepherd, Aug 02 2017
3*a(n) = 2^n + 2*A057079(n+2). - R. J. Mathar, Aug 04 2017

A227430 Expansion of x^2*(1-x)^3/((1-2*x)*(1-x+x^2)*(1-3*x+3x^2)).

Original entry on oeis.org

0, 0, 1, 3, 6, 10, 15, 21, 29, 45, 90, 220, 561, 1365, 3095, 6555, 13110, 25126, 46971, 87381, 164921, 320001, 640002, 1309528, 2707629, 5592405, 11450531, 23166783, 46333566, 91869970, 181348455, 357913941, 708653429, 1410132405, 2820264810, 5662052980
Offset: 0

Views

Author

Paul Curtz, Jul 11 2013

Keywords

Comments

Consider the binomial transform of 0, 0, 0, 0, 0, 1 (period 6) with its differences:
0, 0, 0, 0, 0, 1, 6, 21, 56, 126,... d(n): after 0, it is A192080.
0, 0, 0, 0, 1, 5, 15, 35, 70, 126,... e(n)
0, 0, 0, 1, 4, 10, 20, 35, 56, 85,... f(n)
0, 0, 1, 3, 6, 10, 15, 21, 29, 45,... a(n)
0, 1, 2, 3, 4, 5, 6, 8, 16, 45,... b(n)
1, 1, 1, 1, 1, 1, 2, 8, 29, 85,... c(n)
0, 0, 0, 0, 0, 1, 6, 21, 56, 126,... d(n).
a(n) + d(n) = A024495(n),
b(n) + e(n) = A131708(n),
c(n) + f(n) = A024493(n).
a(n) - d(n) = 0, 0, 1, 3, 6, 9, 9, 0,... A057083(n-2)
b(n) - e(n) = 0, 1, 2, 3, 3, 0, -9, -27,... A057682(n)
c(n) - f(n) = 1, 1, 1, 0, -3, -9, -18, -27,... A057681(n)
d(n) - a(n) = 0, 0, -1, -3, -6, -9, -9, 0,... -A057083(n-2)
e(n) - b(n) = 0, -1, -2, -3, -3, 0, 9, 27,... -A057682(n)
f(n) - c(n) = -1, -1, -1, 0, 3, 9, 18, 27,... -A057681(n).
The first column is A131531(n).
The first two trisections are multiples of 3. Is the third (1, 10, 29,...) mod 9 A029898(n)?

Examples

			a(6)=6*10-15*6+20*3-15*1+6*0=15, a(7)=90-150+120-45+6=21.
		

Programs

  • Mathematica
    Join[{0},LinearRecurrence[{6,-15,20,-15,6},{0,1,3,6,10},40]] (* Harvey P. Dale, Dec 17 2014 *)
  • PARI
    {a(n) = sum(k=0, n\6, binomial(n, 6*k+2))} \\ Seiichi Manyama, Mar 23 2019

Formula

a(n) = 6*a(n-1) -15*a(n-2) +20*a(n-3) -15*a(n-4) +6*a(n-5) for n>5, a(0)=a(1)=0, a(2)=1, a(3)=3, a(4)=6, a(5)=10.
a(n) = A024495(n) - A192080(n-5) for n>4.
G.f.: -(x^5 - 3*x^4 + 3*x^3 - x^2)/((1-2*x)*(1-x+x^2)*(1-3*x+3*x^2)). - Ralf Stephan, Jul 13 2013
a(n) = Sum_{k=0..floor(n/6)} binomial(n,6*k+2). - Seiichi Manyama, Mar 23 2019

Extensions

Definition uses the g.f. of Ralf Stephan.
More terms from Harvey P. Dale, Dec 17 2014
Previous Showing 11-18 of 18 results.