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-9 of 9 results.

A134667 Period 6: repeat [0, 1, 0, 0, 0, -1].

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jan 26 2008

Keywords

Comments

Dirichlet series for the non-principal character modulo 6: L(s,chi) = Sum_{n>=1} a(n)/n^s. For example L(1,chi) = A093766, L(2,chi) = A214552, and L(3,chi) = Pi^3/(18*sqrt(3)). See Jolley eq. (314) and arXiv:1008.2547 L(m=6,r=2,s). - R. J. Mathar, Jul 31 2010

Examples

			G.f. = x - x^5 + x^7 - x^11 + x^13 - x^17 + x^19 - x^23 + x^25 - x^29 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1986, page 139, k=6, Chi_2(n).
  • L. B. W. Jolley, Summation of Series, Dover (1961).

Crossrefs

Programs

  • Magma
    &cat[[0, 1, 0, 0, 0, -1]^^20]; // Wesley Ivan Hurt, Jun 20 2016
  • Maple
    A134667:=n->[0, 1, 0, 0, 0, -1][(n mod 6)+1]: seq(A134667(n), n=0..100);
    # Wesley Ivan Hurt, Jun 20 2016
  • Mathematica
    a[ n_] := JacobiSymbol[-12, n]; (* Michael Somos, Apr 24 2014 *)
    a[ n_] := {1, 0, 0, 0, -1, 0}[[Mod[n, 6, 1]]]; (* Michael Somos, Apr 24 2014 *)
    PadRight[{},120,{0,1,0,0,0,-1}] (* Harvey P. Dale, Aug 01 2021 *)
  • PARI
    {a(n) = [0, 1, 0, 0, 0, -1][n%6+1]}; /* Michael Somos, Feb 10 2008 */
    
  • PARI
    {a(n) = kronecker(-12, n)}; /* Michael Somos, Feb 10 2008 */
    
  • PARI
    {a(n) = if( n < 0, -a(-n), if( n<1, 0, direuler(p=2, n, 1 / (1 - kronecker(-12, p) * X))[n]))}; /* Michael Somos, Aug 11 2009 */
    

Formula

Euler transform of length 6 sequence [0, 0, 0, -1, 0, 1]. - Michael Somos, Feb 10 2008
G.f.: x * (1 - x^4) / (1 - x^6) = x*(1+x^2) / (1 + x^2 + x^4) = x*(1+x^2) / ( (1+x+x^2)*(x^2-x+1) ).
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3)) where f(u, v, w) = w * (2 + v - u^2 - 2*v^2) - 2 * u * v. - Michael Somos, Aug 11 2009
a(n) is multiplicative with a(p^e) = 0^e if p = 2 or p = 3, a(p^e) = 1 if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6). - Michael Somos, Aug 11 2009
a(-n) = -a(n). a(n+6) = a(n). a(2*n) = a(3*n) = 0.
sqrt(3)*a(n) = sin(Pi*n/3) + sin(2*Pi*n/3). - R. J. Mathar, Oct 08 2011
a(n) + a(n-2) + a(n-4) = 0 for n>3. - Wesley Ivan Hurt, Jun 20 2016
E.g.f.: 2*sin(sqrt(3)*x/2)*cosh(x/2)/sqrt(3). - Ilya Gutkovskiy, Jun 21 2016

A005207 a(n) = (F(2*n-1) + F(n+1))/2 where F(n) is a Fibonacci number.

Original entry on oeis.org

1, 1, 2, 4, 9, 21, 51, 127, 322, 826, 2135, 5545, 14445, 37701, 98514, 257608, 673933, 1763581, 4615823, 12082291, 31628466, 82798926, 216761547, 567474769, 1485645049, 3889431721, 10182603746, 26658304492, 69792188337, 182718064101, 478361686155, 1252366480135
Offset: 0

Views

Author

Keywords

Comments

