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-4 of 4 results.

A077947 Expansion of 1/(1 - x - x^2 - 2*x^3).

Original entry on oeis.org

1, 1, 2, 5, 9, 18, 37, 73, 146, 293, 585, 1170, 2341, 4681, 9362, 18725, 37449, 74898, 149797, 299593, 599186, 1198373, 2396745, 4793490, 9586981, 19173961, 38347922, 76695845, 153391689, 306783378, 613566757, 1227133513, 2454267026, 4908534053, 9817068105
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Number of sequences of codewords of total length n from the code C={0,10,110,111}. E.g., a(3)=5 corresponds to the sequences 000, 010, 100, 110 and 111. - Paul Barry, Jan 23 2004
In other words: number of compositions of n into 1 kind of 1's and 2's and two kinds of 3's. - Joerg Arndt, Jun 25 2011
Diagonal sums of number Pascal-(1,2,1) triangle A081577. - Paul Barry, Jan 24 2005
For n>0: a(n) = A173593(2*n+1) - A173593(2*n); a(n+1) = A173593(2*n) - A173593(2*n-1). - Reinhard Zumkeller, Feb 22 2010
Sums of 3 successive terms are powers of 2. - Mark Dols, Aug 20 2010
For n > 2, a(n) is the number of quaternary sequences of length n (i) starting with q(0)=0; (ii) ending with q(n-1)=0 or 3 and (iii) in which all triples (q(i), q(i+1), q(i+2)) contain digits 0 and 3; cf. A294627. - Wojciech Florek, Jul 30 2018

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(4) = 9 of them start with 0 and end with 0 or 3: 0030, 0033, 0130, 0230, 0300, 0303, 0310, 0320, 0330. - _Wojciech Florek_, Jul 30 2018
		

References

  • S. Roman, Introduction to Coding and Information Theory, Springer-Verlag, 1996, p. 42

Crossrefs

Apart from signs, same as A077972.
Cf. A139217 and A139218.
Cf. A078010.
Cf. A294627.

