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

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

Original entry on oeis.org

1, 2, 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649, 4294967297, 8589934593
Offset: 0

Views

Author

Paul Barry, Apr 28 2004

Keywords

Comments

Partial sum of 1,1,1,2,4,8,...
Binomial transform of abs(A073097).
Binomial transform is A094374.
Partial sums are in A006127. - Paul Barry, Aug 05 2004
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 2, 8, 32 and 128, lead to this sequence. For the central square these vectors lead to the companion sequence A011782. - Johannes W. Meijer, Aug 15 2010
This sequence has a(0) = 1 and for all n > 0, a(n) = 2^(n-1)+1. Consequently 2*a(n) >= a(n+1) for all n > 0 and the sequence is complete. - Frank M Jackson, Jan 29 2012
Row lengths of the triangle in A198069. - Reinhard Zumkeller, May 26 2013
Take A007843 and count the repeated values. The result is 1,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,.... Build a third sequence, where a(1) = 1 and a(n) equals the length (greater than 1) of the shortest palindromic subsequence of consecutive terms of the second sequence starting with a(n) of the second sequence. The third sequence starts 1,3,5,3,9,3,5,3,17,3,5,3,9,3,5,3,33,.... Conjecturally, in the third sequence: (1) the indices of the first occurrence of each value form the present sequence and (2) for n>1, a(n) is in the a(n-1)-th position. - Ivan N. Ianakiev, Aug 20 2019

Examples

			G.f. = 1 + 2*x + 3*x^2 + 5*x^3 + 9*x^4 + 17*x^5 + 33*x^6 + 65*x^7 + ...
		

Crossrefs

Apart from the initial 1, identical to A000051.
Cf. A135225.
Column k=1 of A152977.
Row n=2 of A238016.

Programs

  • GAP
    a:=[2,3];; for n in [3..40] do a[n]:=3*a[n-1]-2*a[n-2]; od; Concatenation([1], a); # G. C. Greubel, Nov 06 2019
  • Magma
    [(2^n-0^n)/2+1: n in [0..40]]; // Vincenzo Librandi, Jun 10 2011
    
  • Magma
    R:=PowerSeriesRing(Integers(), 35); Coefficients(R!( (1-x-x^2)/((1-x)*(1-2*x)))); // Marius A. Burtea, Oct 25 2019
    
  • Maple
    1, seq((2^n - 0^n)/2 +1, n=1..40); # G. C. Greubel, Nov 06 2019
  • Mathematica
    CoefficientList[Series[(1-x-x^2)/((1-x)*(1-2*x)), {x, 0, 40}], x] (* or *) Join[{1}, LinearRecurrence[{3, -2}, {2, 3}, 40]] (* Vladimir Joseph Stephan Orlovsky, Jan 22 2012 *)
    a[ n_]:= If[n<0, 0, 1 + Quotient[2^n, 2]]; (* Michael Somos, May 26 2014 *)
    a[ n_]:= SeriesCoefficient[(1-x-x^2)/((1-x)(1-2x)), {x, 0, n}]; (* Michael Somos, May 26 2014 *)
    LinearRecurrence[{3,-2},{1,2,3},40] (* Harvey P. Dale, Aug 09 2015 *)
  • PARI
    a(n)=2^n\2+1 \\ Charles R Greathouse IV, Apr 05 2013
    
  • PARI
    Vec((1-x-x^2)/((1-x)*(1-2*x))+O(x^40)) \\ Charles R Greathouse IV, Apr 05 2013
    
  • Sage
    [(2^n - 0^n)/2 + 1 for n in (0..40)] # G. C. Greubel, Nov 06 2019
    

Formula