Number of block fountains with exactly n coins in the base when mirror image fountains are identified. - Michael Woltermann (mwoltermann(AT)washjeff.edu), Oct 06 2010
a(n) = C(F(n+1)+1,2) + C(F(n)+1,2) = pairwise sums of A033192. - Ralf Stephan, Jul 06 2003
Number of (3412,54312)- and (3412,45321)-avoiding involutions in S_{n+1}. - Ralf Stephan, Jul 06 2003
Number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 5 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 1, s(n) = 1. - Herbert Kociemba, May 31 2004
The sequence 1,1,2,4,9,... has g.f. 1/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-x))))=(1-3*x+x^2+x^2)/(1-4*x+3*x^2+2*x^3-x^4), and general term (A001519(n)+A000045(n+1))/2. It is the binomial transform of A001519 aerated. - Paul Barry, Dec 17 2009
The Kn3 and Kn4 sums, see A180662 for their definitions, of Losanitsch's triangle A034851 lead to this sequence. - Johannes W. Meijer, Jul 14 2011
Convolution of [1,1,1,2,5,...], which is A001519 with another leading 1, and A212804. - R. J. Mathar, Apr 14 2018
a(n) is the number of Motzkin n-paths of height <= 3. - Alois P. Heinz, Nov 24 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    A005207:=-(1-2*z-z^2+z^3)/(z^2-3*z+1)/(z^2+z-1); # Simon Plouffe in his 1992 dissertation with offset 0
    a:= n-> (Matrix([[1,1,1,3]]). Matrix(4, (i,j)-> if i=j-1 then 1 elif j=1 then [4,-3,-2,1][i] else 0 fi)^n)[1,2]: seq(a(n), n=0..34); # Alois P. Heinz, Sep 06 2008
  • Mathematica
    LinearRecurrence[{4, -3, -2, 1}, {1, 2, 4, 9}, 30] (* Jean-François Alcover, Jan 31 2016 *)
  • PARI
    a(n)=(fibonacci(2*n-1)+fibonacci(n+1))/2
    
  • PARI
    x='x+O('x^50); Vec(-x*(1-2*x-x^2+x^3)/((x^2+x-1)*(x^2-3*x+1))) \\ G. C. Greubel, Mar 05 2017

Formula

G.f.: 1-x*(1-2*x-x^2+x^3)/((x^2+x-1)*(x^2-3*x+1)).
a(n) = 4*a(n-1) - 3*a(n-2) - 2*a(n-3) + a(n-4).
a(n) = (w^(2*n-1) + w^(1-2*n) + w^(n+1) - (-w)^(-1-n))/(4*w-2) where w = (1+sqrt(5))/2.
a(n) = (2/5)*Sum_{k=1..4} ( sin(Pi*k/5)^2*(1 + 2*cos(Pi*k/5))^n ). - Herbert Kociemba, May 31 2004
a(-1-2*n) = A027994(2*n); a(-2*n)=A059512(2*n+1).
Let M = an infinite tridiagonal matrix with all 1's in the super and main diagonals and [1,1,1,0,0,0,...] in the subdiagonal. Let V = vector [1,0,0,0,...]. The sequence is generated as leftmost column of M*V iterates. - Gary W. Adamson, Jun 07 2011
2*a(n) = A000045(n+1) + A001519(n). - R. J. Mathar, Apr 14 2018
a(n) mod 2 = A131719(n+3). - Alois P. Heinz, Nov 24 2023

Extensions

a(0)=1 prepended by Alois P. Heinz, Nov 24 2023

A103368 Period 6: repeat [1, 1, -1, -1, 0, 0].

Original entry on oeis.org

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

Views

Author

Paul Barry, Feb 02 2005

Keywords

Comments

The positive sequence is A131719(n+1) = a(n) = cos(2*Pi*n/3+Pi/3)/6 + sqrt(3)*sin(2*Pi*n/3+Pi/3)/6 - sqrt(3)*cos(Pi*n/3+Pi/6)/6 + sin(Pi*n/3+Pi/6)/2 + 2/3, with g.f. (1+x^2) / ( (1-x)*(1-x+x^2)*(1+x+x^2) ).

Crossrefs

Cf. A131719.

Programs

Formula

G.f.: (1+x)/(1+x^2+x^4).
a(n) = Sum_{k=0..floor(n/2)} binomial(k, floor(n/2)-k)*(-1)^k.
a(n) = -cos(2*Pi*n/3+Pi/3)/2 + sqrt(3)*sin(2*Pi*n/3+Pi/3)/6 + sqrt(3)*cos(Pi*n/3+Pi/6)/2 + sin(Pi*n/3+Pi/6)/2.
a(n) = cos(Pi*n/3) + sin(2*Pi*n/3)/sqrt(3). - R. J. Mathar, Oct 08 2011
a(n) + a(n-2) + a(n-4) = 0 for n>3. - Wesley Ivan Hurt, Jun 20 2016
E.g.f.: (sqrt(3)*sin(sqrt(3)*x/2) + 3*cos(sqrt(3)*x/2)*exp(x))*exp(-x/2)/3. - Ilya Gutkovskiy, Jun 21 2016

A224271 Number of set partitions of {1,2,...,n} such that the element 1 is in an odd-sized block.

Original entry on oeis.org

1, 1, 3, 8, 28, 107, 459, 2151, 10931, 59700, 348146, 2155925, 14112377, 97266301, 703484851, 5323515156, 42040470092, 345670438963, 2953171501547, 26166317121747, 240047041176843, 2276607815242880, 22290187889601330, 225018607554567149, 2339331996135377345
Offset: 1

Views

Author

