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 21-30 of 50 results. Next

A079962 Number of permutations satisfying -k <= p(i) - i <= r and p(i) - i not in I, i=1..n, with k=1, r=5, I={1,3}.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 9, 14, 22, 36, 58, 94, 153, 247, 399, 646, 1045, 1691, 2737, 4428, 7164, 11592, 18756, 30348, 49105, 79453, 128557, 208010, 336567, 544577, 881145, 1425722, 2306866, 3732588, 6039454, 9772042, 15811497, 25583539, 41395035
Offset: 0

Views

Author

Vladimir Baltic, Feb 19 2003

Keywords

Comments

Number of compositions (ordered partitions) of n into elements of the set {1,3,5,6}. - Mark Dols, Aug 20 2010

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Programs

  • Magma
    [Round(Fibonacci(n+3)/4): n in [0..40]]; // G. C. Greubel, Jan 21 2022
    
  • Maple
    with(combinat,fibonacci): seq(round(fibonacci(n+3)/4),n=0..38) # Mircea Merca, Jan 04 2011
  • Mathematica
    LinearRecurrence[{1,0,1,0,1,1}, {1,1,1,2,3,5}, 41] (* G. C. Greubel, Jan 21 2022 *)
  • PARI
    a(n)=fibonacci(n+3)\/4 \\ Charles R Greathouse IV, Oct 07 2015
    
  • Sage
    [(1/4)*(fibonacci(n+3) + chebyshev_U(n,1/2) + chebyshev_U(2*n,1/2)) for n in (0..40)] # G. C. Greubel, Jan 21 2022

Formula

a(n) = a(n-1) + a(n-3) + a(n-5) + a(n-6).
G.f.: 1/((1+x+x^2)*(1-x+x^2)*(1-x-x^2)).
a(n+1)/a(n) -> golden ratio A001622. - Roger L. Bagula, Mar 13 2006
a(n) + a(n+2) + a(n+4) = Fibonacci(n+5). - Mark Dols, Aug 20 2010
a(n) = round(Fibonacci(n+3)/4). - Mircea Merca, Jan 04 2011
a(n+6) - a(n) = A000045(n+6). - Paul Curtz, Jun 29 2013
a(n) + a(n+1) + a(n+2) = A024490(n+6). - R. J. Mathar, Jun 30 2013
a(n) - a(n-1) + a(n-2) = A094686(n). - R. J. Mathar, Jun 30 2013
4*a(n) = A057078(n) + A010892(n) + A000045(n+3). - R. J. Mathar, Nov 02 2016

A084091 Expansion of Sum_{k>=0} x^2^k/(1+x^2^k+x^2^(k+1)).

Original entry on oeis.org

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

Views

Author

Ralf Stephan, May 11 2003

Keywords

Comments

Chances of values -1/0/+1 are ~ 2:5:2.

Examples

			G.f. = x + x^4 - x^5 + x^7 - x^11 + x^13 + x^16 - x^17 + x^19 - x^20 - x^23 + ...
		

Crossrefs

Cf. A002487.
Positions of 0 are in A084090, of 1 in A084089, of -1 in A084088, of a(n)!=0 in A084087.
Cf. A373155 (from term a(1) onward absolute values, also parity of terms).

Programs

  • Mathematica
    a[ n_] := If[n < 1, 0, With[ {f = #/(1 + # + #^2) &}, SeriesCoefficient[ Sum[ f[x^2^k], {k, 0, Log[2, n]}], {x, 0, n}]]]; (* Michael Somos, Jun 16 2015 *)
    f[p_, e_] := If[Mod[p, 6] == 1, 1, (-1)^e]; f[2, e_] := (1 + (-1)^e)/2; f[3, e_] := 0; a[n_] := Times @@ f @@@ FactorInteger[n]; a[0] = 0; a[1] = 1; Array[a, 100, 0] (* Amiram Eldar, Sep 04 2023 *)
  • PARI
    {a(n) = my(A, m); if( n<1, 0, A = O(x); m=1; while( m<=n, m*=2; A = x / (1 + x + x^2) + subst(A, x, x^2)); polcoeff(A, n))}; /* Michael Somos, Jul 18 2004 */
    
  • PARI
    {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k,]; if( p==2, !(e%2), p==3, 0, kronecker( -12, p)^e)))}; /* Michael Somos, Jun 16 2015 */
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=1, n, if( p==2, 1 / (1 - X^2), p==3, 1, 1 / (1 - kronecker( -12, p) * X)))[n])}; /* Michael Somos, Jun 16 2015 */
    
  • PARI
    A084091(n) = if(!n, n, my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], !(f[k, 2]%2), if(2==(f[k, 1]%3), (-1)^f[k, 2], f[k, 1]%3)))); \\ Antti Karttunen, May 28 2024