a(n) = (2^n - 0^n)/2 + 1.
a(n) = 3*a(n-1) - 2*a(n-2).
a(2*n) = 2*a(2*n-1) - 1, n>0.
Row sums of triangle A135225. - Gary W. Adamson, Nov 23 2007
a(n) = A131577(n) + 1. - Paul Curtz, Aug 07 2008
a(n) = 2*a(n-1) - 1 for n>1, a(0)=1, a(1)=2. - Philippe Deléham, Sep 25 2009
E.g.f.: exp(x)*(1 + sinh(x)). - Arkadiusz Wesolowski, Aug 13 2012
G.f.: G(0), where G(k)= 1 + 2^k*x/(1 - x/(x + 2^k*x/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 26 2013
a(n) = 2^(n-1) +1 = A000051(n-1) for n>0. - M. F. Hasler, Sep 22 2013

A091337 a(n) = (2/n), where (k/n) is the Kronecker symbol.

Original entry on oeis.org

0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1
Offset: 0

Views

Author

Eric W. Weisstein, Dec 30 2003

Keywords

Comments

Sinh(1) in 'reflected factorial' base is 1.01010101010101010101010101010101010101010101... see A073097 for cosh(1). - Robert G. Wilson v, May 04 2005
A non-principal character for the Dirichlet L-series modulo 8, see arXiv:1008.2547 and L-values Sum_{n >= 1} a(n)/n^s in eq (318) by Jolley. - R. J. Mathar, Oct 06 2011 [The other two non-principal characters are A101455 = {(-4/n)} and A188510 = {(-2/n)}. - Jianing Song, Nov 14 2024]
Period 8: repeat [0, 1, 0, -1, 0, -1, 0, 1]. - Wesley Ivan Hurt, Sep 07 2015 [Adapted by Jianing Song, Nov 14 2024 to include a(0) = 0.]
a(n) = (2^(2i+1)/n), where (k/n) is the Kronecker symbol and i >= 0. - A.H.M. Smeets, Jan 23 2018

Examples

			G.f. = x - x^3 - x^5 + x^7 + x^9 - x^11 - x^13 + x^15 + x^17 - x^19 - x^21 + ...
		

References

  • L. B. W. Jolley, Summation of series, Dover (1961).

Crossrefs

Kronecker symbols {(d/n)} where d is a fundamental discriminant with |d| <= 24: A109017 (d=-24), A011586 (d=-23), A289741 (d=-20), A011585 (d=-19), A316569 (d=-15), A011582 (d=-11), A188510 (d=-8), A175629 (d=-7), A101455 (d=-4), A102283 (d=-3), A080891 (d=5), this sequence (d=8), A110161 (d=12), A011583 (d=13), A011584 (d=17), A322829 (d=21), A322796 (d=24).

Programs

  • Magma
    [(n mod 2) * (-1)^((n+1) div 4)  : n in [1..100]]; // Vincenzo Librandi, Oct 31 2014
  • Maple
    A091337:= n -> [0, 1, 0, -1, 0, -1, 0, 1][(n mod 8)+1]: seq(A091337(n), n=1..100); # Wesley Ivan Hurt, Sep 07 2015
  • Mathematica
    KroneckerSymbol[Range[100], 2] (* Alonso del Arte, Oct 30 2014 *)
  • PARI
    {a(n) = (n%2) * (-1)^((n+1)\4)}; /* Michael Somos, Sep 10 2005 */
    
  • PARI
    {a(n) = kronecker( 2, n)}; /* Michael Somos, Sep 10 2005 */
    
  • PARI
    {a(n) = [0, 1, 0, -1, 0, -1, 0, 1][n%8 + 1]}; /* Michael Somos, Jul 17 2009 */
    

Formula

Euler transform of length 8 sequence [0, -1, 0, -1, 0, 0, 0, 1]. - Michael Somos, Jul 17 2009
a(n) is multiplicative with a(2^e) = 0^e, a(p^e) = 1 if p == 1, 7 (mod 8), a(p^e) = (-1)^e if p == 3, 5 (mod 8). - Michael Somos, Jul 17 2009
G.f.: x*(1 - x^2)/(1 + x^4). a(n) = -a(n + 4) = a(-n) for all n in Z. a(2*n) = 0. a(2*n + 1) = A087960(n). - Michael Somos, Apr 10 2011
Transform of Pell numbers A000129 by the Riordan array A102587. - Paul Barry, Jul 14 2005
a(n) = (2/n) = (n/2), Charles R Greathouse IV explained. - Alonso del Arte, Oct 31 2014
a(n) = (1 - (-1)^n)*(-1)^(n/4 - 1/8 - (-1)^n/8 + (-1)^((2*n + 1 - (-1)^n)/4)/4)/2. - Wesley Ivan Hurt, Sep 07 2015
From Jianing Song, Nov 14 2018: (Start)
a(n) = sqrt(2)*sin(Pi*n/2)*sin(Pi*n/4).
E.g.f.: sqrt(2)*cos(x/sqrt(2))*sinh(x/sqrt(2)).
Moebius transform of A035185.
a(n) = A101455(n)*A188510(n). (End)
a(n) = Sum_{i=1..n} (-1)^(i + floor((i-3)/4)). - Wesley Ivan Hurt, Apr 27 2020
Sum_{n>=1} a(n)/n = A196525. Sum_{n>=1} a(n)/n^2 = A328895. Sum_{n>=1} a(n)/n^3 = A329715. Sum_{n>=1} a(n)/n^4 = A346728. - R. J. Mathar, Dec 17 2024

Extensions

a(0) prepended by Jianing Song, Nov 14 2024

A117569 Expansion of (1+x+x^2)/(1+x^2).

Original entry on oeis.org

1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0
Offset: 0

Views

Author

Paul Barry, Mar 29 2006

Keywords

Comments

Row sums of A117568.

Examples

			1 + x - x^3 + x^5 - x^7 + x^9 - x^11 + x^13 - x^15 + x^17 - x^19 + ...
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+x+x^2)/(1+x^2),{x,0,120}],x] (* or *) LinearRecurrence[{0,-1},{1,1,0},120] (* or *) PadRight[{1},120,{0,1,0,-1}] (* Harvey P. Dale, Dec 12 2016 *)
  • PARI
    a(n) = (n==0) + [0, 1, 0, -1][n%4 + 1] /* Michael Somos, Aug 04 2009 */
    
  • PARI
    a(n) = (n==0) + kronecker( -4, n) /* Michael Somos, Aug 04 2009 */