Geoffrey Critzer, Apr 02 2013

Keywords

Examples

			a(4) = 8 because we have: {{1},{2,3,4}}, {{1,3,4},{2}}, {{1,2,3},{4}}, {{1,2,4},{3}}, {{1},{2},{3,4}}, {{1},{2,3},{4}}, {{1},{2,4},{3}}, {{1},{2},{3},{4}}.
		

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(multinomial(n, n-i*j, i$j)/j!*
          b(n-i*j, i-1)*`if`(irem(i, 2)=0, x^j, 1), j=0..n/i))))
        end:
    a:= n-> (p-> add(coeff(p, x, i)*(i+1), i=0..degree(p)))(b(n-1$2)):
    seq(a(n), n=1..15);  # Alois P. Heinz, Mar 08 2015
    # second Maple program:
    b:= proc(n, t, m) option remember; `if`(n=0, t, (m-1)*
          b(n-1, t, m)+b(n-1, 1-t, m)+b(n-1, t, m+1))
        end:
    a:= n-> b(n-1, 1$2):
    seq(a(n), n=1..25);  # Alois P. Heinz, May 17 2023
  • Mathematica
    nn=25;Drop[Range[0,nn]!CoefficientList[Series[Integrate[Exp[Cosh[x]-1]D[ Exp[Sinh[x]],x],x],{x,0,nn}],x],1]

Formula

E.g.f. A(x) satisfies: A'(x) = B'(x)*C(x) where B(x) is the e.g.f. for A003724 and C(x) is the e.g.f. for A005046.
a(n) = Sum_{k=0..floor((n-1)/2)} (k+1)*A124322(n-1,k). - Alois P. Heinz, Apr 02 2013
a(n) = Sum_{k=0..floor((n-1)/2)} binomial(n-1,2*k) * Bell(n-2*k-1). - Ilya Gutkovskiy, Apr 10 2022
From Alois P. Heinz, May 17 2023: (Start)
a(n) = Sum_{k=0..n-1} (-1)^k * A283424(n-1,k).
a(n) mod 2 = A131719(n+1). (End)

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

Original entry on oeis.org

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

Views

Author

Paul Curtz, Sep 19 2007

Keywords

Crossrefs

Cf. A131719.

Programs

  • Mathematica
    PadRight[{},120,{0,0,1,1,1,1}] (* or *) LinearRecurrence[{1,-1,1,-1,1},{0,0,1,1,1},120] (* Harvey P. Dale, Jun 17 2015 *)

Formula

G.f.: -(x^2+1)*x^2/(x-1)/(x^2+x+1)/(x^2-x+1). - R. J. Mathar, Nov 14 2007
a(n) = 2/3-(1/2)*cos((1/3)*Pi*n)-(1/6)*3^(1/2)*sin((1/3)*Pi*n)-(1/6)*cos((2/3)*Pi*n)-(1/6)*3^(1/2)*sin((2/3)*Pi*n). - R. J. Mathar, Nov 15 2007
a(n) = A131719(n-1), n>0. - R. J. Mathar, Jun 13 2008

A349788 Number of permutations of [n] having exactly one increasing cycle.

Original entry on oeis.org

0, 1, 1, 1, 5, 36, 234, 1597, 12459, 111451, 1116277, 12298958, 147655760, 1919465237, 26870436345, 403044639709, 6448695657957, 109628096021612, 1973308547820586, 37492874766408001, 749857477972731979, 15747006284752049759, 346434131946498886045
Offset: 0

Views

Author

Alois P. Heinz, Nov 30 2021

Keywords

Comments

Cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1) < b(2) < ... .
Exponential convolution of A000587 with A002627.

Examples

			a(4) = 5: (1)(243), (143)(2), (142)(3), (132)(4), (1234).
		

Crossrefs

Column k=1 of A186754.

Programs

  • Maple
    b:= proc(n) option remember; series(`if`(n=0, 1, add((x+
         (j-1)!-1)*binomial(n-1, j-1)*b(n-j), j=1..n)), x, 2)
        end:
    a:= n-> coeff(b(n), x, 1):
    seq(a(n), n=0..23);
  • Mathematica
    b[n_] := b[n] = Series[If[n == 0, 1, Sum[(x+
         (j-1)!-1)*Binomial[n-1, j-1]*b[n-j], {j, 1, n}]], {x, 0, 2}];
    a[n_] := Coefficient[b[n], x, 1];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Apr 15 2022, after Alois P. Heinz *)

Formula

E.g.f.: exp(1-exp(x))*(exp(x)-1)/(1-x).
a(n) = A186758(n) - A186755(n).
a(n) = Sum_{j=0..n} binomial(n,j)*A000587(j)*A002627(n-j).
a(n) mod 2 = A131719(n).
a(n) ~ (exp(1) - 1) * exp(1 - exp(1)) * n!. - Vaclav Kotesovec, Dec 05 2021

