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

A016208 Expansion of 1/((1-x)*(1-3*x)*(1-4*x)).

Original entry on oeis.org

1, 8, 45, 220, 1001, 4368, 18565, 77540, 320001, 1309528, 5326685, 21572460, 87087001, 350739488, 1410132405, 5662052980, 22712782001, 91044838248, 364760483725, 1460785327100, 5848371485001, 23409176469808, 93683777468645, 374876324642820, 1499928942876001
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of A085277. - Paul Barry, Jun 25 2003
Number of walks of length 2n+5 between two nodes at distance 5 in the cycle graph C_12. - Herbert Kociemba, Jul 05 2004

Crossrefs

Programs

  • GAP
    a:=[1,8,45];; for n in [4..30] do a[n]:=8*a[n-1]-19*a[n-2]+12*a[n-3]; od; Print(a); # Muniru A Asiru, Apr 19 2019
  • Mathematica
    Table[(2^(2*n + 3) - 3^(n + 2) + 1)/6, {n, 40}] (* Vladimir Joseph Stephan Orlovsky, Jan 19 2011 *)
    CoefficientList[Series[1/((1-x)(1-3x)(1-4x)),{x,0,30}],x] (* or *) LinearRecurrence[ {8,-19,12},{1,8,45},30] (* Harvey P. Dale, Apr 09 2012 *)
  • PARI
    Vec(1/((1-x)*(1-3*x)*(1-4*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
    

Formula

a(n) = 16*4^n/3 + 1/6 - 9*3^n/2. - Paul Barry, Jun 25 2003
a(0) = 0, a(1) = 8, a(n) = 7*a(n-1) - 12*a(n-2) + 1. - Vincenzo Librandi, Feb 10 2011
a(0) = 1, a(1) = 8, a(2) = 45, a(n) = 8*a(n-1) - 19*a(n-2) + 12*a(n-3). - Harvey P. Dale, Apr 09 2012

A081134 Distance to nearest power of 3.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Mar 08 2003

Keywords

Examples

			a(7) = 2 since 9 is closest power of 3 to 7 and 9 - 7 = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> (h-> min(n-h, 3*h-n))(3^ilog[3](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 28 2021
  • Mathematica
    Flatten[Table[Join[Range[0,3^n],Range[3^n-1,1,-1]],{n,0,4}]] (* Harvey P. Dale, Dec 31 2013 *)
  • PARI
    a(n) = my (p=#digits(n,3)); return (min(n-3^(p-1), 3^p-n)) \\ Rémy Sigrist, Mar 24 2018
    
  • Python
    def A081134(n):
        kmin, kmax = 0,1
        while 3**kmax <= n:
            kmax *= 2
        while True:
            kmid = (kmax+kmin)//2
            if 3**kmid > n:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return min(n-3**kmin, 3*3**kmin-n) # Chai Wah Wu, Mar 31 2021

Formula

a(n) = min(n-3^floor(log(n)/log(3)), 3*3^floor(log(n)/log(3))-n).
From Peter Bala, Sep 30 2022: (Start)
a(n) = n - A006166(n); a(n) = 2*n - A003605(n).
a(1) = 0, a(2) = 1, a(3) = 0; thereafter, a(3*n) = 3*a(n), a(3*n+1) = 2*a(n) + a(n+1) and a(3*n+2) = a(n) + 2*a(n+1). (End)

A240733 a(n) = floor(6^n/(2+2*cos(Pi/9))^n).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 21, 32, 50, 78, 121, 187, 289, 448, 693, 1072, 1658, 2564, 3966, 6134, 9487, 14673, 22695, 35101, 54288, 83964, 129862, 200850, 310643, 480452, 743085, 1149282, 1777523, 2749182, 4251987, 6576279, 10171116, 15731022, 24330178, 37629950
Offset: 0

Views

Author

Kival Ngaokrajang, Apr 11 2014

Keywords

Comments

a(n) is the perimeter (rounded down) of a nonaflake after n iterations, let a(0) = 1. The total number of sides is 9*A000400(n). The total number of holes is A002452(n). 2*cos(Pi/9) = 1.87938524... = diagonal b of nonagon (see comments in A123609).

Crossrefs

Cf. A000400, A002452, A123609, A240523 (pentaflake), A240671 (heptaflake), A240572 (octaflake), A240733 (nonaflake), A240734 (decaflake), A240735 (dodecaflake).

Programs

  • Maple
    A240733:=n->floor(6^n/(2+2*cos(Pi/9))^n); seq(A240733(n), n=0..50); # Wesley Ivan Hurt, Apr 12 2014
  • Mathematica
    Table[Floor[6^n/(2 + 2*Cos[Pi/9])^n], {n, 0, 50}] (* Wesley Ivan Hurt, Apr 12 2014 *)
  • PARI
    {a(n)=floor(6^n/(2+2*cos(Pi/9))^n)}
           for (n=0, 100, print1(a(n), ", "))

A016209 Expansion of 1/((1-x)(1-3x)(1-5x)).

Original entry on oeis.org

1, 9, 58, 330, 1771, 9219, 47188, 239220, 1205941, 6059229, 30384718, 152189310, 761743711, 3811110039, 19062724648, 95335146600, 476740303081, 2383895225649, 11920057258978, 59602029687090
Offset: 0

Views

Author

Keywords

Comments

For a combinatorial interpretation following from a(n) = A039755(n+2,2) = h^{(3)}A039755.%20-%20_Wolfdieter%20Lang">n, the complete homogeneous symmetric function of degree n in the symbols {1, 3, 5} see A039755. - _Wolfdieter Lang, May 26 2017

Examples

			a(2) = h^{(3)}_2 = 1^2 + 3^2 + 5^2 + 1^1*(3^1 + 5^1) + 3^1*5^1 = 58. - _Wolfdieter Lang_, May 26 2017
		

Crossrefs

Programs

  • Magma
    [(5^(n+2)-2*3^(n+2)+1)/8: n in [0..20]]; // Vincenzo Librandi, Sep 17 2011
  • Maple
    A016209 := proc(n) (5^(n+2)-2*3^(n+2)+1)/8; end proc: # R. J. Mathar, Mar 22 2011
  • Mathematica
    Join[{a=1,b=9},Table[c=8*b-15*a+1;a=b;b=c,{n,60}]] (* Vladimir Joseph Stephan Orlovsky, Feb 07 2011 *)
    CoefficientList[Series[1/((1-x)(1-3x)(1-5x)),{x,0,30}],x] (* or *) LinearRecurrence[ {9,-23,15},{1,9,58},30] (* Harvey P. Dale, Feb 20 2020 *)
  • PARI
    a(n)=if(n<0,0,n+=2; (5^n-2*3^n+1)/8)
    

Formula

a(n) = A039755(n+2, 2).
a(n) = (5^(n+2) - 2*3^(n+2)+1)/8 = a(n-1) + A005059(n+1) = 8*a(n-1) - 15*a(n-2) + 1 = (A003463(n+2) - A003462(n+2))/2. - Henry Bottomley, Jun 06 2000
G.f.: 1/((1-x)(1-3*x)(1-5*x)). See the name.
E.g.f.: (25*exp(5*x) - 18*exp(3*x) + exp(x))/8, from the e.g.f. of the third column (k=2) of A039755. - Wolfdieter Lang, May 26 2017

A016218 Expansion of 1/((1-x)*(1-4*x)*(1-5*x)).

Original entry on oeis.org

1, 10, 71, 440, 2541, 14070, 75811, 400900, 2091881, 10808930, 55442751, 282806160, 1436400421, 7271480590, 36715316891, 185008240220, 930767824161, 4676745613050, 23475354034231, 117743274047080, 590182385739101, 2956775990710310, 14807336201610771
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

From Vincenzo Librandi, Feb 10 2011: (Start)
a(n) = a(n-1) + 5^(n+1) - 4^(n+1), n >= 1.
a(n) = 9*a(n-1) - 20*a(n-2) + 1, n >= 2. (End)
a(n) = 1/12 - 4^(n+2)/3 + 5^(n+2)/4. - R. J. Mathar, Mar 15 2011

A016256 Expansion of 1/((1-x)*(1-8*x)*(1-9*x)).

Original entry on oeis.org

1, 18, 235, 2700, 28981, 298278, 2984095, 29253600, 282456361, 2695498938, 25486623955, 239196683700, 2231306698141, 20710052641998, 191416812647815, 1762962024789000, 16188343910770321, 148268580698287458, 1355005110295423675, 12359749064745505500
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    a:=n->sum(9^(n-j)-8^(n-j),j=0..n): seq(a(n), n=1..19); # Zerinvary Lajos, Jan 04 2007
  • Mathematica
    Table[(-8^(n + 2) + 7*9^(n + 1) + 1)/56, {n, 40}] (* and *) CoefficientList[Series[1/((1 - z) (1 - 8*z) (1 - 9*z)), {z, 0, 40}], z] (* Vladimir Joseph Stephan Orlovsky, Jul 21 2011 *)
  • PARI
    Vec(1/((1-x)*(1-8*x)*(1-9*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012

Formula

G.f.: 1/((1-x)*(1-8*x)*(1-9*x)).
a(n) = 17*a(n-1) - 72*a(n-2) + 1. - Vincenzo Librandi, Feb 10 2011
a(n) = 9^(n+2)/8 - 8^(n+2)/7 + 1/56. - R. J. Mathar, Mar 14 2011
a(n) = 18*a(n-1) - 89*a(n-2) + 72*a(n-3). - Wesley Ivan Hurt, Apr 20 2023

A043283 Maximal run length in base-9 representation of n.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A007095.
Cf. A043276-A043290 for base-2 to base-16 analogs.
Cf. A002452 (gives the positions of records, the first occurrence of each n).
Cf. also A044940.

Programs

  • Mathematica
    A043283[n_]:=Max[Map[Length,Split[IntegerDigits[n,9]]]];Array[A043283,100] (* Paolo Xausa, Sep 27 2023 *)
  • PARI
    A043283(n, b=9)={my(m, c=1); while(n>0, n%b==(n\=b)%b && c++ && next; m=max(m, c); c=1); m} \\ M. F. Hasler, Jul 23 2013

A160562 Triangle of scaled central factorial numbers, T(n,k) = A008958(n,n-k).

Original entry on oeis.org

1, 1, 1, 1, 10, 1, 1, 91, 35, 1, 1, 820, 966, 84, 1, 1, 7381, 24970, 5082, 165, 1, 1, 66430, 631631, 273988, 18447, 286, 1, 1, 597871, 15857205, 14057043, 1768195, 53053, 455, 1, 1, 5380840, 397027996, 704652312, 157280838, 8187608, 129948, 680, 1
Offset: 0

Views

Author

Jonathan Vos Post, May 19 2009

Keywords

Comments

This is table 4 on page 12 of Gelineau and Zeng, read downwards by columns.
Reversing rows gives A008958.
Apparently the table can also be obtained by deleting each second row and column of A136630.

Examples

			Triangle starts:
  1;
  1,     1;
  1,    10,      1;
  1,    91,     35,      1;
  1,   820,    966,     84,     1;
  1,  7381,  24970,   5082,   165,   1;
  1, 66430, 631631, 273988, 18447, 286, 1;
  ...
		

Crossrefs

Cf. A002452 (column k=1), A002453 (column k=2), A000447 (right column k=n-1), A185375 (right column k=n-2).

Programs

  • Maple
    A160562 := proc(n,k) npr := 2*n+1 ; kpr := 2*k+1 ; sinh(t*sinh(x)) ; npr!*coeftayl(%,x=0,npr) ; coeftayl(%,t=0,kpr) ; end: seq(seq(A160562(n,k),k=0..n),n=0..15) ; # R. J. Mathar, Sep 09 2009
  • Mathematica
    T[n_, k_] := Sum[(-1)^(k - m)*(2m + 1)^(2n + 1)*Binomial[2k, k + m]/(k + m + 1), {m, 0, k}]/(4^k*(2k)!);
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 22 2017 *)

Formula

T(n,k) = (1/((2*k)!*4^k)) * Sum_{m=0..k} (-1)^(k-m)*A039599(k,m)*(2*m+1)^(2*n). - Werner Schulte, Nov 01 2015
T(n,k) = ((-1)^(n-k)*(2*n+1)!/(2*k+1)!) * [x^(2*n+1)]sin(x)^(2*k+1) = ((2*n+1)!/(2*k+1)!) * [x^(2*n+1)]sinh(x)^(2*k+1). Note that sin(x)^(2*k+1) = (Sum_{i=0..k} (-1)^i*binomial(2*k+1,k-i)*sin((2*i+1)*x))/(2^(2*k)). - Jianing Song, Oct 29 2023

Extensions

More terms from R. J. Mathar, Sep 09 2009

A166984 a(n) = 20*a(n-1) - 64*a(n-2) for n > 1; a(0) = 1, a(1) = 20.

Original entry on oeis.org

1, 20, 336, 5440, 87296, 1397760, 22368256, 357908480, 5726601216, 91625881600, 1466015154176, 23456246661120, 375299963355136, 6004799480791040, 96076791961092096, 1537228672451215360, 24595658763514413056, 393530540233410478080, 6296488643803287126016
Offset: 0

Views

Author

Klaus Brockhaus, Oct 26 2009

Keywords

Comments

Partial sums of A166965.
First differences of A006105. - Klaus Purath, Oct 15 2020

Crossrefs

Programs

  • Magma
    [n le 2 select 19*n-18 else 20*Self(n-1)-64*Self(n-2): n in [1..17] ];
    
  • Mathematica
    LinearRecurrence[{20,-64},{1,20},30] (* Harvey P. Dale, Jul 04 2012 *)
  • PARI
    a(n) = (4*16^n - 4^n)/3 \\ Charles R Greathouse IV, Jun 21 2022
    
  • SageMath
    A166984=BinaryRecurrenceSequence(20,-64,1,20)
    [A166984(n) for n in range(31)] # G. C. Greubel, Oct 02 2024

Formula

a(n) = (4*16^n - 4^n)/3.
G.f.: 1/((1-4*x)*(1-16*x)).
Limit_{n -> oo} a(n)/a(n-1) = 16.
a(n) = A115490(n+1)/3.
Sum_{n>=0} a(n) x^(2*n+4)/(2*n+4)! = ( sinh(x) )^4/4!. - Robert A. Russell, Apr 03 2013
From Klaus Purath, Oct 15 2020: (Start)
a(n) = A002450(n+1)*(A002450(n+2) - A002450(n))/5.
a(n) = (A083584(n+1)^2 - A083584(n)^2)/80. (End)
a(n) = (A079598(n) - A000302(n))/24. - César Aguilera, Jun 21 2022
a(n) = 16*a(n-1) + 4^n with a(0) = 1. - Nadia Lafreniere, Aug 08 2022
E.g.f.: (4/3)*exp(10*x)*sinh(6*x + log(2)). - G. C. Greubel, Oct 02 2024

A191681 a(n) = (9^n - 1)/2.

Original entry on oeis.org

0, 4, 40, 364, 3280, 29524, 265720, 2391484, 21523360, 193710244, 1743392200, 15690529804, 141214768240, 1270932914164, 11438396227480, 102945566047324, 926510094425920, 8338590849833284, 75047317648499560, 675425858836496044
Offset: 0

Views

Author

Adi Dani, Jun 11 2011

Keywords

Comments

Number of compositions of odd numbers into n parts < 9.
These are also the junctions of the Collatz trajectories of 2^(2k-1)-1 and 2^2k-1. - David Rabahy, Nov 01 2017
a(n) gives the number of turns in the n-th iteration of the Peano curve given by plotting (A163528, A163529) or by (Siromoney 1982). - Jason V. Morgan, Oct 08 2021

Examples

			a(2)=40: there are 40 compositions of odd numbers into 2 parts < 9:
1:  (0,1),(1,0);
3:  (0,3),(3,0),(1,2),(2,1);
5:  (0,5),(5,0),(1,4),(4,1),(2,3),(3,2);
7:  (0,7),(7,0),(1,6),(6,1),(2,5),(5,2),(3,4),(4,3);
9:  (1,8),(8,1),(2,7),(7,2),(3,6),(6,3),(4,5),(5,4);
11: (3,8),(8,3),(4,7),(7,4),(5,6),(6,5);
13: (5,8),(8,5),(6,7),(7,6);
15: (7,8),(8,7).
		

Crossrefs

Programs

Formula

a(0)=0, a(1)=4, a(n) = 10*a(n-1) - 9*a(n-2). - Harvey P. Dale, Jun 19 2011
G.f.: 4*x / ((x-1)*(9*x-1)). - Colin Barker, May 16 2013
a(n) = 2 * A125857(n+1) = 4 * A002452(n). - Bernard Schott, Oct 29 2021

Extensions

Example corrected by L. Edson Jeffery, Feb 13 2015
Previous Showing 31-40 of 91 results. Next