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 11-20 of 23 results. Next

A026643 a(n) = A026637(n, floor(n/2)).

Original entry on oeis.org

1, 1, 2, 4, 8, 13, 26, 46, 92, 166, 332, 610, 1220, 2269, 4538, 8518, 17036, 32206, 64412, 122464, 244928, 467842, 935684, 1794196, 3588392, 6903352, 13806704, 26635774, 53271548, 103020253, 206040506, 399300166, 798600332
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [n le 4 select 2^(n-1) else (4*Self(n-1) +(7*n-9)*Self(n-2) +2*Self(n-3) +4*(n-1)*Self(n-4))/(2*(n+1)): n in [1..40]]; // G. C. Greubel, Jul 01 2024
    
  • Mathematica
    T[n_, k_]:= T[n, k] = If[k==0 || k==n, 1, If[k==1 || k==n-1, Floor[(3*n -1)/2], T[n-1,k-1] + T[n-1,k] ]]; (* A026637 *)
    A026643[n_]:= T[n, Floor[n/2]];
    Table[A026643[n], {n,0,40}] (* G. C. Greubel, Jul 01 2024 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A026643
        if n<5: return (1,1,2,4,8)[n]
        else: return (4*a(n-1) +(7*n-9)*a(n-2) +2*a(n-3) +4*(n-1)*a(n-4))/(2*(n+1))
    [a(n) for n in range(41)] # G. C. Greubel, Jul 01 2024

Formula

a(n) = (4*a(n-1) + (7*n-9)*a(n-2) + 2*a(n-3) + 4*(n-1)*a(n-4))/(2*(n+1)) with a(0) = a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 8. - G. C. Greubel, Jul 01 2024

A026646 a(n) = Sum_{i=0..n} Sum_{j=0..n} A026637(i,j).

Original entry on oeis.org

1, 3, 7, 17, 37, 79, 163, 333, 673, 1355, 2719, 5449, 10909, 21831, 43675, 87365, 174745, 349507, 699031, 1398081, 2796181, 5592383, 11184787, 22369597, 44739217, 89478459, 178956943, 357913913, 715827853, 1431655735
Offset: 0

Views

Author

Keywords

Comments

a(n) indexes the corner blocks on the Jacobsthal spiral built from blocks of unit area (using J(1) and J(2) as the sides of the first block). - Paul Barry, Mar 06 2008
Partial sums of A026644, which are the row sums of A026637. - Paul Barry, Mar 06 2008

Crossrefs

Programs

  • Magma
    [(2^(n+4) -(6*n+9+(-1)^n))/6: n in [0..40]]; // G. C. Greubel, Jul 01 2024
    
  • Mathematica
    CoefficientList[Series[(1-x^2+2x^3)/((1-x)(1-2x)(1-x^2)), {x, 0, 29}], x] (* Metin Sariyar, Sep 22 2019 *)
    LinearRecurrence[{3,-1,-3,2}, {1,3,7,17}, 41] (* G. C. Greubel, Jul 01 2024 *)
  • SageMath
    [(2^(n+4) - (-1)^n -9 - 6*n)/6 for n in range(41)] # G. C. Greubel, Jul 01 2024

Formula

G.f.: (1 -x^2 +2*x^3)/((1-x)*(1-2*x)*(1-x^2)). - Ralf Stephan, Apr 30 2004
From Paul Barry, Mar 06 2008: (Start)
a(n) = A001045(n+3) - 2*floor((n+2)/2).
a(n) = -n + Sum_{k=0..n} A001045(k+2) = A084639(n+1) - n. (End)
a(n+1) = 2*a(n) + A109613(n), a(0)=1. - Paul Curtz, Sep 22 2019

A026647 a(n) = Sum_{k=0..floor(n/2)} A026637(n-k, k).

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 17, 27, 45, 73, 119, 192, 312, 505, 818, 1323, 2142, 3466, 5609, 9075, 14685, 23761, 38447, 62208, 100656, 162865, 263522, 426387, 689910, 1116298, 1806209, 2922507, 4728717, 7651225, 12379943, 20031168
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [n le 5 select Binomial(n, Floor(n/2)) else Self(n-2) +Self(n-3) +2*Self(n-4) +Self(n-5) +3: n in [1..40]]; // G. C. Greubel, Jul 01 2024
    
  • Mathematica
    a[n_]:= a[n]= If[n<6, Binomial[n, Floor[n/2]], a[n-2] +a[n-3] +2*a[n- 4] +a[n-5] +3]; (* a = A026647 *)
    Table[a[n], {n,0,40}] (* G. C. Greubel, Jul 01 2024 *)
    LinearRecurrence[{1,1,0,1,-1,-1},{1,1,2,3,6,10,17},40] (* Harvey P. Dale, Jan 19 2025 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A026647
        if n<6: return binomial(n, n//2)
        else: return a(n-2) + a(n-3) + 2*a(n-4) + a(n-5) + 3
    [a(n) for n in range(41)] # G. C. Greubel, Jul 01 2024

Formula

G.f.: (1 + x^5 + x^6)/((1-x^4)*(1-x-x^2)).
From G. C. Greubel, Jul 01 2024: (Start)
a(n) = [n=0] - (3/4) + (1/4)*(-1)^n - (1/10)*2^((1-(-1)^n)/2)*(-1)^floor((n+1)/2) + (3/5)*LucasL(n+1).
a(n) = (1/20)*( 12*LucasL(n+1) + 5*(-1)^n - 15 - 2*cos(n*Pi/2) + 4*sin(n*Pi/2) ) + [n=0].
a(n) = a(n-2) + a(n-3) + 2*a(n-4) + a(n-5) + 3, with a(0) = a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 6, a(5) = 10. (End)

A026645 a(n) = Sum_{k=0..floor(n/2)} A026637(n, k).

Original entry on oeis.org

1, 1, 3, 5, 14, 21, 55, 85, 216, 341, 848, 1365, 3340, 5461, 13191, 21845, 52208, 87381, 206968, 349525, 821514, 1398101, 3264044, 5592405, 12979006, 22369621, 51642594, 89478485, 205592744, 357913941, 818848135, 1431655765, 3262611696, 5726623061, 13003800704, 22906492245
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, Floor[(3*n- 1)/2], T[n-1,k] + T[n-1,k-1] ]];
    A026645[n_]:= Sum[T[n, k], {k, 0, Floor[n/2]}];
    Table[A026645[n], {n,0,40}] (* G. C. Greubel, Jun 29 2024 *)
  • SageMath
    @CachedFunction
    def T(n,k): # T = A026637
        if k==0 or k==n: return 1
        elif k==1 or k==n-1: return ((3*n-1)//2)
        else: return T(n-1, k) + T(n-1, k-1)
    def A026645(n): return sum(T(n,k) for k in range((n//2)+1))
    [A026645(n) for n in range(41)] # G. C. Greubel, Jun 29 2024

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

Original entry on oeis.org

2, 2, 4, 6, 12, 22, 44, 86, 172, 342, 684, 1366, 2732, 5462, 10924, 21846, 43692, 87382, 174764, 349526, 699052, 1398102, 2796204, 5592406, 11184812, 22369622, 44739244, 89478486, 178956972, 357913942, 715827884, 1431655766, 2863311532
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

a(n) = sum of absolute values of terms in the (n+1)-th row of the triangle in A108561; - Reinhard Zumkeller, Jun 10 2005
a(n) = A078008(n+1) + 2*(1 + n mod 2). - Reinhard Zumkeller, Jun 10 2005
Essentially the same as A128209. - R. J. Mathar, Jun 14 2008

Crossrefs

Apart from initial term, equals A026644(n+1) + 2.
Cf. A001045.

Programs

  • GAP
    List([0..40], n-> (2^(n+1) +3 +(-1)^n)/3); # G. C. Greubel, Oct 21 2019
  • Magma
    [(2^(n+1) +3 +(-1)^n)/3: n in [0..40]]; // G. C. Greubel, Oct 21 2019
    
  • Maple
    spec:= [S,{S=Union(Sequence(Union(Prod(Union(Z,Z),Z),Z)),Sequence(Z))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    seq((2^(n+1) +3 +(-1)^n)/3, n=0..40); # G. C. Greubel, Oct 21 2019
  • Mathematica
    LinearRecurrence[{2,1,-2}, {2,2,4}, 40] (* G. C. Greubel, Oct 22 2019 *)
    CoefficientList[Series[2(1-x-x^2)/((1-x)(1+x)(1-2x)),{x,0,40}],x] (* Harvey P. Dale, Aug 03 2025 *)
  • PARI
    vector(41, n, (2^n +3 -(-1)^n)/3 ) \\ G. C. Greubel, Oct 21 2019
    
  • Sage
    [(2^(n+1) +3 +(-1)^n)/3 for n in (0..40)] # G. C. Greubel, Oct 21 2019
    

Formula

G.f.: 2*(1-x-x^2)/((1-x^2)*(1-2*x)).
a(n) = a(n-1) + 2*a(n-2) - 2.
a(n) = 1 + Sum_{alpha=RootOf(-1+z+2*z^2)} (1 + 4*alpha)*alpha^(-1-n)/9.
a(2n) = 2*a(n-1)-2, a(2n+1) = 2*a(2n). - Lee Hae-hwang, Oct 11 2002
From Paul Barry, May 24 2004: (Start)
a(n) = A001045(n+1) + 1.
a(n) = (2^(n+1) - (-1)^(n+1))/3 + 1. (End)
E.g.f.: (2*exp(2*x) + 3*exp(x) + exp(-x))/3. - G. C. Greubel, Oct 21 2019

Extensions

More terms from James Sellers, Jun 05 2000

A167030 a(n) = (2^n - (-1)^n - 3)/3.

Original entry on oeis.org

-1, 0, 0, 2, 4, 10, 20, 42, 84, 170, 340, 682, 1364, 2730, 5460, 10922, 21844, 43690, 87380, 174762, 349524, 699050, 1398100, 2796202, 5592404, 11184810, 22369620, 44739242, 89478484, 178956970, 357913940, 715827882
Offset: 0

Views

Author

Paul Curtz, Oct 27 2009

Keywords

Crossrefs

A026644 is an essentially identical sequence.

Programs

  • Magma
    [(2^n-(-1)^n)/3 -1: n in [0..40] ]; // Vincenzo Librandi, Apr 28 2011
    
  • Mathematica
    f[n_] := (2^n - (-1)^n - 3)/3; Array[f, 32, 0]
  • PARI
    a(n)=(2^n-(-1)^n)/3-1 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = A001045(n) - 1.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
G.f.: (1 - 2*x - x^2)/((x^2 - 1)*(1-2*x)).
2*a(n) = A153772(n+1).
a(2n+1) - a(2n) = A047849(n).
a(2n+1) = A020988(n); a(2n+2) = 2*A020988(n).
a(n+2) = 2*A000975(n).
a(2n+2) = a(2n) + 2^(2n).
E.g.f.: (1/3)*(exp(2*x) - 3*exp(x) - exp(-x)). - G. C. Greubel, May 30 2016

Extensions

Edited by R. J. Mathar, Dec 17 2010

A084170 a(n) = (5*2^n + (-1)^n - 3)/3.

Original entry on oeis.org

1, 2, 6, 12, 26, 52, 106, 212, 426, 852, 1706, 3412, 6826, 13652, 27306, 54612, 109226, 218452, 436906, 873812, 1747626, 3495252, 6990506, 13981012, 27962026, 55924052, 111848106, 223696212, 447392426, 894784852, 1789569706, 3579139412
Offset: 0

Views

Author

Paul Barry, May 18 2003

Keywords

Comments

Original name of this sequence: Generalized Jacobsthal numbers.

Crossrefs

Cf. A000225 (Mersenne numbers), A001045 (Jacobsthal numbers).

Programs

  • Magma
    [(5*2^n +(-1)^n)/3 -1: n in [0..35]]; // Vincenzo Librandi, Jul 05 2011
    
  • Mathematica
    LinearRecurrence[{2,1,-2},{1,2,6},40] (* or *) Table[(5*2^n+(-1)^n-3)/3,{n,0,40}] (* Harvey P. Dale, Jan 29 2012 *)
  • PARI
    a(n)=(5*2^n)\/3-1 \\ Charles R Greathouse IV, Jul 01 2011
    
  • SageMath
    [(2/3)*(5*2^(n-1) -1 -(n%2)) for n in range(41)] # G. C. Greubel, Oct 11 2022

Formula

a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), n>2.
a(n) = a(n-1) + 2*a(n-2) + 2, a(0)=1, a(1)=2.
G.f.: (1+x^2)/((1+x)*(1-x)*(1-2*x)).
E.g.f.: 5*exp(2*x)/3 - exp(x) + exp(-x)/3.
a(n+1) = A000975(n+2) + A000975(n).
a(2*n+1) - 2 = 10*A000975(n).
a(2*n+2) - 6 = 20*A000975(n).
a(n+2*k) - a(n) = 5*A002450(k)*2^n = A146882(k-1)*2^n, k >= 0. - Paul Curtz, Jun 15 2011
From Yosu Yurramendi, Jul 05 2016: (Start)
a(n) = A169969(2n) - 1, n >= 1; a(n) = 3*2^(n-1) - 1 + A169969(2n-7), n >= 5.
a(n+3) = 15*2^n - 2 - a(n), n >= 0, a(0)=1, a(1)=2, a(2)=6.
a(n) + A026644(n) = 3*2^n - 2, n >= 1.
a(n+3) = 3*2^(n+2) + A026644(n), n >= 1. (End)
a(n) = A000225(n+1) - A001045(n). - Yuchun Ji, Mar 17 2020

A103196 a(n) = (1/9)(2^(n+3)-(-1)^n(3n-1)).

Original entry on oeis.org

1, 2, 3, 8, 13, 30, 55, 116, 225, 458, 907, 1824, 3637, 7286, 14559, 29132, 58249, 116514, 233011, 466040, 932061, 1864142, 3728263, 7456548, 14913073, 29826170, 59652315, 119304656, 238609285, 477218598, 954437167
Offset: 0

Views

Author

Creighton Dement, Mar 18 2005

Keywords

Comments

A floretion-generated sequence relating to the Jacobsthal sequence A001045 as well as to A095342 (Number of elements in n-th string generated by a Kolakoski(5,1) rule starting with a(1)=1). (a(n)) may be seen as the result of a certain transform of the natural numbers (see program code).
Floretion Algebra Multiplication Program, FAMP Code: 4jesleftforseq[A*B] with A = + 'i + 'j + i' + j' + 'ii' + 'jj' + 'ij' + 'ji' + e and B = - .25'i + .25'j + .25'k + .25i' - .25j' + .25k' - .25'ii' + .25'jj' + .25'kk' + .25'ij' + .25'ik' + .25'ji' + .25'jk' - .25'ki' - .25'kj' - .25e; 1vesforseq[A*B](n) = n, ForType: 1A.

Crossrefs

Programs

  • Mathematica
    Table[(2^(n+3)-(-1)^n (3n-1))/9,{n,0,30}] (* or *) LinearRecurrence[ {0,3,2},{1,2,3},40] (* Harvey P. Dale, Jul 09 2018 *)

Formula

G.f. (2x+1)/((1-2x)(x+1)^2); Superseeker results: a(n) + a(n+1) = A001045(n+3); a(n+1) - a(n) = A095342(n+1); a(n+2) - a(n+1) - a(n) = A053088(n+1) = A034299(n+1) - A034299(n); a(n) + 2a(n+1) + a(n+2) = 2^(n+3); a(n+2) - 2a(n+1) + a(n) = A053088(n+1) - A053088(n); a(n+2) - a(n) = A001045(n+4) - A001045(n+3) = A052953(n+3) - A052953(n+2) = A026644(n+2) - A026644(n+1);
a(n)=sum{k=0..n+2, (-1)^(n-k)*C(n+2, k)phi(phi(3^k))}; a(n)=sum{k=0..n+2, (-1)^(n-k)*C(n+2, k)(2*3^k/9+C(1, k)/3+4*C(0, k)/9)}; a(n)=sum{k=0..n+2, J(n-k+3)((-1)^(k+1)-2C(1, k)+4C(0, k))} where J(n)=A001045(n); a(n)=A113954(n+2). - Paul Barry, Nov 09 2005

A169969 Locations of row maxima in "crushed" version of Stern's diatomic array.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 21, 27, 43, 53, 85, 107, 171, 213, 341, 427, 683, 853, 1365, 1707, 2731, 3413, 5461, 6827, 10923, 13653, 21845, 27307, 43691, 54613, 87381, 109227, 174763, 218453, 349525, 436907, 699051, 873813, 1398101, 1747627, 2796203, 3495253, 5592405
Offset: 1

Views

Author

N. J. A. Sloane, Aug 08 2010

Keywords

Comments

From Michel Marcus, Jan 22 2015: (Start)
The Stern's diatomic array begins (see A049456).
1...............................1
1...............2...............1
1.......3.......2.......3.......1
1...4...3...5...2...5...3...4...1
1.5.4.7.3.8.5.7.2.7.5.8.3.7.4.5.1
...
The "crushed" version is obtained by removing the right column, and then squeezing everything to the left.
1;
1, 2;
1, 3, 2, 3;
1, 4, 3, 5, 2, 5, 3, 4;
1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5;
...
This gives sequence 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, ... (cf. A002487).
The "crushed" array row maxima are: 1, 2, 3, 5, 8, ... (cf. A000045).
The indices of these values in A002487 are 1, 3, 5, 7, 11, ... : this sequence.
Note, for instance, that for 3rd row, the maximum which is 3, appears twice, at indices 5 and 7, giving 2 terms for this sequence.
(End)

Examples

			G.f. = x + 3*x^2 + 5*x^3 + 7*x^4 + 11*x^5 + 13*x^6 + 21*x^7 + 27*x^8 + 43*x^9 + ...
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n <= 5, {1, 3, 5, 7, 11}[[n]], a[n-2] + 2a[n-4]]; Array[a, 42] (* Jean-François Alcover, Dec 11 2016 *)
  • PARI
    fusc(n)=local(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); b; \\ from A002487
    lista(nn) = {nb = 2^(nn+1)-1; vall = vector(nb, n, fusc(n)); for (n=1, nn, vmax = 0; for (j=2^(n-1), 2^n-1, if (vall[j] > vmax, vmax = vall[j]);); for (j=2^(n-1), 2^n-1, if (vall[j] == vmax, print1(j, ", "));););} \\ Michel Marcus, Jan 22 2015

Formula

a(2n+1) + a(2n+2) = 3*2^(n+1), n>0 . - Yosu Yurramendi, Jun 29 2016
a(2n+3) = 3*2^(n+1) - a(n); a(2n+4) = 3*2^(n+1) + a(n), n>=0, a(0)=0 (new term), a(1)=1, a(2)=3 . - Yosu Yurramendi, Jun 29 2016
G.f.: x*(1 + 3*x + 4*x^2 + 4*x^3 + 4*x^4)/((1 + x^2)*(1 - 2*x^2)). - Ilya Gutkovskiy, Jun 29 2016
For n>1, a(n) = (2^(n/2 - 1)*(5 + 4*sqrt(2) + (-1)^n*(5 - 4*sqrt(2))) + cos(Pi*n/2) + sin(Pi*n/2))/3. - Vaclav Kotesovec, Jun 30 2016
a(2n) = a(2n-7) + 3*2^(n-1); a(2n-1) = a(2n-7) - 3*2^(n-1), n>=5 . - Yosu Yurramendi, Jul 06 2016
a(2n-1) = A168642(n), n>0; a(2n) = A048573(n), n>0; a(2n-1) = A026644(n) + 1, n>1; a(2n) = A084170(n) + 1, n>0 . - Yosu Yurramendi, Dec 11 2016

Extensions

More terms from Michel Marcus, Jan 22 2015

A174395 The number of different 4-colorings for the vertices of all triangulated planar polygons on a base with n vertices if the colors of two adjacent boundary vertices are fixed.

Original entry on oeis.org

0, 2, 10, 40, 140, 462, 1470, 4580, 14080, 42922, 130130, 393120, 1184820, 3565382, 10717990, 32197660, 96680360, 290215842, 870997050, 2613690200, 7842468700, 23530202302, 70596199310, 211799782740, 635421717840, 1906309892762, 5719019156770, 17157236427280
Offset: 3

Views

Author

Patrick Labarque, Mar 18 2010, Mar 21 2010

Keywords

Comments

1st: The number of different vertex colorings with 4 or 3 colors for n vertices is: (3^(n-1)-2-(-1)^n)/4.
2nd: The number of 3-colorings is: (2^n -3-(-1)^n)/3.
The above sequence is the difference between the first and the second one.

Examples

			n=3 then a(3)=0 as there are no 4-colorings for the only triangle.
n=4 then a(4)=2 as there are six good colorings less four 3-colorings for the two triangulated quadrilaterals (4-gons).
n=5 then a(5)=10 as there are twenty good colorings less ten 3-colorings for the five triangulated pentagons.
		

Crossrefs

Equals A081251 (2,6,20...) minus A026644 (2,4,10...)

Programs

  • Magma
    [(3^n - 2^(n+2) + 6 + (-1)^n) / 12: n in [3..30]]; // Vincenzo Librandi, Sep 23 2013
  • Mathematica
    CoefficientList[Series[-2 x/((x - 1) (x + 1) (2 x - 1) (3 x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 23 2013 *)
    LinearRecurrence[{5,-5,-5,6},{0,2,10,40},30] (* Harvey P. Dale, Aug 29 2015 *)
  • PARI
    Vec(-2*x^4/((x-1)*(x+1)*(2*x-1)*(3*x-1))  + O(x^100)) \\ Colin Barker, Sep 22 2013
    

Formula

a(n) = (3^n - 2^(n+2) + 6 + (-1)^n) / 12.
a(n) = 5*a(n-1)-5*a(n-2)-5*a(n-3)+6*a(n-4). G.f.: -2*x^4 / ((x-1)*(x+1)*(2*x-1)*(3*x-1)). - Colin Barker, Sep 22 2013

Extensions

More terms from Colin Barker, Sep 22 2013
Previous Showing 11-20 of 23 results. Next