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

A047878 a(n) is the least number of knight's moves from corner (0,0) to n-th diagonal of unbounded chessboard.

Original entry on oeis.org

0, 3, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 9, 8, 9, 10, 9, 10, 11, 10, 11, 12, 11, 12, 13, 12, 13, 14, 13, 14, 15, 14, 15, 16, 15, 16, 17, 16, 17, 18, 17, 18, 19, 18, 19, 20, 19, 20, 21, 20, 21, 22, 21, 22, 23, 22, 23, 24, 23, 24, 25
Offset: 0

Views

Author

Keywords

Comments

Apart from initial terms, same as A008611. - Anton Chupin, Oct 24 2009

Crossrefs

Programs

  • Magma
    I:=[2, 1, 2, 3]; [0,3] cat [n le 4 select I[n] else Self(n-1) +Self(n-3) -Self(n-4): n in [1..81]]; // G. C. Greubel, Oct 22 2022
    
  • Mathematica
    LinearRecurrence[{1,0,1,-1},{0,3,2,1,2,3},80] (* Harvey P. Dale, Sep 01 2018 *)
    Join[{0,3}, Table[(n+2 -2*ChebyshevU[2*n, 1/2])/3, {n,2,75}]] (* G. C. Greubel, Oct 22 2022 *)
  • PARI
    concat(0, Vec(x*(2*x^4-2*x^3-x^2-x+3)/((x-1)^2*(x^2+x+1)) + O(x^100))) \\ Colin Barker, May 04 2014
    
  • SageMath
    (Sage) [0,3]+[(n+2 - 2*chebyshev_U(2*n, 1/2))/3 for n in (2..75)] # G. C. Greubel, Oct 22 2022

Formula

a(n) = Min_{i=0..n} A049604(i,n-i).
a(3n) = n, a(3n+1) = n+1, a(3n+2) = n+2 for n >= 1.
From Colin Barker, May 04 2014: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>5.
G.f.: x*(3-x-x^2-2*x^3+2*x^4) / ((1-x)^2*(1+x+x^2)). (End)
From Guenther Schrack, Nov 19 2020: (Start)
a(n) = a(n-3) + 1, for n > 4 with a(0) = 0, a(1) = 3, a(2) = 2, a(3) = 1, a(4) = 2;
a(n) = (3*n + 6 - 2*(w^(2*n)*(2 + w) + w^n*(1 - w)))/9, for n > 1 with a(0) = 0, a(1) = 3, where w = (-1 + sqrt(-3))/2, a primitive third root of unity;
a(n) = (n + 2 - 2*A057078(n))/3 for n > 1;
a(n) = A194960(n-2) for n > 2;
a(n) = (2*n + 2 - A330396(n))/3 for n > 1. (End)

A104538 Expansion of g.f. (1 + 2*x) / (1 + 2*x + 4*x^2).

Original entry on oeis.org

1, 0, -4, 8, 0, -32, 64, 0, -256, 512, 0, -2048, 4096, 0, -16384, 32768, 0, -131072, 262144, 0, -1048576, 2097152, 0, -8388608, 16777216, 0, -67108864, 134217728, 0, -536870912, 1073741824, 0, -4294967296, 8589934592, 0, -34359738368, 68719476736, 0, -274877906944, 549755813888, 0
Offset: 0

Views

Author

Paul Barry, Mar 13 2005

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+2x)/(1+2x+4x^2),{x,0,50}],x] (* or *) LinearRecurrence[ {-2,-4},{1,0},50] (* Harvey P. Dale, Sep 18 2022 *)
  • PARI
    a(n) = 2^n*polchebyshev(2*n, 2, 1/2); \\ Michel Marcus, Aug 05 2018
    
  • PARI
    Vec((1 + 2*x) / (1 + 2*x + 4*x^2) + O(x^40)) \\ Colin Barker, Aug 08 2018

Formula

a(n) = 2^n*A057078(n), where A057078(n) = U(2n, 1/2), U(n, x) Chebyshev polynomial of second kind.
a(n) = b(n) + b(n+1) where b(n) = 0, 1, -1, -3, 11, -11, -21, 85, -85, ... is the inverse binomial transform of A287479(n). - Paul Curtz, Aug 05 2018
a(n) = (((-1+i*sqrt(3))^n*(-i+sqrt(3)) + (-1-i*sqrt(3))^n*(i+sqrt(3)))) / (2*sqrt(3)) where i=sqrt(-1). - Colin Barker, Aug 08 2018
E.g.f.: exp(-x)*(sqrt(3)*cos(sqrt(3)*x) + sin(sqrt(3)*x))/sqrt(3). - Stefano Spezia, Jul 15 2024