Formula

a(2n) = a(n) + 1 - (n+1 mod 3), a(2n+1) = 1 - (n mod 3). - Ralf Stephan, Sep 27 2003
a(n) is multiplicative with a(2^e) = (1 + (-1)^e)/2, a(3^e) = 0^e, a(p^e) = 1 if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6). - Michael Somos, Jul 18 2004
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - v^2 + 2*w*(v-u) + w-v. - Michael Somos, Jul 18 2004
G.f.: Sum_{k>=0} f(x^2^k) where f(x) := x * (1 - x) / (1 - x^3). - Michael Somos, Jul 18 2004
max(Sum_{k=0..n} a(k)) = floor(log_4(n))+1. Proof by Nikolaus Meyberg.
Dirichlet g.f. (conjectured): L(chi_2(3),s)/(1-2^(-s)), with chi_2(3) the nontrivial Dirichlet character modulo 3. - Ralf Stephan, Mar 27 2015
a(2*n + 1) = A057078(n). a(3*n) = 0. a(3*n + 1) = A098725(n+1). - Michael Somos, Jun 16 2015

A364374 G.f. satisfies A(x) = (1 + x*A(x)) * (1 - x*A(x)^2).

Original entry on oeis.org

1, 0, -1, 1, 2, -6, -1, 28, -31, -98, 288, 131, -1730, 1638, 7431, -19583, -15502, 135642, -99523, -664050, 1535896, 1816196, -11902728, 5944326, 64487669, -129346490, -213116764, 1112382523, -277762230, -6572175490, 11287106695, 25078981772, -107983368519, -1826241850
Offset: 0

Views

Author

Seiichi Manyama, Jul 21 2023

Keywords

Crossrefs

