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.

Showing 1-5 of 5 results.

A135520 a(n) = 4*a(n-2).

Original entry on oeis.org

2, 1, 8, 4, 32, 16, 128, 64, 512, 256, 2048, 1024, 8192, 4096, 32768, 16384, 131072, 65536, 524288, 262144, 2097152, 1048576, 8388608, 4194304, 33554432, 16777216, 134217728, 67108864, 536870912, 268435456, 2147483648, 1073741824
Offset: 0

Views

Author

Paul Curtz, Feb 19 2008

Keywords

Crossrefs

Programs

Formula

From R. J. Mathar, corrected Apr 14 2008: (Start)
O.g.f.: (5/(1-2*x) + 3/(1+2*x))/4.
a(n) = (5*2^n + 3*(-2)^n)/4.
a(2*n)=2*A000302(n). a(2*n+1)=A000302(n). (End)
a(n) = A000079(n) terms swapped by pairs. - Paul Curtz, Apr 26 2011
a(n) = 2^(n+(-1)^n). - Wesley Ivan Hurt, Dec 13 2013
E.g.f.: (1/4)*(5*exp(2*x) + 3*exp(-2*x)). - G. C. Greubel, Oct 17 2016

Extensions

More terms from R. J. Mathar, Feb 23 2008

A133628 a(1)=1, a(n) = a(n-1) + (p-1)*p^(n/2-1) if n is even, else a(n) = a(n-1) + p^((n-1)/2), where p=4.

Original entry on oeis.org

1, 4, 8, 20, 36, 84, 148, 340, 596, 1364, 2388, 5460, 9556, 21844, 38228, 87380, 152916, 349524, 611668, 1398100, 2446676, 5592404, 9786708, 22369620, 39146836, 89478484, 156587348, 357913940, 626349396, 1431655764, 2505397588
Offset: 1

Views

Author

Hieronymus Fischer, Sep 19 2007

Keywords

Comments

This is essentially a duplicate of A097164. - R. J. Mathar, Jun 08 2008
Partial sums of A084221.

Crossrefs

Sequences with similar recurrence rules: A027383(p=2), A087503(p=3), A133629(p=5).
See A133629 for general formulas with respect to the recurrence rule parameter p.
Related sequences: A132666, A132667, A132668, A132669.
Other related sequences for different p: A016116(p=2), A038754(p=3), A084221(p=4), A133632(p=5).

Programs

  • Magma
    [4^Floor(n/2)+4^Floor((n+1)/2)/3-4/3: n in [1..40]]; // Vincenzo Librandi, Aug 17 2011
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=4*a[n-2]+4 od: seq(a[n], n=1..31); # Zerinvary Lajos, Mar 17 2008
  • Mathematica
    nxt[{n_,a_}]:={n+1,If[OddQ[n],a+3*4^((n+1)/2-1),a+4^(n/2)]}; Transpose[ NestList[ nxt,{1,1},30]][[2]] (* Harvey P. Dale, Mar 31 2013 *)
  • PARI
    vector(40, n, (3*4^floor(n/2) + 4^floor((n+1)/2) - 4)/3) \\ G. C. Greubel, Nov 08 2018

Formula

a(n) = Sum_{k=1..n} A084221(k).
G.f.: x*(1+3*x)/((1-4*x^2)*(1-x)).
a(n) = (4/3)*(4^(n/2)-1) if n is even, otherwise a(n) = (4/3)*(7*4^((n-3)/2)-1).
a(n) = (4/3)*(4^floor(n/2) + 4^floor((n-1)/2) - 4^floor((n-2)/2) - 1).
a(n) = 4^floor(n/2) + 4^floor((n+1)/2)/3 - 4/3.
a(n) = A132668(a(n+1)) - 1.
a(n) = A132668(a(n-1) + 1) for n > 0.
A132668(a(n)) = a(n-1) + 1 for n > 0.

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

Original entry on oeis.org

1, 2, 5, 9, 21, 37, 85, 149, 341, 597, 1365, 2389, 5461, 9557, 21845, 38229, 87381, 152917, 349525, 611669, 1398101, 2446677, 5592405, 9786709, 22369621, 39146837, 89478485, 156587349, 357913941, 626349397, 1431655765, 2505397589
Offset: 0

