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

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

Original entry on oeis.org

1, 3, 4, 2, -4, -12, -16, -8, 16, 48, 64, 32, -64, -192, -256, -128, 256, 768, 1024, 512, -1024, -3072, -4096, -2048, 4096, 12288, 16384, 8192, -16384, -49152, -65536, -32768, 65536, 196608, 262144, 131072, -262144, -786432, -1048576, -524288, 1048576, 3145728, 4194304, 2097152, -4194304
Offset: 0

Views

Author

Paul Barry, Nov 21 2003

Keywords

Comments

Also first of two associated sequences a(n) and b(n) built from a(0)=1 and b(0)=2 by the formulas a(n) = a(n-1) + b(n-1) and b(n) = -a(n-1) + b(n-1). The initial terms of the second sequence b(n) are 2, 1, -2, -6, -8, -4, 8, 24, 32, 16, -32, -96, -128, -64, 128, 384, 512, 256, -1536, -2048, -1024, 2048, 6144, 8192, .... The formula for b(n) is the same as for a(n) but replacing cosines with sines. Indeed in the complex plane the points Mn=a(n)+b(n)*I are located where the logarithmic spiral Rho=A*(B^Theta) cuts the two pairs of orthogonal straight lines drawn from the origin with slopes 2, 1/3, -1/2 and -3. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 29 2007

Crossrefs

Cf. A078069.

Programs

Formula

a(n) = sum_{k=0..n} C(n, k)(-1)^floor(k/2)(1 + (1 - (-1)^k)/2).
a(n) = A*(B^Theta(n))*cos(Theta(n)) where A = 3.644691771.. = (5^0,5)*16^(arctan(2)/(2*Pi)) B = 0.64321824.. = 16^(-1/(2*Pi)) Theta(4p+1) = p*Pi + arctan(2) Theta(4*p+2) = p*Pi + arctan(1/3) Theta(4*p+3) = p*Pi + arctan(-1/2) Theta(4*p+4) = p*Pi + arctan(-3). - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 29 2007
Also a(0)=1, a(1)=3, a(2)=4, a(3)=2 and for n>3 a(n) = -4 * a(n-4). - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 29 2007
a(n) = 4a(n-1) - 6a(n-2) + 4a(n-3). - Paul Curtz, Nov 20 2007
a(n) = 2a(n-1) - 2a(n-2) = A009545(n) + A009545(n+1) = (1/2)*((1+2*i)*(1-i)^n + (1-2*i)*(1+i)^n). - Ralf Stephan, Jul 21 2013

A207543 Triangle read by rows, expansion of (1+y*x)/(1-2*y*x+y*(y-1)*x^2).

Original entry on oeis.org

1, 0, 3, 0, 1, 5, 0, 0, 5, 7, 0, 0, 1, 14, 9, 0, 0, 0, 7, 30, 11, 0, 0, 0, 1, 27, 55, 13, 0, 0, 0, 0, 9, 77, 91, 15, 0, 0, 0, 0, 1, 44, 182, 140, 17, 0, 0, 0, 0, 0, 11, 156, 378, 204, 19, 0, 0, 0, 0, 0, 1, 65, 450, 714, 285, 21, 0
Offset: 0

Views

Author

Philippe Deléham, Feb 24 2012

Keywords

Comments