Programs

  • Maple
    A364374 := proc(n)
        add( (-1)^k*binomial(n+k+1,k) * binomial(n+k+1,n-k)/(n+k+1),k=0..n) ;
    end proc:
    seq(A364374(n),n=0..80); # R. J. Mathar, Jul 25 2023
  • Mathematica
    nmax = 33;
    A[_] = 1;
    Do[A[x_] = (1+x*A[x])*(1-x*A[x]^2) + O[x]^(nmax+1) // Normal, {nmax}];
    CoefficientList[A[x], x] (* Jean-François Alcover, Oct 21 2023 *)
  • PARI
    a(n) = sum(k=0, n, (-1)^k*binomial(n+k+1, k)*binomial(n+k+1, n-k)/(n+k+1));

Formula

a(n) = Sum_{k=0..n} (-1)^k * binomial(n+k+1,k) * binomial(n+k+1,n-k) / (n+k+1).
D-finite with recurrence 15*n*(n+1)*a(n) +2*n*(13*n-11)*a(n-1) +12*(9*n^2-19*n+9)*a(n-2) +2*(10*n^2-65*n+99)*a(n-3) -4*(n-3)*(2*n-7)*a(n-4)=0. - R. J. Mathar, Jul 25 2023
A(x) = (1/x) * series_reversion(x*(1 + x + x^2)/(1 + x)). - Peter Bala, Sep 08 2024

A093040 Expansion of (1+x)/((1+x+x^2)(1-x-x^2)).

Original entry on oeis.org

1, 1, 1, 3, 4, 6, 11, 17, 27, 45, 72, 116, 189, 305, 493, 799, 1292, 2090, 3383, 5473, 8855, 14329, 23184, 37512, 60697, 98209, 158905, 257115, 416020, 673134, 1089155, 1762289, 2851443, 4613733, 7465176, 12078908, 19544085, 31622993, 51167077
Offset: 0

Views

Author

Paul Barry, Mar 15 2004

Keywords

Comments

The sequence 0,1,1,1,3... has a(n) = Fib(n+1)/2-A049347(n)/2. It counts paths of length n between two of the vertices of the graph with adjacency matrix [0,1,0,0;0,0,1,1;1,1,0,0;0,0,1,0].
Diagonal sums of Riordan array ((1+x), x(1+x)^2). - Paul Barry, May 31 2006
a(n) is the number of compositions of n into parts 1,2,3 with no two consecutive 1's. For example a(5) = 6 because we have: 3+2, 2+3, 1+3+1, 2+2+1, 2+1+2, 1+2+2. - Geoffrey Critzer, Mar 15 2014
a(n) is the number of compositions of n+1 into an odd number of parts 1 and 2, that is, the number of barcodes of width n+1 with alternating black and white bars of width 1 or 2 and black border (see the first recurrence formula). - Grégoire Nicollier, Apr 04 2022

Examples

			G.f. = 1 + x + x^2 + 3*x^3 + 4*x^4 + 6*x^5 + 11*x^6 + 17*x^7 + 27*x^8 + 45*x^9 + ...
		

References

  • MacKay, Information Theory, Inference and Learning Algorithms, CUP, 2003, p. 251

Crossrefs

Programs

  • Magma
    [Floor(Fibonacci(n+3)/2)-Floor(Fibonacci(n+1)/2): n in [1..50]]; // Vincenzo Librandi, Jul 10 2012
    
  • Mathematica
    CoefficientList[Series[((1+x)/(1-x-x^2)+(1-x^2)/(1-x^3))/2,{x,0,50}],x] (* Vincenzo Librandi, Jul 10 2012 *)
    a[ n_] := SeriesCoefficient[ If[ n < 0, x^3 (1 + x) / (1 + 2 x + x^2 - x^4), (1 + x) / (1 - x^2 - 2 x^3 - x^4)], {x, 0, Abs@n}]; (* Michael Somos, Mar 19 2014 *)
    LinearRecurrence[{0, 1, 2, 1}, {1, 1, 1, 3}, 39] (* Jean-François Alcover, Sep 21 2017 *)
  • PARI
    Vec(((1+x)/(1-x-x^2)+(1-x^2)/(1-x^3))/2 + O(x^50)) \\ Michel Marcus, Sep 27 2014

Formula

G.f.: ((1+x)/(1-x-x^2)+(1-x^2)/(1-x^3))/2.
a(n) = a(n-2) + 2*a(n-3) + a(n-4).
a(n) = Fib(n+2)/2+sqrt(3)sin(2*Pi*n/3+Pi/3)/3 = Fib(n+2)/2+A057078(n)/2.
a(n-1) = Sum_{k=0..floor(n/2)} if(mod(n-k, 2)=1, binomial(n-k, k), 0).
a(n-1) = A094686(n) - Fib(n). - Paul Barry, Jan 13 2005
a(n) = Sum_{k=0..floor(n/2)} binomial(2k+1,n-2k). - Paul Barry, May 31 2006
a(n) = floor(Fibonacci(n+3)/2) - floor(Fibonacci(n+1)/2). - Gary Detlefs, Mar 13 2011
a(n) = a(n-2) + 2*a(n-3) + a(n-4), a(-3-n) = (-1)^n * A005252(n) for all n in Z. - Michael Somos, Mar 19 2014
a(n-1) + 2*a(n) - a(n+2) = a(n) - a(n-1) - a(n-2) = A057078(n) for all n in Z. - Michael Somos, Mar 19 2014
2*a(n) = A057078(n) + A000045(n+2). - R. J. Mathar, Sep 16 2017

A152728 a(n) + a(n+1) + a(n+2) = n^3.

Original entry on oeis.org

0, 0, 0, 1, 7, 19, 38, 68, 110, 165, 237, 327, 436, 568, 724, 905, 1115, 1355, 1626, 1932, 2274, 2653, 3073, 3535, 4040, 4592, 5192, 5841, 6543, 7299, 8110, 8980, 9910, 10901, 11957, 13079, 14268, 15528, 16860, 18265, 19747, 21307, 22946, 24668, 26474
Offset: 0

Views

Author

Keywords

Comments

The differences between the terms are (1) a(3*k) - a(3*k-1) = 9*k*(k-1)+1; (2) otherwise, a(n) - a(n-1) = (n-2)*(n-1). - J. M. Bergot, Jul 10 2013
Second differences give A047266. - J. M. Bergot, Dec 01 2014

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); [0,0,0] cat Coefficients(R!(x^3*(1+4*x+x^2)/((1+x+x^2)*(x-1)^4))); // G. C. Greubel, Sep 01 2018
  • Maple
    seq(ceil((n^3 - 3*n^2 + n)/3), n=0..100); # Robert Israel, Dec 01 2014
  • Mathematica
    k0=k1=0;lst={k0,k1};Do[kt=k1;k1=n^3-k1-k0;k0=kt;AppendTo[lst,k1],{n,1,4!}];lst
    LinearRecurrence[{3,-3,2,-3,3,-1}, {0,0,0,1,7,19}, 50] (* G. C. Greubel, Sep 01 2018 *)
  • PARI
    x='x+O('x^50); concat([0,0,0], Vec(x^3*(1+4*x+x^2)/((1+x+x^2)*(x -1)^4 ))) \\ G. C. Greubel, Sep 01 2018
    