Formula

G.f.: (1-x^3)/((1-x)(1+x^2)); a(n)=0^n+(1-(-1)^n)(cos(pi*n/2)+sin(pi*n/2))/2;
a(n) = A101455(n), n>0. - R. J. Mathar, Aug 10 2008
Expansion of (1 - x^2) * (1 - x^3) / ((1 - x) * (1 - x^4)) in powers of x.
G.f.: 1 / (1 - x / (1 + x / (1 - x / (1 + x)))). - Michael Somos, Apr 02 2012
Euler transform of length 4 sequence [ 1, -1, -1, 1]. - Michael Somos, Aug 04 2009
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = v - u * (2 - u) * (2*v - 1).
a(n) is completely multiplicative with a(2^e) = 0^e, a(p^e) = 1 if p == 1 (mod 4), a(p^e) = (-1)^e if p == 3 (mod 4).
a(2*n) = 0 unless n=0, a(4*n + 3) = -1, a(4*n + 1) = a(0) = 1.
a(-n) = -a(n) unless n=0. a(n+2) = -a(n) unless n=0 or n=-2.
a(n) = -A163805(n) unless n=0. a(n) = (-1)^n * A163805(n). Convolution inverse of A163804.
E.g.f.: 1 + sin(x). - Arkadiusz Wesolowski, Aug 13 2012
a(n) = floor(1/(n+1)) + (1-(-1)^n)/2*(-1)^((n-1)/2). - Tani Akinari, Nov 09 2012
Showing 1-3 of 3 results.