A131476 a(n) = floor(n^3/3).

Original entry on oeis.org

0, 0, 2, 9, 21, 41, 72, 114, 170, 243, 333, 443, 576, 732, 914, 1125, 1365, 1637, 1944, 2286, 2666, 3087, 3549, 4055, 4608, 5208, 5858, 6561, 7317, 8129, 9000, 9930, 10922, 11979, 13101, 14291, 15552, 16884, 18290, 19773, 21333, 22973
Offset: 0

Views

Author

Mohammad K. Azarian, Jul 27 2007

Keywords

Crossrefs

Programs

Formula

From R. J. Mathar, Dec 19 2008: (Start)
G.f.: x^2*(2 + 3*x + x^3)/((1 - x)^4*(1 + x + x^2)).
a(n) = (A057078(n) - A024001(n))/3. (End)
a(n) = (3*n^3 + 3*cos(2*Pi*n/3) + sqrt(3)*sin(2*Pi*n/3) - 3)/9. - Vladimir Reshetnikov, Oct 09 2016
a(n) = (n - 1)*n*(n + 1)/3 + floor(n/3). - Bruno Berselli, Jun 08 2017

A131737 Essentially even numbers followed by duplicated odd numbers.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 37, 37, 38, 39, 39, 40, 41, 41, 42, 43, 43, 44, 45
Offset: 0

Views

Author

Paul Curtz, Sep 19 2007

Keywords

Examples

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

Crossrefs

Cf. A004396.

Programs

  • Maple
    A131737 := proc(n): (1/9)*add(5*(k mod 3)+2*((k+1) mod 3)-((k+2) mod 3),k=0..n)-1+(binomial(2*n,n) mod 2)+(binomial((n+1)^2,n+3) mod 2) end: seq( A131737(n),n=0..74); # Johannes W. Meijer, Jun 27 2011
  • Mathematica
    Join[{0, 1}, LinearRecurrence[{1, 0, 1, -1}, {1, 1, 2, 3}, 68]] (* Georg Fischer, Feb 27 2019 *)
    Insert[Flatten[Table[If[EvenQ[n],n,{n,n}],{n,0,70}]],1,2] (* Harvey P. Dale, Sep 04 2020 *)
  • PARI
    {a(n) = (n==0) + (n==1) + (n\3)*2 + (n%3) - 1}; /* Michael Somos, Jan 11 2011 */

Formula

a(0)=0. a(1)=a(2)=1. a(3*n)=A005408(n-1). a(3*n+1)=a(3*n)+1. a(3*n+2)=a(3*n)+2, n>0.
O.g.f.: x*(1+x^4)/((1-x)^2*(x^2+x+1)). a(n)=(2*n-2-A057078(n))/3, n>1. - R. J. Mathar, Jul 16 2008
Euler transform of length 8 sequence [ 1, 0, 1, 1, 0, 0, 0, -1]. - Michael Somos, Jan 11 2011
0 = a(n) - a(n+1) - a(n+3) + a(n+4) if n>1. - Michael Somos, Nov 11 2015
a(n) = floor((2*n-1)/3) for n > 1. - Werner Schulte, Feb 27 2019

Extensions

Edited by R. J. Mathar, Jul 16 2008

A182895 Number of (1,0)-steps at level 0 in all weighted lattice paths in L_n.

Original entry on oeis.org

0, 1, 3, 7, 19, 50, 130, 341, 893, 2337, 6119, 16020, 41940, 109801, 287463, 752587, 1970299, 5158310, 13504630, 35355581, 92562113, 242330757, 634430159, 1660959720, 4348449000, 11384387281, 29804712843, 78029751247, 204284540899
Offset: 0

Views

Author

Emeric Deutsch, Dec 12 2010

Keywords

Comments

The members of L_n are paths of weight n that start at (0,0) and end on the horizontal axis and whose steps are of the following four kinds: a (1,0)-step with weight 1, a (1,0)-step with weight 2, a (1,1)-step with weight 2, and a (1,-1)-step with weight 1. The weight of a path is the sum of the weights of its steps.