Views

Author

Paul Barry, Jul 30 2004

Keywords

Comments

Interleave (4*4^n-1)/2 (see A002450) and (7*4^n-1)/3 (A206374).

Programs

  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=4*a[n-2]+4 od: seq(a[n]/4, n=2..33); # Zerinvary Lajos, Mar 17 2008
  • Mathematica
    CoefficientList[Series[(1+x-x^2)/((1-x)(1-4x^2)),{x,0,40}],x] (* or *) LinearRecurrence[{1,4,-4},{1,2,5},41] (* or *) f[n_]:=(15*2^n-(-2)^n - 8)/24; Array[f, 40] (* Harvey P. Dale, Jun 17 2011 *)

Formula

G.f.: (1+x-x^2)/((1-x)*(1-4*x^2)).
a(n) = 5*2^n/4+(-2)^n/12-1/3.
a(n) = a(n-1)+4*a(n-2)-4*a(n-3).
a(2*n) = A002450(n+1).
a(n) = A097164(n+1)/4.
a(n) = (15*2^n-(-2)^n-8)/24. - Harvey P. Dale, Jun 17 2011

A097165 Expansion of (1-3x)/((1-x)(1-4x)(1-5x)).

Original entry on oeis.org

1, 7, 41, 227, 1221, 6447, 33601, 173467, 889181, 4533287, 23015961, 116477907, 587981941, 2962279327, 14900875121, 74862289547, 375743103501, 1884442140567, 9445117195081, 47317211944387, 236952563597861
Offset: 0

Views

Author

Paul Barry, Jul 30 2004

Keywords

Comments

Partial sums of A085351. Convolution of A034478 and 4^n. Convolution of A047849 and 5^n. a(n)=A097162(2n+1)/3. Third binomial transform of A097164.

Programs

  • Mathematica
    CoefficientList[Series[(1-3x)/((1-x)(1-4x)(1-5x)),{x,0,30}],x] (* or *) LinearRecurrence[{10,-29,20},{1,7,41},30] (* Harvey P. Dale, Jan 24 2012 *)

Formula

a(n)=5*5^n/2-4*4^n/3-1/6; a(n)=sum{k=0..n, (5^k+1)4^(n-k)/2}; a(n)=sum{k=0..n, (4^k+2)5^(n-k)/3}; a(n)=10a(n-1)-29a(n-2)+20a(n-3).

A137208 a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) for n > 2; a(0)=2, a(1)=3, a(2)=6.

Original entry on oeis.org

2, 3, 6, 10, 22, 38, 86, 150, 342, 598, 1366, 2390, 5462, 9558, 21846, 38230, 87382, 152918, 349526, 611670, 1398102, 2446678, 5592406, 9786710, 22369622, 39146838, 89478486, 156587350, 357913942, 626349398, 1431655766, 2505397590, 5726623062, 10021590358
Offset: 0

Views

Author

Paul Curtz, Mar 05 2008

Keywords

Crossrefs

Cf. A097164.

Programs

  • Magma
    [(2/3)+(5/4)*2^n+(1/12)*(-2)^n: n in [0..40]]; // Vincenzo Librandi, Aug 09 2011
    
  • Maple
    a:=proc(n) option remember; if n=0 then 2 elif n=1 then 3 elif n=2 then 6 else a(n-1)+4*a(n-2)-4*a(n-3); fi; end: seq(a(n), n=0..50); # Wesley Ivan Hurt, Jan 21 2017
  • Mathematica
    LinearRecurrence[{1,4,-4},{2,3,6},40] (* Harvey P. Dale, Sep 04 2018 *)
  • PARI
    Vec((2 + x - 5*x^2) / ((1 - x)*(1 - 2*x)*(1 + 2*x)) + O(x^40)) \\ Colin Barker, Jan 22 2017

Formula

G.f.: (2 + x - 5*x^2) / ((1 - x)*(1 - 2*x)*(1 + 2*x)). - Colin Barker, Jan 22 2017

Extensions

Extended by Vincenzo Librandi, Aug 09 2011
Showing 1-5 of 5 results.