Formula

From R. J. Mathar, Aug 15 2010: (Start)
a(n) = ( (n-1)*(n^2-2*n-1) - A057078(n))/3.
G.f.: x^3*(1+4*x+x^2) / ( (1+x+x^2)*(x-1)^4 ). (End)
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - 3*a(n-4) + 3*a(n-5) - a(n-5). - Charles R Greathouse IV, Jul 10 2013
a(3n) = n*(9n^2-9n+1), a(3n+1) = n*(9n^2-2), a(3n+2) = n*(9n^2+9n+1). - Ralf Stephan, Jul 12 2013
a(n) = ceiling((n^3 - 3*n^2 + n)/3). - Robert Israel, Dec 01 2014
E.g.f.: (3*exp(x)*(1 - x + x^3) - exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, Mar 04 2023

A187498 Let i be in {1,2,3,4} and let r >= 0 be an integer. Let p={p_1, p_2, p_3, p_4} = {-3,0,1,2}, n=3*r+p_i, and define a(-3)=0. Then a(n)=a(3*r+p_i) gives the quantity of H_(9,4,0) tiles in a subdivided H_(9,i,r) tile after linear scaling by the factor Q^r, where Q=sqrt(2*cos(Pi/9)).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 1, 2, 1, 3, 3, 4, 4, 6, 5, 10, 10, 14, 15, 20, 20, 34, 35, 48, 55, 69, 75, 117, 124, 165, 199, 241, 274, 406, 440, 571, 714, 846, 988, 1417, 1560, 1988, 2548, 2977, 3536, 4965, 5525, 6953, 9061, 10490, 12597, 17443, 19551
Offset: 0

Views

Author

L. Edson Jeffery, Mar 16 2011

Keywords

Comments

Theory: (Start)
1. Definitions. Let T_(9,j,0) denote the rhombus with sides of unit length (=1), interior angles given by the pair (j*Pi/9,(9-j)*Pi/9) and Area(T_(9,j,0))=sin(j*Pi/9), j in {1,2,3,4}. Associated with T_(9,j,0) are its angle coefficients (j, 9-j) in which one coefficient is even while the other is odd. A half-tile is created by cutting T_(9,j,0) along a line extending between its two corners with even angle coefficient; let H_(9,j,0) denote this half-tile. Similarly, a T_(9,j,r) tile is a linearly scaled version of T_(9,j,0) with sides of length Q^r and Area(T_(9,j,r))=Q^(2*r)*sin(j*Pi/9), r>=0 an integer, where Q is the positive, constant square root Q=sqrt(2*cos(Pi/9)); likewise let H_(9,j,r) denote the corresponding half-tile. Often H_(9,i,r) (i in {1,2,3,4}) can be subdivided into an integral number of each equivalence class H_(9,j,0). But regardless of whether or not H_(9,j,r) subdivides, in theory such a proposed subdivision for each j can be represented by the matrix M=(m_(i,j)), i,j=1,2,3,4, in which the entry m_(i,j) gives the quantity of H_(9,j,0) tiles that should be present in a subdivided H_(9,i,r) tile. The number Q^(2*r) (the square of the scaling factor) is an eigenvalue of M=(U_1)^r, where
U_1=
(0 1 0 0)
(1 0 1 0)
(0 1 0 1)
(0 0 1 1).
2. The sequence. Let r>=0, and let D_r be the r-th "block" defined by D_r={a(3*r-3),a(3*r),a(3*r+1),a(3*r+2)} with a(-3)=0. Note that D_r-D_(r-1)-3*D_(r-2)+2*D_(r-3)+D_(r-4)={0,0,0,0}, for r>=4, with initial conditions {D_k}={{0,0,0,1},{0,0,1,1},{0,1,1,2},{1,1,3,3}}, k=0,1,2,3. Let p={p_1,p_2,p_3,p_4}={-3,0,1,2} and n=3*r+p_i. Then a(n)=a(3*r+p_i)=m_(i,4), where M=(m_(i,j))=(U_1)^r was defined above. Hence the block D_r corresponds component-wise to the fourth column of M, and a(3*r+p_i)=m_(i,4) gives the quantity of H_(9,4,0) tiles that should appear in a subdivided H_(9,i,r) tile. (End)
Combining blocks A_r, B_r, C_r and D_r, from A187495, A187496, A187497 and this sequence, respectively, as matrix columns [A_r,B_r,C_r,D_r] generates the matrix (U_1)^r, and a negative index (-1)*r yields the corresponding inverse [A_(-r),B_(-r),C_(-r),D_(-r)]=(U_1)^(-r) of (U_1)^r.. Therefore the four sequences need not be causal.
Since U_1 is symmetric, so is M=(U_1)^r, so the block D_r also corresponds to the fourth row of M. Therefore, alternatively, for j=1,2,3,4, a(3r+p_j)=m_(4,j) gives the quantity of H_(9,j,0) tiles that should be present in a H_(9,4,r) tile.
Since a(3*r)=a(3*(r+1)-3) for all r, this sequence arises by concatenation of fourth-column entries m_(2,4), m_(3,4) and m_(4,4) (or fourth-row entries m_(4,2), m_(4,3) and m_(4,4)) from successive matrices M=(U_1)^r.

References

  • L. E. Jeffery, Unit-primitive matrices and rhombus substitution tilings, (in preparation).

Crossrefs

Programs

  • Maple
    A052931 := proc(n) if n < 0 then 0; else coeftayl(1/(1-3*x^2-x^3),x=0,n) ; end if; end proc:
    A052931a := proc(n) if n mod 3 = 0 then A052931(n/3) ; else 0 ; end if; end proc:
    A057078 := proc(n) op(1+(n mod 3),[1,0,-1]) ; end proc:
    A187498 := proc(n) -A057078(n) +A052931a(n) +2*A052931a(n-2) +A052931a(n-3) +3*A052931a(n-4) +2*A052931a(n-5) +A052931a(n-6) +3*A052931a(n-7) -A052931a(n-8) ; %/3 ; end proc:
    seq(A187498(n),n=0..20) ; # R. J. Mathar, Mar 22 2011
  • Mathematica
    CoefficientList[Series[-x^2*(1 + x)*(x^6 + 3*x^4 + 2*x^2 + 1)/((1 + x + x^2)*(x^9 + 3*x^6 - 1)), {x, 0, 1000}], x] (* G. C. Greubel, Sep 23 2017 *)
  • PARI
    x='x+O('x^50); Vec(-x^2*(1+x)*(x^6+3*x^4+2*x^2+1)/((1+x+x^2)*(x^9+3*x^6-1))) \\ G. C. Greubel, Sep 23 2017