A350175 Sum of the distinct block sizes over all partitions of [n].

Original entry on oeis.org

0, 1, 3, 13, 45, 196, 888, 4383, 22879, 129163, 768913, 4849912, 32202712, 224672241, 1640679589, 12517008985, 99484656169, 822410210044, 7055883373604, 62730142658947, 576984726864147, 5482889832932123, 53757450049841167, 543169144098559606, 5649499728403949184
Offset: 0

Views

Author

Alois P. Heinz, Jan 06 2022

Keywords

Examples

			a(3) = 13 = 1*3 + 3*(1+2) + 1: 123, 1|23, 13|2, 12|3, 1|2|3.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, c) option remember; `if`(n=0, c,
          `if`(i<1, 0, add(b(n-j*i, i-1, c+i*signum(j))*
          combinat[multinomial](n, n-i*j, i$j)/j!, j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..30);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, c_] := b[n, i, c] = If[n == 0, c,
         If[i < 1, 0, Sum[b[n - j*i, i - 1, c + i*Sign[j]]*
         multinomial[n, Join[{n - i*j}, Table[i, {j}]]]/j!, {j, 0, n/i}]]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 11 2022, after Alois P. Heinz *)

Formula

a(n) mod 2 = A131719(n).

A363592 Number of partitions of [n] such that in each block the smallest element has the same parity as the largest element.

Original entry on oeis.org

1, 1, 1, 3, 6, 20, 55, 223, 761, 3595, 14532, 77818, 361605, 2155525, 11274781, 73822175, 428004750, 3046519516, 19348533739, 148493347507, 1023481273549, 8412534272415, 62450994058052, 546699337652602, 4343869829492281, 40308548641909593, 340994681344324137
Offset: 0

Views

Author

Alois P. Heinz, Jun 10 2023

Keywords

Examples

			a(0) = 1: () the empty partition.
a(1) = 1: 1.
a(2) = 1: 1|2.
a(3) = 3: 123, 13|2, 1|2|3.
a(4) = 6: 123|4, 13|24, 13|2|4, 1|234, 1|24|3, 1|2|3|4.
a(5) = 20: 12345, 1235|4, 123|4|5, 1245|3, 125|3|4, 1345|2, 135|24, 13|24|5, 135|2|4, 13|2|4|5, 15|234, 1|234|5, 145|2|3, 15|24|3, 1|24|35, 1|24|3|5, 1|2|345, 15|2|3|4, 1|2|35|4, 1|2|3|4|5.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, x, y, u, v) option remember; `if`(y+u>n, 0, `if`(n=0, 1,
          `if`(y=0, 0, b(n-1, v, u, y-1, x+1)*y)+b(n-1, v, u, y, x+1)+
          `if`(v=0, 0, b(n-1, v-1, u+1, y, x)*v)+b(n-1, v, u, y, x)*(u+x)))
        end:
    a:= n-> b(n, 0$4):
    seq(a(n), n=0..30);

Formula

a(n) mod 2 = A131719(n+1).

A283439 Hankel transform of A033434.

Original entry on oeis.org

1, -3, -9, -6, 10, 25, 15, -21, -49, -28, 36, 81, 45, -55, -121, -66, 78, 169, 91, -105, -225, -120, 136, 289, 153, -171, -361, -190, 210, 441, 231, -253, -529, -276, 300, 625, 325, -351, -729, -378, 406, 841, 435, -465, -961, -496, 528, 1089, 561, -595, -1225
Offset: 0

Views

Author

Paul Barry, Mar 07 2017

Keywords

Comments

a(n) modulo 2 is A131719(n+2).

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - 5*x + 2*x^3 - 3*x^4 + 2*x^5 - x^6)/((1 + x)*(1 - x + x^2)^3) ,{x, 0, 35}], x] (* Indranil Ghosh, Mar 08 2017 *)
  • PARI
    print(Vec((1 - 5*x + 2*x^3 - 3*x^4 + 2*x^5 - x^6)/((1 + x)*(1 - x + x^2)^3) + O(x^36))); \\ Indranil Ghosh, Mar 08 2017

Formula

G.f.: (1 - 5*x + 2*x^3 - 3*x^4 + 2*x^5 - x^6)/((1 + x)*(1 - x + x^2)^3).
a(3*k) = (-1)^k*(k + 1)*(2*k + 1).
a(3*k + 1) = -(-1)^k*(k + 1)*(2*k + 3).
a(3*k + 2) = -(-1)^k*(k + 3)^2.

Extensions

More terms from Indranil Ghosh, Mar 08 2017
Showing 1-9 of 9 results.