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 64 results. Next

A181482 The sum of the first n integers, with every third integer taken negative.

Original entry on oeis.org

1, 3, 0, 4, 9, 3, 10, 18, 9, 19, 30, 18, 31, 45, 30, 46, 63, 45, 64, 84, 63, 85, 108, 84, 109, 135, 108, 136, 165, 135, 166, 198, 165, 199, 234, 198, 235, 273, 234, 274, 315, 273, 316, 360, 315, 361, 408, 360, 409, 459, 408, 460, 513, 459, 514, 570, 513, 571, 630
Offset: 1

Views

Author

Jon Perry, Oct 23 2010

Keywords

Comments

The partial sum for the first 10^k terms are 76, 57256, 55722556, 55572225556, 55557222255556,..., i.e., the palindrome 5{k}2{k-1}5{k} plus 1+2*10^(2*k-1). - R. J. Cano, Mar 10 2013, edited by M. F. Hasler, Mar 25 2013

Examples

			a(7) = 1 + 2 - 3 + 4 + 5 - 6 + 7 = 10.
		

Crossrefs

Programs

  • Haskell
    a181482 n = a181482_list !! (n-1)
    a181482_list = scanl1 (+) $ zipWith (*) [1..] $ cycle [1, 1, -1]
    -- Reinhard Zumkeller, Nov 23 2014
  • JavaScript
    c = 0; for (i = 1; i < 100; i++) {c += Math.pow(-1, (i + 1) % 3)*i; document.write(c, ", ");} // Jon Perry, Feb 17 2013
    
  • JavaScript
    c=0; for (i = 1; i < 100; i++) { c += (1 - (i + 1) % 3 % 2 * 2) * i; document.write(c + ", "); } // Jon Perry, Mar 03 2013
    
  • Magma
    I:=[1,3,0,4,9,3,10]; [n le 7 select I[n] else Self(n-1)+2*Self(n-3)-2*Self(n-4)-Self(n-6)+Self(n-7): n in [1..60]]; // Vincenzo Librandi, Feb 17 2013
    
  • Mathematica
    a[n_] := Sum[If[Mod[j, 3] == 0, -j, j], {j, 1, n}]; Table[a[i], {i, 1, 50, 1}] (* Jon Perry *)
    tri[n_] := n (n + 1)/2; f[n_] := tri@ n - 6 tri@ Floor[n/3]; Array[f, 63] (* Robert G. Wilson v, Oct 24 2010 *)
    CoefficientList[Series[-(1 + 2*x + 2*x^3 + x^4 - 3*x^2)/((1 + x + x^2)^2*(x - 1)^3), {x, 0,30}], x] (* Vincenzo Librandi, Feb 17 2013 *)
    Table[Sum[k * (-1)^Boole[Mod[k, 3] == 0], {k, n}], {n, 60}] (* Alonso del Arte, Feb 24 2013 *)
    With[{nn=20},Accumulate[Times@@@Partition[Riffle[Range[3nn],{1,1,-1}],2]]] (* Harvey P. Dale, Feb 09 2015 *)
  • PARI
    a(n)=sum(k=1,n,k*((-1)^(k%3==0)) )  \\ R. J. Cano, Feb 26 2013
    
  • PARI
    a(n)={my(y=n\3);n*(n+1)\2-3*y*(y+1)} \\ R. J. Cano, Feb 28 2013
    

Formula