Formula

Recurrence: a(n) = a(n-3) +3*a(n-6) -2*a(n-9) -a(n-12), for n >= 12, with initial conditions {a(m)} = {0,0,1,0,1,1,1,1,2,1,3,3}, m=0,1,...,11.
G.f.: -x^2*(1+x)*(x^6+3*x^4+2*x^2+1) / ( (1+x+x^2)*(x^9+3*x^6-1) ).

A113655 Reverse blocks of three in the sequence of natural numbers.

Original entry on oeis.org

3, 2, 1, 6, 5, 4, 9, 8, 7, 12, 11, 10, 15, 14, 13, 18, 17, 16, 21, 20, 19, 24, 23, 22, 27, 26, 25, 30, 29, 28, 33, 32, 31, 36, 35, 34, 39, 38, 37, 42, 41, 40, 45, 44, 43, 48, 47, 46, 51, 50, 49, 54, 53, 52, 57, 56, 55, 60, 59, 58, 63, 62, 61, 66, 65, 64, 69, 68, 67, 72, 71, 70
Offset: 1

Views

Author

Parag D. Mehta (pmehta23(AT)gmail.com), Jan 16 2006

Keywords

Crossrefs

Programs

  • Magma
    I:=[3,2,1,6]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..80]]; // Vincenzo Librandi, Sep 28 2017
  • Maple
    seq(6*floor((n+2)/3)-n-2,n=1..72); # Dennis P. Walsh, Aug 16 2013
  • Mathematica
    f[n_] := Switch[ Mod[n, 3], 0, n - 2, 1, n + 2, 2, n]; Array[f, 72] (* Robert G. Wilson v, Jan 18 2006 *)
    LinearRecurrence[{1, 0, 1, -1}, {3, 2, 1, 6}, 100] (* or *) CoefficientList[Series[(3 - x - x^2 + 2 x^3) / ((1 + x + x^2) (1 - x)^2), {x, 0, 80}], x] (* Vincenzo Librandi, Sep 28 2017 *)
    Reverse/@Partition[Range[81],3]//Flatten (* Harvey P. Dale, Oct 11 2020 *)
  • PARI
    a(n)=2+n-2*((n+2)%3); \\ Jaume Oliver Lafont, Mar 25 2009
    