Examples

			a(3) = 7. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and u=(1,1), d=(1,-1), the five paths of weight 3 are ud, du, hH, Hh, and hhh; they contain 0+0+2+2+3=7 (1,0)-steps at level 0.
		

Crossrefs

Cf. A182893.

Programs

  • Maple
    G:=z*(1+z)/(1+z+z^2)/(1-3*z+z^2): Gser:=series(G,z=0,32): seq(coeff(Gser,z,n),n=0..28);
  • Mathematica
    LinearRecurrence[{2,1,2,-1},{0,1,3,7},30] (* Harvey P. Dale, Jan 05 2022 *)

Formula

a(n) = Sum_{k>=0} k*A182893(n,k).
G.f.: z(1+z)/[(1+z+z^2)(1-3z+z^2)].
a(n) = (A000032(2n+1) - A010892(2n))/4. - John M. Campbell, Dec 30 2016
4*a(n) = -A057078(n) +A002878(n). - R. J. Mathar, Jul 26 2022

A226328 a(0)=1, a(1)=-2; a(n+2) = a(n+1) + a(n) + (period 3: repeat 3, 1, -1).

Original entry on oeis.org

1, -2, 2, 1, 2, 6, 9, 14, 26, 41, 66, 110, 177, 286, 466, 753, 1218, 1974, 3193, 5166, 8362, 13529, 21890, 35422, 57313, 92734, 150050, 242785, 392834, 635622, 1028457, 1664078, 2692538, 4356617, 7049154, 11405774, 18454929, 29860702, 48315634, 78176337
Offset: 0

Views

Author

Paul Curtz, Jun 04 2013

Keywords

Comments

a(n+1)/a(n) -> the golden ratio, A001622.
a(3*n)+a(3*n+1)+a(3*n+2) = 1,9,49,217,929,... = b(n), and b(n+1)-b(n) = 8*A015448(n+1).

Examples

			a(2)=-2+1+3=2, a(3)=2-2+1=1, a(4)=1+2-1=2, a(5)=2+1+3=6.
a(0)=F(-3)+F(n)-1=2+0-1=1,  a(1)=-1+1-2=-2, a(2)=1+1-0=2.
a(3)=1+4*0=1, a(4)=-2+4*1=2, a(5)=2+4*1=6, a(6)=1+4*2=9.
		

Crossrefs