Programs

  • Magma
    [Round(2^(n+2)/7): n in [0..40]]; // Vincenzo Librandi, Jun 25 2011
    
  • Maple
    seq(round(2^(n+2)/7),n=0..25); # Mircea Merca, Dec 28 2010
  • Mathematica
    CoefficientList[Series[1/(1 - x - x^2 - 2*x^3), {x, 0, 100}], x] (* or *) LinearRecurrence[{1, 1, 2}, {1, 1, 2}, 70] (* Vladimir Joseph Stephan Orlovsky, Jun 28 2011 *)
  • Maxima
    a(n):=sum(sum(binomial(k,j)*binomial(j,n-3*k+2*j)*2^(k-j),j,0,k),k,1,n); /* Vladimir Kruchinin, Sep 07 2010 */
    
  • PARI
    Vec(1/(1-x-x^2-2*x^3) + O(x^100)) \\ Altug Alkan, Oct 31 2015
    
  • Python
    def A077947(n): return (k:=(m:=1<=7) # Chai Wah Wu, Jan 21 2023

Formula

G.f.: 1/((1-2*x)*(1+x+x^2)).
a(n) = a(n-1)+a(n-2)+2*a(n-3). - Paul Curtz, May 23 2008
a(n) = round(2^(n+2)/7). - Mircea Merca, Dec 28 2010
a(n) = 4*2^n/7 + 3*cos(2*Pi*n/3)/7 + sqrt(3)*sin(2*Pi*n/3)/21. - Paul Barry, Jan 23 2004
Convolution of A000079 and A049347. a(n) = Sum_{k=0..n} 2^k*2*sqrt(3)*cos(2*Pi(n-k)/3+Pi/6)/3. - Paul Barry, May 19 2004
a(n) = sum(sum(binomial(k,j)*binomial(j,n-3*k+2*j)*2^(k-j),j,0,k),k,1,n), n>0. - Vladimir Kruchinin, Sep 07 2010
Partial sums of A078010 starting (1, 0, 1, 3, 4, 9, ...). - Gary W. Adamson, May 13 2013
a(n) = (1/14)*(2^(n + 3) + (-1)^n*((-1)^floor(n/3) + 4*(-1)^floor((n + 1)/3) + 2*(-1)^floor((n + 2)/3) + (-1)^floor((n + 4)/3))). - John M. Campbell, Dec 23 2016
a(n) = (1/63)*(9*2^(2 + n) + (-1)^n*(2 + 9*floor(n/6) - 32*floor((n + 5)/6) + 24*floor((n + 7)/6) + 20*floor((n + 8)/6) - 10*floor((n + 9)/6) - 27*floor((n + 10)/6) + 14*floor((n + 11)/6) + 3*floor((n + 13)/6) - 2*floor((n + 14)/6) + floor((n + 15)/6))). - John M. Campbell, Dec 23 2016
7*a(n) = 2^(n+2) + A167373(n+1). - R. J. Mathar, Feb 06 2020
a(n) = T(n+1) + 2*(a(1)*T(n-1) + a(2)*T(n-2) + ... + a(n-2)*T(2) + a(n-1)*T(1)) for T(n) = A000073(n), the tribonacci numbers. - Greg Dresden and Bora Bursalı, Sep 14 2023

Extensions

Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A033129 Base-2 digits are, in order, the first n terms of the periodic sequence with initial period [1,1,0].

Original entry on oeis.org

0, 1, 3, 6, 13, 27, 54, 109, 219, 438, 877, 1755, 3510, 7021, 14043, 28086, 56173, 112347, 224694, 449389, 898779, 1797558, 3595117, 7190235, 14380470, 28760941, 57521883, 115043766, 230087533, 460175067, 920350134, 1840700269
Offset: 0

Views

Author

Keywords

Comments

Number of moves to separate a Hanoi Tower into two towers of even resp. odd stones. - Martin von Gagern, May 26 2004
From Reinhard Zumkeller, Feb 22 2010: (Start)
Terms of A173593 with initial digits '11' in binary representation: a(n) = A173593(2*n-3) for n>0;
for n>0: a(3*n-1) = A083713(n);
a(n+1) - a(n) = abs(A078043(n)). (End)

Crossrefs

Cf. A011655 (repeat 0,1,1), A289006 (the same in octal).
Cf. A057744, A294627 (first differences).

Programs

  • Mathematica
    Table[(1/14)*(-9 - 2*(-1)^Floor[(2 n)/3] + (-1)^(1 + Floor[(1/3)*(7 + 2 n)]) + 3*2^(2 + n)), {n, 0, 100}] (* John M. Campbell, Dec 26 2016 *)
    Table[FromDigits[PadRight[{},n,{1,1,0}],2],{n,0,40}] (* Harvey P. Dale, Oct 02 2022 *)
  • PARI
    A033129(n)=3<<(n+1)\7 \\ M. F. Hasler, Jun 23 2017
    
  • Python
    print([(6*2**n//7) for n in range(50)]) # Karl V. Keller, Jr., Jul 11 2022

Formula

From Paul Barry, Jan 23 2004: (Start)
Partial sums of abs(A078043).
G.f.: x*(1+x)/((1-x)*(1-2*x)*(1+x+x^2)) = x*(1+x)/(1-2*x-x^3+2*x^4).
a(n) = (6/7)*2^n - (4/21)*cos(2*Pi*n/3) - (2/21)*sqrt(3)*sin(2*Pi*n/3) - 2/3. (End)
a(n) = a(n-3) + 3 * 2^(n-3). - Martin von Gagern, May 26 2004
a(n+1) = 2*a(n) + 1 - 0^((a(n)+1) mod 4). - Reinhard Zumkeller, Feb 22 2010
a(n) = floor(2^(n+1)*3/7). - Jean-Marie Madiot, Oct 05 2012
a(n) = (1/14)*(-9 - 2*(-1)^floor((2n)/3) + (-1)^(floor((2*n + 7)/3) + 1) + 3*2^(n + 2)). - John M. Campbell, Dec 26 2016

A083713 a(n) = (8^n - 1)*3/7.

Original entry on oeis.org

0, 3, 27, 219, 1755, 14043, 112347, 898779, 7190235, 57521883, 460175067, 3681400539, 29451204315, 235609634523, 1884877076187, 15079016609499, 120632132875995, 965057063007963, 7720456504063707, 61763652032509659
Offset: 0

Views

Author

Klaus Brockhaus, Jun 14 2003

Keywords

Comments

Fixed points of the mapping defined by A067585. In binary these numbers show a regular pattern: 0, 11, 11011, 11011011, 11011011011, etc.
From Reinhard Zumkeller, Feb 22 2010: (Start)
a(n) = A173593(6*n-5) for n > 0:
terms of A173593 beginning and ending with digits '11' in binary representation;
for n > 0: a(n) = A033129(3*n-1); a(n) - a(n-1) = A103333(n). (End)

Examples

			From _Zerinvary Lajos_, Jan 14 2007: (Start)
Octal..........decimal:
0....................0
3....................3
33..................27
333................219
3333..............1755
33333............14043
333333..........112347
3333333.........898779
33333333.......7190235
333333333.....57521883
3333333333...460175067
etc. (End)
		

Crossrefs

Programs

  • Mathematica
    (3/7)(8^Range[0,20]-1) (* or *) LinearRecurrence[{9,-8},{0,3},30] (* or *) NestList[8#+3&,0,30] (* Harvey P. Dale, Jun 06 2013 *)
  • PARI
    a(n)=(8^n-1)*3/7 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = 3*A023001(n).
Recursion: a(0) = 0, a(n+1) = (((a(n)*2)*2+1)*2+1).
a(n) = 8*a(n-1) + 3 (with a(0)=0). - Vincenzo Librandi, Aug 08 2010
a(0)=0, a(1)=3, a(n) = 9*a(n-1) - 8*a(n-2). - Harvey P. Dale, Jun 06 2013
From Stefano Spezia, Feb 23 2025: (Start)
G.f.: 3*x/((1 - x)*(1 - 8*x)).
E.g.f.: 3*exp(x)*(exp(7*x) - 1)/7. (End)

A113836 a(n) = Sum[2^(A001651(i-1)-1), {i,1,n}].

Original entry on oeis.org

1, 3, 11, 27, 91, 219, 731, 1755, 5851, 14043, 46811, 112347, 374491, 898779, 2995931, 7190235, 23967451, 57521883, 191739611, 460175067, 1533916891, 3681400539, 12271335131, 29451204315, 98170681051, 235609634523
Offset: 1

Views

Author

Artur Jasinski, Jan 27 2006

Keywords

Comments

From Reinhard Zumkeller, Feb 22 2010: (Start)
For n>1: a(n)=A173593(3*n-5): terms of A173593 ending with digits '11' in binary representation;
for n>0: a(n)=A033129(3*n-1); a(n+1)-a(n)=ABS(A094014(n)). (End)

Examples

			a(2) = 2^(A001651(0)-1) + 2^(A001651(1)-1) = 2^0 + 2^1 = 3
		

Crossrefs

Cf. A001651.

Programs

  • Mathematica
    a = {}; s = 0; For[n = 1, n < 40, n++, If[Length[Intersection[{Mod[n, 3]}, {1,2}]] > 0, s = s + 2^(n - 1); AppendTo[a, s]]]; a

Formula

Empirical g.f.: x*(2*x+1) / ((x-1)*(8*x^2-1)). - Colin Barker, Sep 01 2013

Extensions

Edited by Stefan Steinerberger, Jul 23 2007
Showing 1-4 of 4 results.