Formula

a(n) = 3*floor((n+2)/3) - (n-1) mod 3. - Robert G. Wilson v and Zak Seidov, Jan 20 2006
a(n) = a(n-3)+3 = a(n-1)+a(n-3)-a(n-4). - Jaume Oliver Lafont, Dec 02 2008
G.f.: (3*x - x^2 - x^3 + 2*x^4)/(1 - x - x^3 + x^4) = x*(3 - x - x^2 + 2*x^3)/((1 + x + x^2)*(1-x)^2). - Jaume Oliver Lafont, Mar 25 2009
a(n) = 6*floor((n+2)/3) - n - 2. - Dennis P. Walsh, Aug 16 2013
a(n) = A000027(n) + 2 * A057078(n+2). - Dennis P. Walsh, Aug 16 2013
a(n) = n + 2 * A079918(n-1) - 2 * A079918(n). - Dennis P. Walsh, Aug 16 2013
a(n) = n - 2*A049347(n). - Wesley Ivan Hurt, Sep 27 2017, simplified Jun 30 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2). - Amiram Eldar, Jan 31 2023

Extensions

More terms from Robert G. Wilson v, Jan 18 2006

A047266 Numbers that are congruent to {0, 1, 5} mod 6.

Original entry on oeis.org

0, 1, 5, 6, 7, 11, 12, 13, 17, 18, 19, 23, 24, 25, 29, 30, 31, 35, 36, 37, 41, 42, 43, 47, 48, 49, 53, 54, 55, 59, 60, 61, 65, 66, 67, 71, 72, 73, 77, 78, 79, 83, 84, 85, 89, 90, 91, 95, 96, 97, 101, 102, 103, 107, 108, 109, 113, 114, 115, 119, 120, 121, 125
Offset: 1

Views

Author

Keywords

Comments