Previous name was: "A scaled version of triangle A082985."
Triangle, read by rows, given by (0, 1/3, -1/3, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (3, -4/3, 1/3, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Examples

			Triangle begins :
1
0, 3
0, 1, 5
0, 0, 5, 7
0, 0, 1, 14, 9
0, 0, 0, 7, 30, 11
0, 0, 0, 1, 27, 55, 13
0, 0, 0, 0, 9, 77, 91, 15
0, 0, 0, 0, 1, 44, 182, 140, 17
0, 0, 0, 0, 0, 11, 156, 378, 204, 19
0, 0, 0, 0, 0, 1, 65, 450, 714, 285, 21
0, 0, 0, 0, 0, 0, 13, 275, 1122, 1254, 385, 23
		

Crossrefs

Cf. A082985 which is another version of this triangle.
Cf. Diagonals : A005408, A000330, A005585, A050486, A054333, A057788. Cf. A119900.

Programs

  • Maple
    s := (1+y*x)/(1-2*y*x+y*(y-1)*x^2): t := series(s,x,12):
    seq(print(seq(coeff(coeff(t,x,n),y,m),m=0..n)),n=0..11); # Peter Luschny, Aug 17 2016

Formula

T(n,k) = 2*T(n-1,k-1) + T(n-2,k-1) - T(n-2,k-2), T(0,0) = 1, T(1,0) = 0, T(1,1) = 3.
G.f.: (1+y*x)/(1-2*y*x+y*(y-1)*x^2).
Sum_{i, i>=0} T(n+i,n) = A000204(2*n+1).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A078069(n), A000007(n), A003945(n), A111566(n) for x = -1, 0, 1, 2 respectively.
Sum_{k, 0<=k<=n} T(n,k)*x^(n-k) = A090131(n), A005408(n), A003945(n), A078057(n), A028859(n), A000244(n), A063782(n), A180168(n) for x = -1, 0, 1, 2, 3, 4, 5, 6 respectively.
From Peter Bala, Aug 17 2016: (Start)
Let S(k,n) = Sum_{i = 1..n} i^k. Calculations in Zielinski 2016 suggest the following identity holds involving the p-th row elements of this triangle:
Sum_{k = 0..p} T(p,k)*S(2*k,n) = 1/2*(2*n + 1)*(n*(n + 1))^p.
For example, for row 6 we find S(6,n) + 27*S(8,n) + 55*S(10,n) + 13*S(12,n) = 1/2*(2*n + 1)*(n*(n + 1))^6.
There appears to be a similar result for the odd power sums S(2*k + 1,n) involving A119900. (End)

Extensions

New name using a formula of the author from Peter Luschny, Aug 17 2016

A134812 a(n) = 2a(n-2) + 4a(n-3), n >= 3.

Original entry on oeis.org

0, 1, -1, 1, 2, -2, 8, 4, 8, 40, 32, 112, 224, 352, 896, 1600, 3200, 6784, 12800, 26368, 52736, 103936, 210944, 418816, 837632, 1681408, 3350528, 6713344, 13426688, 26828800, 53706752, 107364352, 214728704, 429555712, 858914816, 1718026240, 3436052480, 6871711744, 13744209920
Offset: 0

Views

Author

Paul Curtz, Jan 28 2008

Keywords

Crossrefs

Cf. A038521.

Programs

  • Mathematica
    CoefficientList[Series[x*(-1 + x + x^2) / ( (2*x-1)*(2*x^2 + 2*x + 1) ),{x,0,38}],x] (* James C. McMahon, Apr 11 2025 *)

Formula

G.f.: x*(-1 + x + x^2) / ( (2*x-1)*(2*x^2 + 2*x + 1) ). - R. J. Mathar, Aug 11 2012
20*a(n) = 2^n - 6*A078069(n), n>0. - R. J. Mathar, Aug 11 2012

Extensions

More terms from Joshua Zucker, Feb 23 2008

A176739 Expansion of 1/(1-2*x^2-4*x^3). (2,4)-Padovan sequence.

Original entry on oeis.org

1, 0, 2, 4, 4, 16, 24, 48, 112, 192, 416, 832, 1600, 3328, 6528, 13056, 26368, 52224, 104960, 209920, 418816, 839680, 1677312, 3354624, 6713344, 13418496, 26845184, 53690368, 107364352, 214761472, 429490176, 858980352, 1718026240, 3435921408, 6871973888
Offset: 0

Views

Author

Wolfdieter Lang, Jul 14 2010

Keywords

Comments

See A000931 (Padovan), and the W. Lang link given there for a combinatorial interpretation and an explicit form.
a(n)/2^n equals the probability that n will occur as a partial sum in a randomly-generated infinite sequence of 2's and 3's. The limiting ratio is 2/5. - Bob Selcoe, Jul 12 2013

Examples

			Combinatorics for (A,B)=(2,4) Padovan sequence with weighted (3,2)-Morse type code (see the W. Lang link under A000931): n=5, - -- and -- -, with weights 2^1*4^1 and 4^1*2^1, respectively, adding to 2*2*4=16=a(5).
		

Crossrefs

Programs

  • Maple
    seq(2^(n+1)/5 + Re((3-I)*(-1-I)^n)/5, n=0..100); # Robert Israel, Aug 26 2014
  • Mathematica
    CoefficientList[Series[1/(1 - 2*x^2 - 4*x^3), {x, 0, 30}], x] (* Wesley Ivan Hurt, Aug 26 2014 *)

Formula

O.g.f.: 1/((1+2*x+2*x^2)*(1-2*x)) = ((3+2*x)/(1+2*x+2*x^2) + 2/(1-2*x))/5.
a(n) = (3*b(n) + 2*b(n-1) + 2^(n+1))/5, with b(n):=A108520(n), and b(-1)=0.
a(n) = 2*a(n-2) + 4*a(n-3). - Bob Selcoe, Aug 26 2014
a(n) = 2^(n+1)/5 + Re((3-i)*(-1-i)^n)/5. - Robert Israel, Aug 26 2014
5*a(n) = 2^(n+1) -A078069(n+1). - R. J. Mathar, May 14 2024

A340670 Number of complex base i-1 points which can be represented within n bits and negated within those n bits.

Original entry on oeis.org

1, 1, 1, 3, 5, 15, 29, 47, 101, 199, 413, 847, 1621, 3255, 6541, 13087, 26373, 52423, 104637, 209711, 419253, 839511, 1678317, 3353919, 6710629, 13421287, 26845213, 53693007, 107366933, 214742391, 429498701, 858994271, 1718023109, 3435955975, 6871883645
Offset: 0

Views

Author

Kevin Ryde, Jan 15 2021

Keywords

Comments

Complex base i-1 of Khmelnik and Penney uses an integer m to represent a complex integer point z(m) = A318438(m) + A318439(m)*i. A340669(m) is the negation of z in this representation. a(n) is how many n-bit m are negatable within those n bits, i.e., how many m in the range 0 <= m < 2^n have also 0 <= A340669(m) < 2^n.
A geometric interpretation of a(n) is to draw a unit square around each point z(0) to z(2^n-1), rotate a copy by 180 degrees about the origin, and measure its area of intersection with the original.
The bit-flip rule in A340669 gives the recurrence formula below. A low 0-bit of m has a(n-1) negatables above it, or low 11 is one arbitrary bit then negatables above so 2*a(n-3), or low 01 is three arbitrary so 8*a(n-5). This can be thought of the number of compositions of n (partitions with order) into parts 1,3,5 with 2 types of part 3 and 8 types of part 5.

Examples

			For n=3, the a(3)=3 points of n bits are m = 0,3,7 < 2^n, which negate to A340669(0,3,7) = 0,7,3 < 2^n.  These m are located at z = 0,i,-i,
               negate        intersection
  z(0..7)    (rotate 180)   a(3) = 3 points
                * *
   * *            * *             *
     o *        * o               o
   * *            * *             *
     * *
		

Crossrefs

Programs

  • PARI
    { my(table=[4,-2,-2,6, -4,2,2,-6], p=Mod('x,2-'x+'x^2));
    a(n) = (6<
    				

Formula

a(n) = a(n-1) + 2*a(n-3) + 8*a(n-5).
a(n) = (2/5)*2^n + (h/15)*2^floor(n/2) + (2/3)*Im((1/2 + i*sqrt(7)/2)^(n+1)) where h = 4,-2,-2,6, -4,2,2,-6 according as n == 0 to 7 (mod 8) respectively.
a(n) = (2/5)*2^n + (1/3)*A107920(n+1) + (1/15)*A078069(n+2).
G.f.: 1/(1 - x - 2*x^3 - 8*x^5).
G.f.: (2/5)/(1-2*x) + (1/3)/(1-x+2*x^2) + (2/15)*(2+3*x)/(1+2*x+2*x^2).

A106664 Expansion of g.f.: (1-3*x+x^2)/((1-x)*(1+x)*(1-2*x+2*x^2)).

Original entry on oeis.org

-1, 1, 2, 5, 4, 1, -8, -15, -16, 1, 32, 65, 64, 1, -128, -255, -256, 1, 512, 1025, 1024, 1, -2048, -4095, -4096, 1, 8192, 16385, 16384, 1, -32768, -65535, -65536, 1, 131072, 262145, 262144, 1, -524288, -1048575, -1048576, 1, 2097152, 4194305, 4194304, 1, -8388608, -16777215, -16777216, 1, 33554432
Offset: 0

Views

Author

Creighton Dement, May 13 2005

Keywords

Comments

Superseeker finds that a(n+2) - a(n) = A090131(n+1) (or with different signs, see A078069).
Floretion Algebra Multiplication Program, FAMP Code: 2ibaseiseq[ + .5'i + .5i' - .5'ii' + .5'jj' + .5'kk' + .5e]

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!(  (1-3*x+x^2)/((1-x^2)*(1-2*x+2*x^2)) )); // G. C. Greubel, Sep 08 2021
    
  • Mathematica
    CoefficientList[Series[(1-3x+x^2)/((1-x)(1+x)(1-2x+2x^2)),{x,0,60}],x] (* Harvey P. Dale, Mar 20 2013 *)
  • SageMath
    def A106664_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( sinh(x) -exp(x)*(cos(x)-sin(x)) ).egf_to_ogf().list()
    A106664_list(50) # G. C. Greubel, Sep 08 2021

Formula

a(n) = (1/2)*(A010673(n) - A099087(n+2)).
a(n) = (1/2)*(1 - (-1)^n - (1-i)^(n+1) - (1+i)^(n+1)), with i=sqrt(-1). - Ralf Stephan, Nov 16 2010
From G. C. Greubel, Sep 08 2021: (Start)
a(n) = (1-(-1)^n)/2 - 2^((n+1)/2)*cos((n+1)*Pi/4).
a(n) = A000035(n) - A146559(n).
E.g.f.: sinh(x) - exp(x)*(cos(x) - sin(x)). (End)
Showing 1-6 of 6 results.