Programs

  • Magma
    I:=[1,-2,2,1,2]; [n le 5 select I[n] else Self(n-1)+Self(n-2)+Self(n-3)-Self(n-4)-Self(n-5): n in [1..40]]; // Vincenzo Librandi, Jun 05 2013
  • Mathematica
    CoefficientList[Series[(2 x^4 + 3 x^2 - 3 x + 1) / (x^5 + x^4 - x^3 - x^2 - x + 1), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 05 2013 *)
    LinearRecurrence[{1, 1, 1, -1, -1}, {1, -2, 2, 1, 2}, 40] (* Hugo Pfoertner, Feb 12 2024 *)
  • PARI
    Vec((2*x^4+3*x^2-3*x+1)/(x^5+x^4-x^3-x^2-x+1)+O(x^99)) \\ Charles R Greathouse IV, Jun 04 2013
    

Formula

a(n) = F(n-3) + F(n) - A010872(n+1).
a(n+3) = a(n) + 4*F(n).
G.f.: (2*x^4+3*x^2-3*x+1)/( (x-1)*(x^2+x-1)*(1+x+x^2) ). [Charles R Greathouse IV, Jun 04 2013]
a(n) = A057078(n+1) +2*A212804(n) -1. - R. J. Mathar, Jun 26 2013

Extensions

a(23) corrected by Charles R Greathouse IV, Jun 04 2013
More terms from Bruno Berselli, Jun 04 2013

A350668 Numbers congruent to 2, 4, and 6 modulo 9: positions of 2 in A159955.

Original entry on oeis.org

2, 4, 6, 11, 13, 15, 20, 22, 24, 29, 31, 33, 38, 40, 42, 47, 49, 51, 56, 58, 60, 65, 67, 69, 74, 76, 78, 83, 85, 87, 92, 94, 96, 101, 103, 105, 110, 112, 114, 119, 121, 123, 128, 130, 132, 137, 139, 141, 146, 148
Offset: 0

Views

Author

Wolfdieter Lang, Jan 29 2022

Keywords

Comments

This sequence, together with A350666 and A350667, gives a 3-set partition of the nonnegative integers.
This sequence {a(n)}_{n>=0} gives the indices of the row sequences of array A = A347834, that are modulo 6 periodic with period length 3, namely
{A347834(a(n), m) mod 6}_{m >= 0} = {repeat(3, 1, 5)}.

Examples

			Rows of array {A347834(a(n), m)}_{m >= 0}, with modulo 6 congruence:
n = 0: row 2: {3, 13, 53, 213, 853, 3413, 13653, ...} mod 6 = {repeat(3, 1, 5)},
n = 1: row 4: {9, 37, 149, 597, 2389, 9557, ...} (mod 6) = {repeat(3, 1, 5)},
...
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 150], MemberQ[{2, 4, 6}, Mod[#, 9]] &] (* Amiram Eldar, Jan 29 2022 *)
    LinearRecurrence[{1,0,1,-1},{2,4,6,11},80] (* Harvey P. Dale, Jul 12 2024 *)

Formula

A159955(a(n)) = 2.
Trisection: a(3*k) = 2 + 9*k, a(3*k + 1) = 4 + 9*k, and a(3*k + 3) = 6 + 9*k, for k >= 0.
G.f.: (2 + 2*x + 2*x^2 + 3*x^3)/((1 - x)*(1 - x^3)).
a(n) = 1 + 3*n + cos(2*n*Pi/3) + sin(2*n*Pi/3)/sqrt(3). - Stefano Spezia, Jan 30 2022
a(n) = 1 + 3*n + S(2*n, 1) = 1+3*n+A057078(n), with the Chebyshev S polynomials from A049310, using the partial fraction decomposition of the g.f., or the previous formula.

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

Original entry on oeis.org

1, -2, 4, -4, 6, -4, 9, -4, 16, 0, 28, 16, 57, 58, 132, 172, 322, 476, 817, 1272, 2112, 3360, 5496, 8832, 14353, 23158, 37540, 60668, 98238, 158876, 257145, 415988, 673168, 1089120, 1762324, 2851408, 4613769, 7465138, 12078948, 19544044, 31623034, 51167036
Offset: 0

Views

Author

Seiichi Manyama, Aug 13 2024

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/((1+x)^2(1-x^2(1+x)^2)),{x,0,50}],x] (* or *) LinearRecurrence[{-2,0,4,6,4,1},{1,-2,4,-4,6,-4},50] (* Harvey P. Dale, Dec 11 2024 *)
  • PARI
    my(N=50, x='x+O('x^N)); Vec(1/((1+x)^2*(1-x^2*(1+x)^2)))
    
  • PARI
    a(n) = sum(k=0, n\2, binomial(2*k-2, n-2*k));

Formula

a(n) = -2*a(n-1) + 4*a(n-3) + 6*a(n-4) + 4*a(n-5) + a(n-6).
a(n) = Sum_{k=0..floor(n/2)} binomial(2*k-2,n-2*k).
2*a(n) = 2*(-1)^n*(n+1) +A212804(n)-A057078(n). - R. J. Mathar, Aug 14 2024

A008612 Molien series of 2-dimensional representation of SL(2,3).

Original entry on oeis.org

1, 0, 0, 1, 1, 0, 2, 1, 1, 2, 2, 1, 3, 2, 2, 3, 3, 2, 4, 3, 3, 4, 4, 3, 5, 4, 4, 5, 5, 4, 6, 5, 5, 6, 6, 5, 7, 6, 6, 7, 7, 6, 8, 7, 7, 8, 8, 7, 9, 8, 8, 9, 9, 8, 10, 9, 9, 10, 10, 9, 11, 10, 10, 11, 11, 10, 12, 11, 11, 12, 12, 11, 13, 12, 12, 13, 13, 12, 14
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 2 ).

References

  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 100.