a(n+3) is the Hankel transform of A005773(n+3). - Paul Barry, Nov 04 2008
The numbers m == 0, 2 or 10 mod 12 (the doubles of this sequence, that is, 10, 12, 14, 22, 24, 26, 34, ...) have the property that exactly 1/4 of the 3-part partitions of m form the sides of a triangle. See Mathematics Stack Exchange, 2013, link. - Ed Pegg Jr, Dec 19 2013
Row sum of a triangle where two rules build the triangle. #1 Start with the value "1" at the top of the triangle. #2 Require every "triple" to contain the values 1,2,3 (see link below). Compare with A136289 that has "3" at the apex. - Craig Knecht, Oct 17 2015
Nonnegative m such that floor(k*m^2/6) = k*floor(m^2/6), where k = 2, 3, 4 or 5. - Bruno Berselli, Dec 03 2015

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 6 in [0, 1, 5]]; // Wesley Ivan Hurt, Jun 13 2016
  • Maple
    seq(seq(6*s+j, j=[0,1,5]), s=0..100); # Robert Israel, Dec 01 2014
  • Mathematica
    Select[Range[0, 200], Mod[#, 6] == 0 || Mod[#, 6] == 1 || Mod[#, 6] == 5 &] (* Vladimir Joseph Stephan Orlovsky, Jul 07 2011 *)
  • PARI
    concat(0, Vec(x^2*(1+4*x+x^2)/((1+x+x^2)*(x-1)^2) + O(x^100))) \\ Altug Alkan, Oct 17 2015
    

Formula

G.f.: x^2*(1+4*x+x^2) / ((1+x+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 2011
a(n) = 2*(n-1) + A057078(n). - Robert Israel, Dec 01 2014
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4. - Wesley Ivan Hurt, Nov 09 2015
From Wesley Ivan Hurt, Jun 13 2016: (Start)
a(n) = 2*n-2+cos(2*n*Pi/3)+sin(2*n*Pi/3)/sqrt(3).
a(3k) = 6k-1, a(3k-1) = 6k-5, a(3k-2) = 6k-6. (End)
Sum_{n>=2} (-1)^n/a(n) = log(2)/6 + log(2 + sqrt(3))/sqrt(3). - Amiram Eldar, Dec 14 2021

A163804 Expansion of (1 - x) * (1 - x^4) / ((1 - x^2) * (1 - x^3)) in powers of x.

Original entry on oeis.org

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

Views

Author

Michael Somos, Aug 04 2009

Keywords

Examples

			1 - x + x^2 - x^4 + x^5 - x^7 + x^8 - x^10 + x^11 - x^13 + x^14 + ...
		

Crossrefs

A106510(n) = -a(n) unless n=0. Convolution inverse of A117659.
Cf. A102283.

Programs

  • Maple
    1, seq(2*sin(4*Pi*n/3)/sqrt(3), n=1..100); # Ridouane Oudra, Jan 09 2025
  • Mathematica
    Join[{1},LinearRecurrence[{-1, -1},{-1, 1},105]] (* Ray Chandler, Sep 15 2015 *)
  • PARI
    {a(n) = (n==0) + [0, -1, 1][n%3 + 1]}
    
  • PARI
    {a(n) = (n==0) - kronecker(-3, n)}

Formula

Euler transform of length 4 sequence [ -1, 1, 1, -1].
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = 2 - v - u * (4 - 2*v - u).
a(3*n) = 0 unless n=0, a(3*n + 1) = -1, a(3*n + 2) = a(0) = 1.
a(-n) = -a(n) unless n=0. a(n+3) = a(n) unless n=0 or n=-3.
G.f.: (1 + x^2) / (1 + x + x^2).
G.f.: A(x) = 1 / (1 + x / (1 + x^2)) = 1 - x / (1 + x / (1 - x / (1 + x))). - Michael Somos, Jan 03 2013
a(n) = A057078(n-2), n>1. - R. J. Mathar, Aug 06 2009
From Ridouane Oudra, Jan 09 2025: (Start)
a(n) = 3*floor((n+1)/3) - n, for n>0.
a(n) = 2*sin(4*Pi*n/3)/sqrt(3), for n>0.
a(n) = - A102283(n), for n>0.
a(n) = - A106510(n), for n>0. (End)

A165188 Interleaving of A014125 and zero followed by A014125.

Original entry on oeis.org

1, 0, 3, 1, 6, 3, 11, 6, 18, 11, 27, 18, 39, 27, 54, 39, 72, 54, 94, 72, 120, 94, 150, 120, 185, 150, 225, 185, 270, 225, 321, 270, 378, 321, 441, 378, 511, 441, 588, 511, 672, 588, 764, 672, 864, 764, 972, 864, 1089, 972, 1215, 1089, 1350, 1215, 1495, 1350
Offset: 1

Views

Author

Alford Arnold, Sep 13 2009

Keywords

Comments

This sequence convolved with A000217 (without initial term 0) yields A164680.
See A164680 for similar convolutions.
A165188 convolved with A000217 yields sequence A164680. This is to be expected since A000217 can be associated with partition 1+1+1, A164680 with partition 1+1+1+2+2+2+3 and A165188 with partition 2+2+2+3 by observing their unreduced generating functions and verified by generating the sequences by converting the partitions into finite sequences and using Euler's Transform. Thus partition 1+1+1 yields the finite sequence (3); partition 2+2+2+3 yields the finite sequence (0,3,1); and, when combined, partition 1+1+1+2+2+2+3 yields (3,3,1). - Alford Arnold, Sep 24 2009

Examples

			A014125 begins 1,3,6,11,18,27,..., thus this sequence begins 1,0,3,1,6,3,11,6,18,11,27,18,... .
G.f. = x + 3*x^3 + x^4 + 6*x^5 + 3*x^6 + 11*x^7 + 6*x^8 + 18*x^9 + 11*x^10 + ...
		

Crossrefs

Programs

  • Magma
    I:=[1,0,3,1,6,3,11,6]; [n le 8 select I[n] else -Self(n-1)+2*Self(n-2)+3*Self(n-3)-3*Self(n-5)-2*Self(n-6)+Self(n-7)+Self(n-8)+1: n in [1..60]]; // Vincenzo Librandi, Jun 24 2015
  • Mathematica
    a[ n_] := Module[{s = 1, m = n}, If[ n < 0, s = -1; m = -7 - n]; s SeriesCoefficient[ x / ((1 - x^2)^3 (1 - x^3)), {x, 0, m}]]; (* Michael Somos, Feb 01 2015 *)
    LinearRecurrence[{0,3,1,-3,-3,1,3,0,-1},{1,0,3,1,6,3,11,6,18},60] (* Harvey P. Dale, Apr 14 2018 *)
  • PARI
    /* first computes u = A014125 as second bisection of A001400, then interleaves */ {m=28; u=vector(m, n, polcoeff(1/((1-x)*(1-x^2)*(1-x^3)*(1-x^4))+O(x^(2*n)), 2*n-1)); vector(2*m, k, if(k%2==1,u[(k+1)/2], if(k==2, 0, u[k/2-1])))} /* Klaus Brockhaus, Sep 15 2009 */
    
  • PARI
    {a(n) = my(s=1); if( n<0, s=-1; n=-7-n); s * polcoeff( x / ((1 - x^2)^3 * (1 - x^3)) + x * O(x^n), n)}; /* Michael Somos, Feb 01 2015 */
    

Formula

a(n) = -a(n-1)+2*a(n-2)+3*a(n-3)-3*a(n-5)-2*a(n-6)+a(n-7)+a(n-8)+1 for n > 8; a(1)=1, a(2)=0, a(3)=3, a(4)=1, a(5)=6, a(6)=3, a(7)=11, a(8)=6. - Klaus Brockhaus, Sep 15 2009
G.f.: x/((1-x)^4*(1+x)^3*(1+x+x^2)). - Klaus Brockhaus, Sep 15 2009
a(n) = (2*n^3+21*n^2+63*n+49)/288-(-1)^n*(9+7*n+n^2)/32+A057078(n)/9. - R. J. Mathar, Sep 17 2009
Euler transform of length 3 sequence [ 0, 3, 1]. - Michael Somos, Feb 01 2015
G.f.: x / ((1 - x^2)^3 * (1 - x^3)). - Michael Somos, Feb 01 2015
a(n) = -a(-7 - n) for all n in Z.
a(n+3) - a(n) = 0 if n odd else (n+6) * (n+4) / 8. - Michael Somos, Feb 01 2015
a(2*n + 1) = a(2*n + 4) = A014125(n) for all n in Z. - Michael Somos, Feb 01 2015

Extensions

Edited and extended by Klaus Brockhaus, Sep 15 2009
Linear recurrence link and signature correct by Michel Marcus, Jun 25 2015
Previous Showing 21-30 of 50 results. Next