From R. J. Mathar, Oct 23 2010: (Start)
a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7).
G.f.: -x*(1+2*x+2*x^3+x^4-3*x^2) / ( (1+x+x^2)^2*(x-1)^3 ).
a(n) = 2*A061347(n+1)/9 +4/9 + n*(n+1)/6 + 2*b(n)/3 where b(3k+1) = 0, b(3k) = -3k - 1 and b(3k+2) = 3k + 3. (End)
a(n) = sum((i+1)*A131561(i), i=0..n-1) = A000217(n)-6*A000217(floor(n/3)). [Bruno Berselli, Dec 10 2010]
a(0) = 0, a(n) = a(n-1) + (-1)^((n + 1) mod 3)*n - Jon Perry, Feb 17 2013
a(n) = n*(n+1)/2-3*floor(n/3)*(floor(n/3)+1). - R. J. Cano, Mar 01 2013 [Same as Berselli's formula. - Ed.]
a(3k) = 3k(k-1)/2. - Jon Perry, Mar 01 2013
a(0) = 0, a(n) = a(n-1) + (1 - ((n+1) mod 3 mod 2) * 2) * n. - Jon Perry, Mar 03 2013

Extensions

More terms added by R. J. Mathar, Oct 23 2010

A188183 Number of strictly increasing arrangements of 5 numbers in -(n+3)..(n+3) with sum zero.

Original entry on oeis.org

12, 32, 73, 141, 252, 414, 649, 967, 1394, 1944, 2649, 3523, 4604, 5910, 7483, 9343, 11538, 14090, 17053, 20451, 24342, 28754, 33751, 39361, 45654, 52662, 60459, 69079, 78602, 89064, 100551, 113101, 126804, 141702, 157891, 175413, 194370, 214808
Offset: 1

Views

Author

R. H. Hardin Mar 23 2011

Keywords

Comments

Row 5 of A188181

Examples

			Some solutions for n=5
.-5...-8...-7...-8...-6...-4...-8...-6...-8...-5...-8...-7...-6...-6...-8...-7
.-3...-3...-4...-6...-2...-3...-7...-5...-2...-3...-2...-4...-5...-5...-1...-6
.-1...-2....0....0...-1...-1....4...-2....2...-1....1...-2....2...-3....1....1
..3....5....4....6....2....0....5....6....3....1....3....6....3....6....3....4
..6....8....7....8....7....8....6....7....5....8....6....7....6....8....5....8
		

Formula

Empirical: a(n)=2*a(n-1)-a(n-3)-2*a(n-5)+2*a(n-6)+a(n-8)-2*a(n-10)+a(n-11).
Empirical: a(n) = 427*n^2/144 +155*n/32 +5501/1728+23*n^4/288 +115*n^3/144 -3*(-1)^n*n/32-15*(-1)^n/64 +A057077(n+1)/8 -2*A061347(n+1)/27; g.f. -x*(12 +8*x +9*x^2 +7*x^3 +2*x^4 +7*x^5 +2*x^6 +3*x^7 -2*x^8 -5*x^9 +3*x^10) / ( (x^2+1) *(1+x+x^2) *(1+x)^2 *(x-1)^5 ). - R. J. Mathar, Mar 26 2011

A008748 Expansion of (1 + x^5) / ((1-x) * (1-x^2) * (1-x^3)) in powers of x.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 10, 13, 16, 19, 23, 27, 31, 36, 41, 46, 52, 58, 64, 71, 78, 85, 93, 101, 109, 118, 127, 136, 146, 156, 166, 177, 188, 199, 211, 223, 235, 248, 261, 274, 288, 302, 316, 331, 346, 361, 377, 393, 409, 426, 443, 460, 478, 496, 514, 533, 552, 571
Offset: 0

Views

Author

Keywords

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 6*x^5 + 8*x^6 + 10*x^7 + 13*x^8 + ...
		

Crossrefs

Programs

  • GAP
    List([0..60], n-> 1 + Int(n*(n+1)/6)); # G. C. Greubel, Aug 03 2019
  • Magma
    [1 + Floor(n*(n+1)/6): n in [0..60]]; // G. C. Greubel, Aug 03 2019
    
  • Maple
    A061347 := proc(n) op(1+(n mod 3),[-2,1,1]) ; end proc:
    A008748 := proc(n) 1/6*n^2+1/6*n+8/9+A061347(n+2)/9 ; end proc:
    seq(A008748(n),n=0..60) ; # R. J. Mathar, Mar 22 2011
  • Mathematica
    Table[Floor[((n*(n+1)+2)/2+3)/3],{n,0,60}] (* Vladimir Joseph Stephan Orlovsky, Apr 26 2010 *)
    CoefficientList[Series[(1+x^5)/((1-x)(1-x^2)(1-x^3)), {x,0,60}], x] (* Vincenzo Librandi, Jun 11 2013 *)
    LinearRecurrence[{2,-1,1,-2,1}, {1,1,2,3,4}, 60] (* Harvey P. Dale, Apr 08 2019 *)
  • PARI
    {a(n) = (n^2 + n)\6 + 1} /* Michael Somos, Sep 06 2013 */
    
  • Sage
    ((1 + x^5)/((1-x)*(1-x^2)*(1-x^3))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Aug 03 2019
    

Formula

a(n) = 1 + floor( n(n+1)/6 ). - Michael Somos, Jun 16 1999
a(n) = 1 + A001840(n-1). - Michael Somos, Jun 16 1999
a(n) = 1 + a(n-1) + a(n-3) - a(n-4) if n>4; a(n) = n if n=1..4. - Michael Somos, Jun 16 1999
a(-1-n) = a(n). - Michael Somos, Sep 06 2013

A027626 Denominator of n*(n+5)/((n+2)*(n+3)).

Original entry on oeis.org

1, 2, 10, 5, 7, 28, 12, 15, 55, 22, 26, 91, 35, 40, 136, 51, 57, 190, 70, 77, 253, 92, 100, 325, 117, 126, 406, 145, 155, 496, 176, 187, 595, 210, 222, 703, 247, 260, 820, 287, 301, 946, 330, 345, 1081, 376, 392, 1225, 425, 442, 1378, 477, 495, 1540, 532, 551
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [Denominator(n*(n+5)/((n+2)*(n+3))): n in [0..60]]; // Vincenzo Librandi, Mar 04 2014
    
  • Mathematica
    CoefficientList[Series[(1+2*x+10*x^2+2*x^3+x^4-2*x^5+x^8)/(1-x^3)^3, {x,0,50}], x] (* Vincenzo Librandi, Mar 04 2014 *)
  • PARI
    a(n) = numerator((n+2)*(n+3)/6); \\ Altug Alkan, Apr 18 2018
    
  • SageMath
    [numerator(binomial(n+3,2)/3) for n in (0..60)] # G. C. Greubel, Aug 04 2022

Formula

a(n) = GCD of n-th and (n+1)st tetrahedral numbers (A000292). - Ross La Haye, Sep 13 2003
G.f.: (1 +2*x +10*x^2 +2*x^3 +x^4 -2*x^5 +x^8)/(1-x^3)^3.
a(n) = A234041(n+1) = A107711(n+4,3) = C(n+3,2)*gcd(n+4,3)/3 for n >= 0. See the o.g.f. of A234041. - Wolfdieter Lang, Feb 26 2014
a(n) = numerator of (n+2)*(n+3)/6. - Altug Alkan, Apr 18 2018
Sum_{n>=0} 1/a(n) = 5 - 4*Pi/(3*sqrt(3)). - Amiram Eldar, Aug 11 2022
a(n) = (n + 2)*(n + 3)*(5 - 2*A061347(n+1))/18. - Stefano Spezia, Oct 16 2023
a(n) is quasi-polynomial in n: a(3*n) = (n+1)*(3*n+2)/2 = A000326(n+1); a(3*n+1) = (n+1)*(3*n+4)/2 = A005449(n+1); a(3*n+2) = (3*n+4)*(3*n+5)/2 = A060544(n+2). - Peter Bala, Nov 20 2024

Extensions

More terms from Vincenzo Librandi, Mar 04 2014

A047231 Numbers that are congruent to {0, 3, 4} mod 6.

Original entry on oeis.org

0, 3, 4, 6, 9, 10, 12, 15, 16, 18, 21, 22, 24, 27, 28, 30, 33, 34, 36, 39, 40, 42, 45, 46, 48, 51, 52, 54, 57, 58, 60, 63, 64, 66, 69, 70, 72, 75, 76, 78, 81, 82, 84, 87, 88, 90, 93, 94, 96, 99, 100, 102, 105, 106, 108, 111, 112, 114, 117, 118, 120, 123, 124
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A061347.

Programs

Formula

From R. J. Mathar, Aug 05 2010: (Start)
G.f.: x^2*(3+x+2*x^2) / ( (1+x+x^2)*(x-1)^2 ).
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = 2*n+2-(11+A061347(n+1))/3. (End)
From Wesley Ivan Hurt, Jun 13 2016: (Start)
a(n) = (6*n-5-cos(2*n*Pi/3)-sqrt(3)*sin(2*n*Pi/3))/3.
a(3k) = 6k-2, a(3k-1) = 6k-3, a(3k-2) = 6k-6. (End)
Sum_{n>=2} (-1)^n/a(n) = log(2)/3 + (1-2/sqrt(3))*Pi/12. - Amiram Eldar, Dec 14 2021

A117997 Sum_{d|n} a(d) = n for n = 3^m (m >= 0) and for other n the sum is zero; i.e., the Möbius transform of [1, 0, 3, 0, 0, 0, 0, 0, 9, 0,...].

Original entry on oeis.org

1, -1, 2, 0, -1, -2, -1, 0, 6, 1, -1, 0, -1, 1, -2, 0, -1, -6, -1, 0, -2, 1, -1, 0, 0, 1, 18, 0, -1, 2, -1, 0, -2, 1, 1, 0, -1, 1, -2, 0, -1, 2, -1, 0, -6, 1, -1, 0, 0, 0, -2, 0, -1, -18, 1, 0, -2, 1, -1, 0, -1, 1, -6, 0, 1, 2, -1, 0, -2, -1, -1, 0, -1, 1, 0, 0, 1, 2, -1, 0, 54, 1, -1, 0, 1, 1, -2, 0, -1, 6, 1, 0, -2, 1, 1, 0, -1, 0, -6, 0, -1, 2, -1, 0, 2
Offset: 1

Views

Author

Paul D. Hanna, Apr 08 2006

Keywords

Comments

From Petros Hadjicostas, Jul 26 2020: (Start)
For p prime >= 2, Petrogradsky (2003) defined the multiplicative functions 1_p and mu_p in the following way:
1_p(n) = 1 when gcd(n,p) = 1 and 1_p(n) = 1 - p when gcd(n,p) = p;
mu_p(n) = mu(n) when gcd(n,p) = 1 and mu_p(n) = mu(m)*(p^s - p^(s-1)) when n = m*p^s with gcd(m,p) = 1 and s >= 1.
We have 1_2(n) = A062157(n), 1_3(n) = A061347(n), A067856(n) = mu_2(n), and a(n) = mu_3(n) for n >= 1.
Some of the results by other contributors here and in A067856 can be generalized:
(i) Rogel's (1897) formula for A067856 becomes Sum_{d | n} 1_p(d) * mu_p(n/d) = 0 for n > 1. Thus, 1_p is the Dirichlet inverse of mu_p.
(ii) R. J. Mathar's Dirichlet g.f. for mu_p becomes 1/(zeta(s) * (1 - p^(1-s))). The Dirichlet g.f. for 1_p is zeta(s) * (1 - p^(1-s)).
(iii) Benoit Cloitre's formula becomes 1 = Sum_{k=1..n} mu_p(k)*g_p(n/k), where g_p(x) = floor(x) - p*floor(x/p) = floor(x) mod p.
(iv) Paul D. Hanna's formula becomes Sum_{n >= 1} (mu_p(n)/n)*log((1 - x^(n*p))/(1 - x^n)) = x.
(v) The definition in the name of the sequence a(n) generalizes to Sum_{d | n} mu_p(d) = n, if n = p^s for s >= 0, and = 0, otherwise. Thus, mu_p(n) = Sum_{p^k | n, k >= 0} mu(n/p^k)*p^k. That is, (mu_p(n): n >= 1) is the Möbius transform of the sequence (b_p(n): n >= 1), where b_p(n) = p^k, if n = p^k for k >= 0, and b_p(n) = 0, otherwise.
(vi) We have the Lambert series Sum_{n >= 1} mu_p(n)*x^n/(1 - x^n) = Sum_{k >= 0} p^k*x^(p^k) = x + p*x^p + p^2*x^(p^2) + ..., which generalizes one of the formulas by Peter Bala in A067856.
(vii) By differentiating both sides of (iv) w.r.t. x and multiplying both sides by x, we get Sum_{n >= 1} mu_p(n)*(x^n + 2*x^(2*n) + ... + (p-1)*x^(n*(p-1)))/(1 + x^n + x^(2*n) + ... + x^(n*(p-1))) = x, which generalizes another one of Peter Bala's formulas in A067856. It can be thought as a "generalized Lambert series".
(viii) Dividing both sides of (vi) by x and integrating w.r.t. x from 0 to y, we get -Sum_{n >= 1} (mu_p(n)/n)*log(1 - y^n) = Sum_{k >= 0} y^(p^k) = y + y^p + y^(p^2) + y^(p^3) + ...
(ix) Obviously, f(n) = Sum_{d | n} 1_p(n/d)*g(d) if and only if g(n) = Sum_{d | n} mu_p(n/d)*f(d). (End)

Crossrefs

Programs

  • PARI
    {a(n)=if(n==1,1,-n*polcoeff(x+sum(k=1,n-1,a(k)/k*subst(log(1+x+x^2+x*O(x^n)),x,x^k+x*O(x^n))),n))}
    
  • PARI
    A117997(n) = sumdiv(n,d,moebius(n/d)*if((3^valuation(d,3))==d,d,0)); \\ Antti Karttunen, Jan 15 2025

Formula

G.f.: x = Sum_{n >= 1} (a(n)/n)*log(1 + x^n + x^(2*n)).
1 = Sum_{k=1..n} a(k)*g(n/k), where g(x) = floor(x) - 3*floor(x/3). [Benoit Cloitre, Nov 11 2010]
From Petros Hadjicostas, Jul 26 2020: (Start)
a(n) = Sum_{3^k | n, k >= 0} mu(n/3^k)*3^k.
Dirichlet g.f.: 1/(zeta(s)*(1 - 3^(1-s))).
The sequence is the Dirichlet inverse of A061347.
Sum_{n >= 1} a(n)*x^n/(1 - x^n) = x + 3*x^3 + 9*x^9 + 27*x^27 + 81*x^81 + ...
Sum_{n >= 1} a(n)*(x^n + 2*x^(2*n))/(1 + x^n + x^(2*n)) = x.
-Sum_{n >= 1} (a(n)/n)*log(1 - x^n) = x + x^3 + x^9 + x^27 + x^81 + ... (End)

Extensions

Offset changed to 1 by Petros Hadjicostas, Jul 26 2020

A122552 a(0)=a(1)=a(2)=1, a(n) = a(n-1) + a(n-2) + 2*a(n-3) for n > 2.

Original entry on oeis.org

1, 1, 1, 4, 7, 13, 28, 55, 109, 220, 439, 877, 1756, 3511, 7021, 14044, 28087, 56173, 112348, 224695, 449389, 898780, 1797559, 3595117, 7190236, 14380471, 28760941, 57521884, 115043767, 230087533, 460175068, 920350135, 1840700269, 3681400540
Offset: 0

Views

Author

Philippe Deléham, Sep 20 2006

Keywords

Comments

Equals INVERT transform of (1, 0, 3, 0, 3, 0, 3, ...). - Gary W. Adamson, Apr 27 2009
No term is divisible by 3. - Vladimir Joseph Stephan Orlovsky, Mar 24 2011
For n > 3, a(n) is the number of quaternary sequences of length n-1 starting with q(0) = 0, in which all triples (q(i), q(i+1), q(i+2)) contain digits 0 and 3; cf. A294627. - Wojciech Florek, Jul 30 2018
For n > 0, a(n) is the number of ways to tile a strip of length n with squares, dominoes, and two colors of trominoes, with the restriction that the first tile cannot be a domino. - Greg Dresden and Bora Bursalı, Aug 31 2023

Examples

			It is shown in A294627 that there are 42 quaternary sequences (i.e., build from four digits 0, 1, 2, 3) and having both 0 and 3 in every (consecutive) triple. Only a(5=4+1) = 13 of them start with 0: 003x, 030x, 03y0, 0y30, 0330, where x = 0, 1, 2, 3 and y = 1, 2.
		

Crossrefs

Cf. A294627.

Programs

  • GAP
    a:=[1,1,1];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+2*a[n-3]; od; a; # Muniru A Asiru, Jul 30 2018
  • Maple
    seq(coeff(series((1-x^2)/(1-x-x^2-2*x^3), x,n+1),x,n),n=0..40); # Muniru A Asiru, Aug 02 2018
  • Mathematica
    LinearRecurrence[{1, 1, 2}, {1, 1, 1}, 40]
    CoefficientList[ Series[(x^2 - 1)/(2x^3 + x^2 + x - 1), {x, 0, 35}], x] (* Robert G. Wilson v, Jul 30 2018 *)
  • PARI
    Vec((1-x^2)/(1-x-x^2-2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Jan 17 2012
    
  • Sage
    from sage.combinat.sloane_functions import recur_gen3; it = recur_gen3(1,1,1,1,1,2); [next(it) for i in range(30)] # Zerinvary Lajos, Jun 25 2008
    

Formula

a(3*n) = 2*a(3*n-1)+2, a(3*n+1) = 2*a(3*n)-1, a(3*n+2) = 2*a(3*n+1)-1, a(0)=1.
G.f.: (1-x^2)/(1-x-x^2-2*x^3).
a(n) = ((-1)^n*A130815(n+2) + 3*2^n)/7. - R. J. Mathar, Nov 30 2008
From Paul Curtz, Oct 02 2009: (Start)
a(n) = A140295(n+2)/4.
a(n+1) - 2a(n) = period 3: repeat -1,-1,2 = -A061347.
a(n) - a(n-1) = 0,0,3,3,6,15,27,54,111,... = 3*A077947.
a(n) - a(n-2) = 0,3,6,9,21,42,81,....
a(n) - a(n-3) = 3,6,12,24,... = A007283 = 3*A000079.
a(3n) + a(3n+1) + a(3n+2) = 3,24,192,... = A103333(n+1) = A140295(3n) + A140295(3n+1) + A140295(3n+2).
See A078010, A139217, A139218. (End)

Extensions

Corrected by T. D. Noe, Nov 01 2006, Nov 07 2006
Typo in definition corrected by Paul Curtz, Oct 02 2009

A137717 Hankel transform of A106191.

Original entry on oeis.org

1, -4, 4, 8, -32, 32, 64, -256, 256, 512, -2048, 2048, 4096, -16384, 16384, 32768, -131072, 131072, 262144, -1048576, 1048576, 2097152, -8388608, 8388608, 16777216, -67108864, 67108864, 134217728, -536870912, 536870912
Offset: 0

Views

Author

Paul Barry, Feb 08 2008

Keywords

Comments

Hankel transform of A132310. [From Paul Barry, Apr 26 2009]

Crossrefs

Apart from signs, essentially the same as A096252.

Programs

  • Mathematica
    LinearRecurrence[{-2,-4},{1,-4},30] (* Harvey P. Dale, Oct 05 2017 *)

Formula

G.f.: (1-2x)/(1+2x+4x^2).
a(n)=Product{k=0..n, (3*cos(2*pi*(k-1)/3)/2-5/4-2*0^k)^(n-k)};
a(n) = 2^n*A061347(n+2) = -2a(n-1)-4a(n-2). - R. J. Mathar, Feb 21 2008

A192004 Alternating row sums of array A187360: minimal polynomial of 2*cos(Pi/n) evaluated for x=-1.

Original entry on oeis.org

1, -1, -2, -1, 1, -2, 1, -1, 1, 1, 1, -2, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -2, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Wolfdieter Lang, Jul 14 2011

Keywords

Comments

It seems that after a(1) = 1, -1's occur only at the positions 2^k (with k >= 1) and -2's only at positions 3*2^k (with k >= 0, A007283), with everything else being 1. It would be nice to know whether this is true. - Antti Karttunen, May 27 2017
From Wolfdieter Lang, May 29 2017: (Start)
The preceding conjecture can be checked by using for even n Theorem 1A, eq. (41), and for odd n Theorem 2A, eq. (50) of the W. Lang arXiv link given in A187360 putting x = -1.
One uses for the polynomials that (A127672) and q (A130777) appearing there the result that(n, -1) = A099837(n+3), i.e., = 2 if n == 0 (mod 3), = -1 if n == 1 or 2 (mod 3), and q(n, -1) = A061347(n+2), i.e., = 1 if n == 0 or 2 (mod 3) and = -2 if n == 1 (mod 3).
E.g., n = 2^k, k >= 1: C(2^k, -1) = that(2^(k-1), -1) = -1 because 2^(k-1) == 1 or 2 (mod 3).
n = 3*2^k, k >= 1: C(2^k*3) = that(2^(k-1)*3, -1) / that(2^(k-1), -1) = 2/(-1) = -2 because 2^(k-1)*3 == 0 (mod 3), and the previous congruence. C(3, -1) = -2 also, by theorem 2A, see the next example.
n = 3^k, k >= 1: C(3^k, -1) = q((3^k-1)/2, -1) / q((3^(k-1)-1)/2, -1) = (-2)/1 = -2 if k = 1, and = (-2)/(-2) = +1 if k >= 2. (End)

Crossrefs

Formula

a(n) = Sum_{m=0..A055034(n)} (-1)^m*A187360(n,m), n >= 1.
a(n) = C(n,x=-1), with the minimal (monic and integer) polynomial C(n,x) of 2*cos(Pi/n).

A008796 Molien series for 3-dimensional group [2,3]+ = 223; also for group H_{1,2} of order 384.

Original entry on oeis.org

1, 0, 2, 1, 4, 2, 7, 4, 10, 7, 14, 10, 19, 14, 24, 19, 30, 24, 37, 30, 44, 37, 52, 44, 61, 52, 70, 61, 80, 70, 91, 80, 102, 91, 114, 102, 127, 114, 140, 127, 154, 140, 169, 154, 184, 169, 200, 184, 217, 200, 234, 217, 252, 234, 271, 252, 290, 271, 310, 290, 331, 310, 352, 331, 374, 352, 397
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A008795.

Programs

  • GAP
    a:=[1,0,2,1,4,2,7];; for n in [8..70] do a[n]:=2*a[n-2]+a[n-3]-a[n-4]-2*a[n-5]+a[n-7]; od; a; # G. C. Greubel, Sep 11 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 70); Coefficients(R!( (1+x^4)/((1-x^2)^2*(1-x^3)) )); // G. C. Greubel, Sep 11 2019
    
  • Maple
    seq(coeff(series((1+x^4)/((1-x^2)^2*(1-x^3)), x, n+1), x, n), n = 0..70); # G. C. Greubel, Sep 11 2019
  • Mathematica
    LinearRecurrence[{0,2,1,-1,-2,0,1},{1,0,2,1,4,2,7},70] (* Harvey P. Dale, Apr 27 2014 *)
    CoefficientList[Series[(1+x^4)/((1-x^2)^2*(1-x^3)), {x, 0, 70}], x] (* Vincenzo Librandi, Apr 28 2014 *)
  • PARI
    a(n)=(9*(-1)^n*(2*n + 3) + 6*n^2 + 18*n + 24*!(n%3) + 21)/72 \\ Charles R Greathouse IV, Feb 10 2017
    
  • Sage
    def A008796_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1+x^4)/((1-x^2)^2*(1-x^3))).list()
    A008796_list(70) # G. C. Greubel, Sep 11 2019
    

Formula

G.f.: (1+x^4)/((1-x^2)^2*(1-x^3)).
a(n) = (1/72) * (9*(-1)^n*(2*n + 3) + 6*n^2 + 18*n + 29 - 8*A061347[n]). - Ralf Stephan, Apr 28 2014

Extensions

Definition clarified by N. J. A. Sloane, Feb 02 2018
More terms added by G. C. Greubel, Sep 11 2019
Previous Showing 31-40 of 64 results. Next