Programs

  • Magma
    [2*Floor(n/3)-n/2+(3+(-1)^n)/4: n in [0..100]]; // Vincenzo Librandi, Oct 23 2014
    
  • Maple
    (1+x^12)/(1-x^6)/(1-x^8);seq(coeff(series(%,x,2*n+1),x,2*n), n=0..100);
  • Mathematica
    CoefficientList[Series[(1-x^2+x^4)/((1-x)^2*(1+x)*(1+x+x^2)), {x, 0, 100}], x] (* Vincenzo Librandi, Oct 23 2014 *)
  • PARI
    Vec((1-x^2+x^4)/((1-x)^2*(1+x)*(1+x+x^2)) + O(x^100)) \\ Colin Barker, Jan 07 2014
    
  • Sage
    def A008612_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+x^6)/((1-x^3)*(1-x^4)) ).list()
    A008612_list(100) # G. C. Greubel, Feb 06 2020

Formula

From Colin Barker, Jan 07 2014: (Start)
a(n) = a(n-2) + a(n-3) - a(n-5).
G.f.: (1-x^2+x^4) / ((1-x)^2*(1+x)*(1+x+x^2)). (End)
a(n) ~ n/6 (first difference is 6-periodic). - Ralf Stephan, Apr 29 2014
a(n) = 2*floor(n/3) -n/2 +(3+(-1)^n)/4. - Tani Akinari, Oct 23 2014
12*a(n) = 1 +2*n +3*(-1)^n +8*A057078(n). - R. J. Mathar, Jan 14 2021

A008647 Expansion of g.f.: (1+x^9)/((1-x^4)*(1-x^6)).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 2, 4, 3, 3, 3, 4, 3, 4, 3, 4, 4, 4, 3, 5, 4, 4, 4, 5, 4, 5, 4, 5, 5, 5, 4, 6, 5, 5, 5, 6, 5, 6, 5, 6, 6, 6, 5, 7, 6, 6, 6, 7, 6
Offset: 0

Views

Author

Keywords

Comments

Molien series of binary octahedral group of order 48. Also Molien series for W_1 - W_3 of shadow of singly-even binary self-dual code.

References

  • T. A. Springer, Invariant Theory, Lecture Notes in Math., Vol. 585, Springer, p. 97.

Programs

  • GAP
    a:=[1,0,0,0,1,0,1];; for n in [8..80] do a[n]:=a[n-3]+a[n-4]-a[n-7]; od; a; # G. C. Greubel, Sep 06 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 80); Coefficients(R!( (1+x^9)/((1-x^4)*(1-x^6)) )); // G. C. Greubel, Sep 06 2019
    
  • Maple
    g:= proc(n) local m, r; m:= iquo(n, 12, 'r'); irem(r+1,2) *(m+1) -`if`(r=2, 1, 0) end: a:= n-> g(n) +`if`(n>8, g(n-9), 0); seq(a(n), n=0..100); # Alois P. Heinz, Oct 06 2008
  • Mathematica
    CoefficientList[Series[(1+x^9)/((1-x^4)*(1-x^6)),{x,0,80}],x] (* or *) LinearRecurrence[{0,0,1,1,0,0,-1}, {1,0,0,0,1,0,1}, 80] (* Harvey P. Dale, Oct 10 2011 *)
  • PARI
    a(n)=(9*(-1)^n+2*(n+7)+6*(-1)^(n\2))\24 \\ Charles R Greathouse IV, Feb 10 2017
    
  • Sage
    def A008647_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1+x^9)/((1-x^4)*(1-x^6))).list()
    A008647_list(80) # G. C. Greubel, Sep 06 2019
    

Formula

G.f.: (1 - x^3 + x^6) / ( (1+x)*(1+x+x^2)*(1+x^2)*(1-x)^2 ).
G.f.: (1+x^6+x^9+x^15)/((1-x^4)*(1-x^12)).
It appears that the first differences have period 12. Hence in blocks of 12, the sequence is {1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0}+k for k=0,1,2,... - T. D. Noe, May 23 2008
a(n) = (6*A057077(n) +8*A057078(n) +1 +2*n +9*(-1)^n)/24. - R. J. Mathar, Jun 28 2009
a(n) = a(n-3) + a(n-4) - a(n-7), a(0)=1, a(1)=0, a(2)=0, a(3)=0, a(4)=1, a(5)=0, a(6)=1. - Harvey P. Dale, Oct 10 2011
a(n) = floor((9*(-1)^n+2*(n+7)+6*(-1)^floor(n/2))/24). - Tani Akinari, Jun 17 2013
a(n) = floor(n/2) + floor(n/3) + floor(n/4) - n + 1. - Ridouane Oudra, Mar 21 2021
Previous Showing 31-40 of 50 results. Next