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-10 of 123 results. Next

A130481 a(n) = Sum_{k=0..n} (k mod 3) (i.e., partial sums of A010872).

Original entry on oeis.org

0, 1, 3, 3, 4, 6, 6, 7, 9, 9, 10, 12, 12, 13, 15, 15, 16, 18, 18, 19, 21, 21, 22, 24, 24, 25, 27, 27, 28, 30, 30, 31, 33, 33, 34, 36, 36, 37, 39, 39, 40, 42, 42, 43, 45, 45, 46, 48, 48, 49, 51, 51, 52, 54, 54, 55, 57, 57, 58, 60, 60, 61, 63, 63, 64, 66, 66, 67, 69, 69, 70, 72, 72
Offset: 0

Views

Author

Hieronymus Fischer, May 29 2007

Keywords

Comments

Essentially the same as A092200. - R. J. Mathar, Jun 13 2008
Let A be the Hessenberg n X n matrix defined by: A[1,j]=j mod 3, A[i,i]:=1, A[i,i-1]=-1. Then, for n>=1, a(n)=det(A). - Milan Janjic, Jan 24 2010
2-adic valuation of A104537(n+1). - Gerry Martens, Jul 14 2015
Conjecture: a(n) is the exponent of the largest power of 2 that divides all the entries of the matrix {{3,1},{1,-1}}^n. - Greg Dresden, Sep 09 2018

Crossrefs

Programs

  • GAP
    List([0..80], n-> Int((n+1)/3) + Int(2*(n+1)/3)); # G. C. Greubel, Aug 31 2019
  • Magma
    [Floor((n+1)/3) + Floor(2*(n+1)/3): n in [0..80]]; // G. C. Greubel, Aug 31 2019
    
  • Maple
    seq(coeff(series(x*(1+2*x)/((1-x^3)*(1-x)), x, n+1), x, n), n = 0..80); # G. C. Greubel, Aug 31 2019
  • Mathematica
    a[n_]:= Floor[(n+1)/3] + Floor[2(n+1)/3]; Table[a[n], {n, 0, 80}] (* Clark Kimberling, May 28 2012 *)
    a[n_]:= IntegerExponent[A104537[n + 1], 2];
    Table[a[n], {n, 0, 80}]  (* Gerry Martens, Jul 14 2015 *)
    CoefficientList[Series[x(1+2x)/((1-x^3)(1-x)), {x, 0, 80}], x] (* Stefano Spezia, Sep 09 2018 *)
    LinearRecurrence[{1,0,1,-1},{0,1,3,3},100] (* Harvey P. Dale, Jun 14 2021 *)
  • PARI
    main(size)=my(n,k);vector(size,n,sum(k=0,n,k%3)) \\ Anders Hellström, Jul 14 2015
    
  • PARI
    first(n)=my(s); concat(0, vector(n,k,s+=k%3)) \\ Charles R Greathouse IV, Jul 14 2015
    
  • PARI
    a(n)=n\3*3+[0,1,3][n%3+1] \\ Charles R Greathouse IV, Jul 14 2015
    
  • Sage
    def A130481_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1+2*x)/((1-x^3)*(1-x))).list()
    A130481_list(80) # G. C. Greubel, Aug 31 2019
    

Formula

a(n) = 3*floor(n/3) + A010872(n)*(A010872(n) + 1)/2.
G.f.: x*(1 + 2*x)/((1-x^3)*(1-x)).
a(n) = n + 1 - (Fibonacci(n+1) mod 2). - Gary Detlefs, Mar 13 2011
a(n) = floor((n+1)/3) + floor(2*(n+1)/3). - Clark Kimberling, May 28 2010
a(n) = n when n+1 is not a multiple of 3, and a(n) = n+1 when n+1 is a multiple of 3. - Dennis P. Walsh, Aug 06 2012
a(n) = n + 1 - sign((n+1) mod 3). - Wesley Ivan Hurt, Sep 25 2017
a(n) = n + (1-cos(2*(n+2)*Pi/3))/3 + sin(2*(n+2)*Pi/3)/sqrt(3). - Wesley Ivan Hurt, Sep 27 2017
a(n) = n + 1 - (n+1)^2 mod 3. - Ammar Khatab, Aug 14 2020
E.g.f.: ((1 + 3*x)*cosh(x) - (cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))*(cosh(x/2) - sinh(x/2)) + (1 + 3*x)*sinh(x))/3. - Stefano Spezia, May 28 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)) + log(2)/3. - Amiram Eldar, Sep 17 2022

A293450 Restricted growth sequence transform of (3*A293225(n) + A010872(n)), a filter combining (n mod 3) with two products, the other formed from the 1-digits (A293221) and the other from the 2-digits (A293222) present in the ternary expansions of proper divisors of n.

Original entry on oeis.org

1, 2, 3, 4, 2, 5, 6, 7, 8, 9, 2, 10, 6, 11, 12, 13, 2, 14, 6, 15, 16, 17, 2, 18, 19, 20, 21, 22, 2, 23, 6, 24, 25, 26, 27, 28, 6, 29, 30, 31, 2, 32, 6, 33, 34, 35, 2, 36, 37, 38, 14, 39, 2, 40, 41, 42, 43, 44, 2, 45, 6, 46, 47, 48, 49, 50, 6, 51, 52, 53, 2, 54, 6, 55, 56, 57, 58, 59, 6, 60, 61, 62, 2, 63, 64, 65, 66, 67, 2
Offset: 1

Views

Author

Antti Karttunen, Nov 06 2017

Keywords

Crossrefs

Programs

  • PARI
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ This function from M. F. Hasler
    A289813(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==1, 1, 0)), 2); };
    A289814(n) = { my (d=digits(n, 3)); from digits(vector(#d, i, if (d[i]==2, 1, 0)), 2); };
    A293221(n) = { my(m=1); fordiv(n,d,if(d < n,m *= A019565(A289813(d)))); m; };
    A293222(n) = { my(m=1); fordiv(n,d,if(d < n,m *= A019565(A289814(d)))); m; };
    Anot_submitted(n) = (1/2)*(2 + ((A293222(n) + A293221(n))^2) - A293222(n) - 3*A293221(n)); \\ Eq.class-wise equal to A293225.
    Anot2submitted(n) = ((3*Anot_submitted(n))+(n%3));
    write_to_bfile(1,rgs_transform(vector(59049,n,Anot2submitted(n))),"b293450.txt");

Formula

For all i, j: a(i) = a(j) => A002324(i) = A002324(j).

A004526 Nonnegative integers repeated, floor(n/2).

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36
Offset: 0

Views

Author

Keywords

Comments

Number of elements in the set {k: 1 <= 2k <= n}.
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(2).
Dimension of the space of weight 1 modular forms for Gamma_1(n+1).
Number of ways 2^n is expressible as r^2 - s^2 with s > 0. Proof: (r+s) and (r-s) both should be powers of 2, even and distinct hence a(2k) = a(2k-1) = (k-1) etc. - Amarnath Murthy, Sep 20 2002
Lengths of sides of Ulam square spiral; i.e., lengths of runs of equal terms in A063826. - Donald S. McDonald, Jan 09 2003
Number of partitions of n into two parts. A008619 gives partitions of n into at most two parts, so A008619(n) = a(n) + 1 for all n >= 0. Partial sums are A002620 (Quarter-squares). - Rick L. Shepherd, Feb 27 2004
a(n+1) is the number of 1's in the binary expansion of the Jacobsthal number A001045(n). - Paul Barry, Jan 13 2005
Number of partitions of n+1 into two distinct (nonzero) parts. Example: a(8) = 4 because we have [8,1],[7,2],[6,3] and [5,4]. - Emeric Deutsch, Apr 14 2006
Complement of A000035, since A000035(n)+2*a(n) = n. Also equal to the partial sums of A000035. - Hieronymus Fischer, Jun 01 2007
Number of binary bracelets of n beads, two of them 0. For n >= 2, a(n-2) is the number of binary bracelets of n beads, two of them 0, with 00 prohibited. - Washington Bomfim, Aug 27 2008
Let A be the Hessenberg n X n matrix defined by: A[1,j] = j mod 2, A[i,i]:=1, A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n+1) = (-1)^n det(A). - Milan Janjic, Jan 24 2010
From Clark Kimberling, Mar 10 2011: (Start)
Let RT abbreviate rank transform (A187224). Then
RT(this sequence) = A187484;
RT(this sequence without 1st term) = A026371;
RT(this sequence without 1st 2 terms) = A026367;
RT(this sequence without 1st 3 terms) = A026363. (End)
The diameter (longest path) of the n-cycle. - Cade Herron, Apr 14 2011
For n >= 3, a(n-1) is the number of two-color bracelets of n beads, three of them are black, having a diameter of symmetry. - Vladimir Shevelev, May 03 2011
Pelesko (2004) refers erroneously to this sequence instead of A008619. - M. F. Hasler, Jul 19 2012
Number of degree 2 irreducible characters of the dihedral group of order 2(n+1). - Eric M. Schmidt, Feb 12 2013
For n >= 3 the sequence a(n-1) is the number of non-congruent regions with infinite area in the exterior of a regular n-gon with all diagonals drawn. See A217748. - Martin Renner, Mar 23 2013
a(n) is the number of partitions of 2n into exactly 2 even parts. a(n+1) is the number of partitions of 2n into exactly 2 odd parts. This just rephrases the comment of E. Deutsch above. - Wesley Ivan Hurt, Jun 08 2013
Number of the distinct rectangles and square in a regular n-gon is a(n/2) for even n and n >= 4. For odd n, such number is zero, see illustration in link. - Kival Ngaokrajang, Jun 25 2013
x-coordinate from the image of the point (0,-1) after n reflections across the lines y = n and y = x respectively (alternating so that one reflection is applied on each step): (0,-1) -> (0,1) -> (1,0) -> (1,2) -> (2,1) -> (2,3) -> ... . - Wesley Ivan Hurt, Jul 12 2013
a(n) is the number of partitions of 2n into exactly two distinct odd parts. a(n-1) is the number of partitions of 2n into exactly two distinct even parts, n > 0. - Wesley Ivan Hurt, Jul 21 2013
a(n) is the number of permutations of length n avoiding 213, 231 and 312, or avoiding 213, 312 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
Also a(n) is the number of different patterns of 2-color, 2-partition of n. - Ctibor O. Zizka, Nov 19 2014
Minimum in- and out-degree for a directed K_n (see link). - Jon Perry, Nov 22 2014
a(n) is also the independence number of the triangular graph T(n). - Luis Manuel Rivera Martínez, Mar 12 2015
For n >= 3, a(n+4) is the least positive integer m such that every m-element subset of {1,2,...,n} contains distinct i, j, k with i + j = k (equivalently, with i - j = k). - Rick L. Shepherd, Jan 24 2016
More generally, the ordinary generating function for the integers repeated k times is x^k/((1 - x)(1 - x^k)). - Ilya Gutkovskiy, Mar 21 2016
a(n) is the number of numbers of the form F(i)*F(j) between F(n+3) and F(n+4), where 2 < i < j and F = A000045 (Fibonacci numbers). - Clark Kimberling, May 02 2016
The arithmetic function v_2(n,2) as defined in A289187. - Robert Price, Aug 22 2017
a(n) is also the total domination number of the (n-3)-gear graph. - Eric W. Weisstein, Apr 07 2018
Consider the numbers 1, 2, ..., n; a(n) is the largest integer t such that these numbers can be arranged in a row so that all consecutive terms differ by at least t. Example: a(6) = a(7) = 3, because of respectively (4, 1, 5, 2, 6, 3) and (1, 5, 2, 6, 3, 7, 4) (see link BMO - Problem 2). - Bernard Schott, Mar 07 2020
a(n-1) is also the number of integer-sided triangles whose sides a < b < c are in arithmetic progression with a middle side b = n (see A307136). Example, for b = 4, there exists a(3) = 1 such triangle corresponding to Pythagorean triple (3, 4, 5). For the triples, miscellaneous properties and references, see A336750. - Bernard Schott, Oct 15 2020
For n >= 1, a(n-1) is the greatest remainder on division of n by any k in 1..n. - David James Sycamore, Sep 05 2021
Number of incongruent right triangles that can be formed from the vertices of a regular n-gon is given by a(n/2) for n even. For n odd such number is zero. For a regular n-gon, the number of incongruent triangles formed from its vertices is given by A069905(n). The number of incongruent acute triangles is given by A005044(n). The number of incongruent obtuse triangles is given by A008642(n-4) for n > 3 otherwise 0, with offset 0. - Frank M Jackson, Nov 26 2022
The inverse binomial transform is 0, 0, 1, -2, 4, -8, 16, -32, ... (see A122803). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = x^2 + x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 4*x^8 + 4*x^9 + 5*x^10 + ...
		

References

  • G. L. Alexanderson et al., The William Powell Putnam Mathematical Competition - Problems and Solutions: 1965-1984, M.A.A., 1985; see Problem A-1 of 27th Competition.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 120, P(n,2).
  • Graham, Knuth and Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1989, page 77 (partitions of n into at most 2 parts).

Crossrefs

a(n+2) = A008619(n). See A008619 for more references.
A001477(n) = a(n+1)+a(n). A000035(n) = a(n+1)-A002456(n).
a(n) = A008284(n, 2), n >= 1.
Zero followed by the partial sums of A000035.
Column 2 of triangle A094953. Second row of A180969.
Partial sums: A002620. Other related sequences: A010872, A010873, A010874.
Cf. similar sequences of the integers repeated k times: A001477 (k = 1), this sequence (k = 2), A002264 (k = 3), A002265 (k = 4), A002266 (k = 5), A152467 (k = 6), A132270 (k = 7), A132292 (k = 8), A059995 (k = 10).
Cf. A289187, A139756 (binomial transf).

Programs

  • Haskell
    a004526 = (`div` 2)
    a004526_list = concatMap (\x -> [x, x]) [0..]
    -- Reinhard Zumkeller, Jul 27 2012
    
  • Magma
    [Floor(n/2): n in [0..100]]; // Vincenzo Librandi, Nov 19 2014
    
  • Maple
    A004526 := n->floor(n/2); seq(floor(i/2),i=0..50);
  • Mathematica
    Table[(2n - 1)/4 + (-1)^n/4, {n, 0, 70}] (* Stefan Steinerberger, Apr 02 2006 *)
    f[n_] := If[OddQ[n], (n - 1)/2, n/2]; Array[f, 74, 0] (* Robert G. Wilson v, Apr 20 2012 *)
    With[{c=Range[0,40]},Riffle[c,c]] (* Harvey P. Dale, Aug 26 2013 *)
    CoefficientList[Series[x^2/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *)
    LinearRecurrence[{1, 1, -1}, {0, 0, 1}, 75] (* Robert G. Wilson v, Feb 05 2015 *)
    Floor[Range[0, 40]/2] (* Eric W. Weisstein, Apr 07 2018 *)
  • Maxima
    makelist(floor(n/2),n,0,50); /* Martin Ettl, Oct 17 2012 */
    
  • PARI
    a(n)=n\2 /* Jaume Oliver Lafont, Mar 25 2009 */
    
  • PARI
    x='x+O('x^100); concat([0, 0], Vec(x^2/((1+x)*(x-1)^2))) \\ Altug Alkan, Mar 21 2016
    
  • Python
    def a(n): return n//2
    print([a(n) for n in range(74)]) # Michael S. Branicky, Apr 30 2022
  • Sage
    def a(n) : return( dimension_cusp_forms( Gamma0(2), 2*n+4) ); # Michael Somos, Jul 03 2014
    
  • Sage
    def a(n) : return( dimension_modular_forms( Gamma1(n+1), 1) ); # Michael Somos, Jul 03 2014
    

Formula

G.f.: x^2/((1+x)*(x-1)^2).
a(n) = floor(n/2).
a(n) = ceiling((n+1)/2). - Eric W. Weisstein, Jan 11 2024
a(n) = 1 + a(n-2).
a(n) = a(n-1) + a(n-2) - a(n-3).
a(2*n) = a(2*n+1) = n.
a(n+1) = n - a(n). - Henry Bottomley, Jul 25 2001
For n > 0, a(n) = Sum_{i=1..n} (1/2)/cos(Pi*(2*i-(1-(-1)^n)/2)/(2*n+1)). - Benoit Cloitre, Oct 11 2002
a(n) = (2*n-1)/4 + (-1)^n/4; a(n+1) = Sum_{k=0..n} k*(-1)^(n+k). - Paul Barry, May 20 2003
E.g.f.: ((2*x-1)*exp(x) + exp(-x))/4. - Paul Barry, Sep 03 2003
G.f.: (1/(1-x)) * Sum_{k >= 0} t^2/(1-t^4) where t = x^2^k. - Ralf Stephan, Feb 24 2004
a(n+1) = A000120(A001045(n)). - Paul Barry, Jan 13 2005
a(n) = (n-(1-(-1)^n)/2)/2 = (1/2)*(n-|sin(n*Pi/2)|). Likewise: a(n) = (n-A000035(n))/2. Also: a(n) = Sum_{k=0..n} A000035(k). - Hieronymus Fischer, Jun 01 2007
The expression floor((x^2-1)/(2*x)) (x >= 1) produces this sequence. - Mohammad K. Azarian, Nov 08 2007; corrected by M. F. Hasler, Nov 17 2008
a(n+1) = A002378(n) - A035608(n). - Reinhard Zumkeller, Jan 27 2010
a(n+1) = A002620(n+1) - A002620(n) = floor((n+1)/2)*ceiling((n+1)/2) - floor(n^2/4). - Jonathan Vos Post, May 20 2010
For n >= 2, a(n) = floor(log_2(2^a(n-1) + 2^a(n-2))). - Vladimir Shevelev, Jun 22 2010
a(n) = A180969(2,n). - Adriano Caroli, Nov 24 2010
A001057(n-1) = (-1)^n*a(n), n > 0. - M. F. Hasler, Jul 19 2012
a(n) = A008615(n) + A002264(n). - Reinhard Zumkeller, Apr 28 2014
Euler transform of length 2 sequence [1, 1]. - Michael Somos, Jul 03 2014

Extensions

Partially edited by Joerg Arndt, Mar 11 2010, and M. F. Hasler, Jul 19 2012

A010888 Digital root of n (repeatedly add the digits of n until a single digit is reached).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5
Offset: 0

Views

Author

Keywords

Comments

This is sometimes also called the additive digital root of n.
n mod 9 (A010878) is a very similar sequence.
Partial sums are given by A130487(n-1) + n (for n > 0). - Hieronymus Fischer, Jun 08 2007
Decimal expansion of 13717421/111111111 is 0.123456789123456789123456789... with period 9. - Eric Desbiaux, May 19 2008
Decimal expansion of 13717421 / 1111111110 = 0.0[123456789] (periodic) - Daniel Forgues, Feb 27 2017
a(A005117(n)) < 9. - Reinhard Zumkeller, Mar 30 2010
My friend Jahangeer Kholdi has found that 19 is the smallest prime p such that for each number n, a(p*n) = a(n). In fact we have: a(m*n) = a(a(m)*a(n)) so all numbers with digital root 1 (numbers of the form 9k + 1) have this property. See comment lines of A017173. Also we have a(m+n) = a(a(m) + a(n)). - Farideh Firoozbakht, Jul 23 2010

Examples

			The digits of 37 are 3 and 7, and 3 + 7 = 10. And the digits of 10 are 1 and 0, and 1 + 0 = 1, so a(37) = 1.
		

References

  • Martin Gardner, Mathematics, Magic and Mystery, 1956.

Crossrefs

Cf. A007953, A007954, A031347, A113217, A113218, A010878 (n mod 9), A010872, A010873, A010874, A010875, A010876, A010877, A010879, A004526, A002264, A002265, A002266, A017173, A031286 (additive persistence of n), (multiplicative digital root of n), A031346 (multiplicative persistence of n).

Programs

Formula

If n = 0 then a(n) = 0; otherwise a(n) = (n reduced mod 9), but if the answer is 0 change it to 9.
Equivalently, if n = 0 then a(n) = 0, otherwise a(n) = (n - 1 reduced mod 9) + 1.
If the initial 0 term is ignored, the sequence is periodic with period 9.
From Hieronymus Fischer, Jun 08 2007: (Start)
a(n) = A010878(n-1) + 1 (for n > 0).
G.f.: g(x) = x*(Sum_{k = 0..8}(k+1)*x^k)/(1 - x^9). Also: g(x) = x(9x^10 - 10x^9 + 1)/((1 - x^9)(1 - x)^2). (End)
a(n) = n - 9*floor((n-1)/9), for n > 0. - José de Jesús Camacho Medina, Nov 10 2014

A002264 Nonnegative integers repeated 3 times.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25
Offset: 0

Views

Author

Keywords

Comments

Complement of A010872, since A010872(n) + 3*a(n) = n. - Hieronymus Fischer, Jun 01 2007
Chvátal proved that, given an arbitrary n-gon, there exist a(n) points such that all points in the interior are visible from at least one of those points; further, for all n >= 3, there exists an n-gon which cannot be covered in this fashion with fewer than a(n) points. This is known as the "art gallery problem". - Charles R Greathouse IV, Aug 29 2012
The inverse binomial transform is 0, 0, 0, 1, -3, 6, -9, 9, 0, -27, 81, -162, 243, -243, 0, 729,.. (see A000748). - R. J. Mathar, Feb 25 2023

Crossrefs

Partial sums give A130518.
Cf. A004523 interlaced with A004396.
Apart from the zeros, this is column 3 of A235791.

Programs

  • Haskell
    a002264 n = a002264_list !! n
    a002264_list = 0 : 0 : 0 : map (+ 1) a002264_list
    -- Reinhard Zumkeller, Nov 06 2012, Apr 16 2012
    
  • Magma
    [Floor(n/3): n in [0..100]]; // Vincenzo Librandi, Apr 29 2015
    
  • Magma
    &cat [[n,n,n]: n in [0..30]]; // Bruno Berselli, Apr 29 2015
  • Maple
    seq(i$3,i=0..100); # Robert Israel, Aug 04 2014
  • Mathematica
    Flatten[Table[{n, n, n}, {n, 0, 25}]] (* Harvey P. Dale, Jun 09 2013 *)
    Floor[Range[0, 20]/3] (* Eric W. Weisstein, Aug 12 2023 *)
    Table[Floor[n/3], {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *)
    Table[(n - Cos[2 (n - 2) Pi/3] + Sin[2 (n - 2) Pi/3]/Sqrt[3] - 1)/3, {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *)
    Table[(n - ChebyshevU[n - 2, -1/2] - 1)/3, {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *)
    LinearRecurrence[{1, 0, 1, -1}, {0, 0, 0, 1}, 20] (* Eric W. Weisstein, Aug 12 2023 *)
    CoefficientList[Series[x^3/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Aug 12 2023 *)
  • PARI
    a(n)=n\3  /* Jaume Oliver Lafont, Mar 25 2009 */
    
  • PARI
    v=[0,0];for(n=2,50,v=concat(v,n-2-v[#v]-v[#v-1]));v \\ Derek Orr, Apr 28 2015
    
  • Sage
    [floor(n/3) for n in range(0,79)] # Zerinvary Lajos, Dec 01 2009
    

Formula

a(n) = floor(n/3).
a(n) = (3*n-3-sqrt(3)*(1-2*cos(2*Pi*(n-1)/3))*sin(2*Pi*(n-1)/3))/9. - Hieronymus Fischer, Sep 18 2007
a(n) = (n - A010872(n))/3. - Hieronymus Fischer, Sep 18 2007
Complex representation: a(n) = (n - (1 - r^n)*(1 + r^n/(1 - r)))/3 where r = exp(2*Pi/3*i) = (-1 + sqrt(3)*i)/2 and i = sqrt(-1). - Hieronymus Fischer, Sep 18 2007; - corrected by Guenther Schrack, Sep 26 2019
a(n) = Sum_{k=0..n-1} A022003(k). - Hieronymus Fischer, Sep 18 2007
G.f.: x^3/((1-x)*(1-x^3)). - Hieronymus Fischer, Sep 18 2007
a(n) = (n - 1 + 2*sin(4*(n+2)*Pi/3)/sqrt(3))/3. - Jaume Oliver Lafont, Dec 05 2008
For n >= 3, a(n) = floor(log_3(3^a(n-1) + 3^a(n-2) + 3^a(n-3))). - Vladimir Shevelev, Jun 22 2010
a(n) = (n - 3 + A010872(n-1) + A010872(n-2))/3 using Zumkeller's 2008 formula in A010872. - Adriano Caroli, Nov 23 2010
a(n) = A004526(n) - A008615(n). - Reinhard Zumkeller, Apr 28 2014
a(2*n) = A004523(n) and a(2*n+1) = A004396(n). - L. Edson Jeffery, Jul 30 2014
a(n) = n - 2 - a(n-1) - a(n-2) for n > 1 with a(0) = a(1) = 0. - Derek Orr, Apr 28 2015
From Wesley Ivan Hurt, May 27 2015: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4), n > 4.
a(n) = (n - 1 + 0^((-1)^(n/3) - (-1)^n) - 0^((-1)^(n/3)*(-1)^(1/3) + (-1)^n))/3. (End)
a(n) = (3*n - 3 + r^n*(1 - r) + r^(2*n)*(r + 2))/9 where r = (-1 + sqrt(-3))/2. - Guenther Schrack, Sep 26 2019
E.g.f.: exp(x)*(x - 1)/3 + exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/9. - Stefano Spezia, Oct 17 2022

A002265 Nonnegative integers repeated 4 times.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19
Offset: 0

Views

Author

Keywords

Comments

For n>=1 and i=sqrt(-1) let F(n) the n X n matrix of the Discrete Fourier Transform (DFT) whose element (j,k) equals exp(-2*Pi*i*(j-1)*(k-1)/n)/sqrt(n). The multiplicities of the four eigenvalues 1, i, -1, -i of F(n) are a(n+4), a(n-1), a(n+2), a(n+1), hence a(n+4) + a(n-1) + a(n+2) + a(n+1) = n for n>=1. E.g., the multiplicities of the eigenvalues 1, i, -1, -i of the DFT-matrix F(4) are a(8)=2, a(3)=0, a(6)=1, a(5)=1, summing up to 4. - Franz Vrabec, Jan 21 2005
Complement of A010873, since A010873(n)+4*a(n)=n. - Hieronymus Fischer, Jun 01 2007
For even values of n, a(n) gives the number of partitions of n into exactly two parts with both parts even. - Wesley Ivan Hurt, Feb 06 2013
a(n-4) counts number of partitions of (n) into parts 1 and 4. For example a(11) = 3 with partitions (44111), (41111111), (11111111111). - David Neil McGrath, Dec 04 2014
a(n-4) counts walks (closed) on the graph G(1-vertex; 1-loop, 4-loop) where order of loops is unimportant. - David Neil McGrath, Dec 04 2014
Number of partitions of n into 4 parts whose smallest 3 parts are equal. - Wesley Ivan Hurt, Jan 17 2021

References

  • V. Cizek, Discrete Fourier Transforms and their Applications, Adam Hilger, Bristol 1986, p. 61.

Crossrefs

Zero followed by partial sums of A011765.
Partial sums: A130519. Other related sequences: A004526, A010872, A010873, A010874.
Third row of A180969.

Programs

Formula

a(n) = floor(n/4), n>=0;
G.f.: (x^4)/((1-x)*(1-x^4)).
a(n) = (2*n-(3-(-1)^n-2*(-1)^floor(n/2)))/8; also a(n) = (2*n-(3-(-1)^n-2*sin(Pi/4*(2*n+1+(-1)^n))))/8 = (n-A010873(n))/4. - Hieronymus Fischer, May 29 2007
a(n) = (1/4)*(n-(3-(-1)^n-2*(-1)^((2*n-1+(-1)^n)/4))/2). - Hieronymus Fischer, Jul 04 2007
a(n) = floor((n^4-1)/4*n^3) (n>=1); a(n) = floor((n^4-n^3)/(4*n^3-3*n^2)) (n>=1). - Mohammad K. Azarian, Nov 08 2007 and Aug 01 2009
For n>=4, a(n) = floor( log_4( 4^a(n-1) + 4^a(n-2) + 4^a(n-3) + 4^a(n-4) ) ). - Vladimir Shevelev, Jun 22 2010
a(n) = A180969(2,n). - Adriano Caroli, Nov 26 2010
a(n) = A173562(n)-A000290(n); a(n+2) = A035608(n)-A173562(n). - Reinhard Zumkeller, Feb 21 2010
a(n+1) = A140201(n) - A057353(n+1). - Reinhard Zumkeller, Feb 26 2011
a(n) = ceiling((n-3)/4), n >= 0. - Wesley Ivan Hurt, Jun 01 2013
a(n) = (2*n + (-1)^n + 2*sin(Pi*n/2) + 2*cos(Pi*n/2) - 3)/8. - Todd Silvestri, Oct 27 2014
E.g.f.: (x/4 - 3/8)*exp(x) + exp(-x)/8 + (sin(x)+cos(x))/4. - Robert Israel, Oct 30 2014
a(n) = a(n-1) + a(n-4) - a(n-5) with initial values a(3)=0, a(4)=1, a(5)=1, a(6)=1, a(7)=1. - David Neil McGrath, Dec 04 2014
a(n) = A004526(A004526(n)). - Bruno Berselli, Jul 01 2016
From Guenther Schrack, May 03 2019: (Start)
a(n) = (2*n - 3 + (-1)^n + 2*(-1)^(n*(n-1)/2))/8.
a(n) = a(n-4) + 1, a(k)=0 for k=0,1,2,3, for n > 3. (End)

A010057 a(n) = 1 if n is a cube, else 0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 15 1996

Keywords

Comments

Multiplicative with a(p^e) = 1 if 3 divides e, 0 otherwise. - Mitch Harris, Jun 09 2005
a(A000578(n)) = 1; a(A007412(n)) = 0. - Reinhard Zumkeller, Oct 22 2011
a(n) = A000007(sum(A010872(A124010(n,k))): k = 1..A001221(n)) for n > 0. - Reinhard Zumkeller, Jun 21 2013
If n has 4 divisors, a(n) = bigomega(n) - 2. - Wesley Ivan Hurt, Jun 06 2014

References

  • E. Landau, Elementary Number Theory, translation by Jacob E. Goodman of Elementare Zahlentheorie (Vol. I_1 (1927) of Vorlesungen ueber Zahlentheorie), by Edmund Landau, with added exercises by Paul T. Bateman and E. E. Kohlbecker, Chelsea Publishing Co., New York, 1958, pp. 31-32.

Crossrefs

Cf. A000578.
Cf. A003215. - Reinhard Zumkeller, Sep 27 2008

Programs

  • Haskell
    a010057 0 = 1
    a010057 n = fromEnum $ all ((== 0) . (`mod` 3)) $ a124010_row n
    a010057_list = concatMap (\x -> 1 : replicate (a003215 x - 1) 0) [0..]
    -- Reinhard Zumkeller, Jun 21 2013, Oct 22 2011
    
  • Maple
    A010057 := proc(n)
        if n = 0 then
            1;
        else
            for pe in ifactors(n)[2] do
                if modp(op(2,pe),3) <> 0 then
                    return 0 ;
                end if;
            end do:
        end if;
        1 ;
    end proc: # R. J. Mathar, Feb 07 2023
  • Mathematica
    Table[ Boole[ IntegerQ[n^(1/3)]], {n, 0, 80}] (* Jean-François Alcover, Jun 10 2013 *)
  • PARI
    a(n) = ispower(n, 3); \\ Michel Marcus, Feb 24 2015
    
  • Python
    from sympy import integer_nthroot
    def A010057(n): return int(integer_nthroot(n,3)[1]) # Chai Wah Wu, Apr 02 2021

Formula

Dirichlet generating function: zeta(3s). - Franklin T. Adams-Watters, Sep 11 2005
a(n) = f(n,0) with f(x,y) = if x>0 then f(x-3*y*(y+1),y+1) else 0^(-x). - Reinhard Zumkeller, Sep 27 2008
a(n) = 1 + floor(n^(1/3)) - ceiling(n^(1/3)). - Wesley Ivan Hurt, Jun 06 2014
a(n) = floor(n^(1/3)) - floor((n-1)^(1/3)). - Mikael Aaltonen, Feb 24 2015

A057079 Periodic sequence: repeat [1,2,1,-1,-2,-1]; expansion of (1+x)/(1-x+x^2).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Aug 04 2000

Keywords

Comments

Inverse binomial transform of A057083. Binomial transform of A061347. The sums of consecutive pairs of elements give A084103. - Paul Barry, May 15 2003
Hexaperiodic sequence identical to its third differences. - Paul Curtz, Dec 13 2007
a(n+1) is the Hankel transform of A001700(n+1)-A001700(n). - Paul Barry, Apr 21 2009
Non-simple continued fraction expansion of 1 = 1+1/(2+1/(1+1/(-1+...))). - R. J. Mathar, Mar 08 2012
Pisano period lengths: 1, 3, 2, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, ... - R. J. Mathar, Aug 10 2012
Alternating row sums of Riordan triangle A111125. - Wolfdieter Lang, Oct 18 2012
Periodic sequences of this type can be also calculated by a(n) = c + floor(q/(p^m-1)*p^n) mod p, where c is a constant, q is the number representing the periodic digit pattern and m is the period length. c, p and q can be calculated as follows: Let D be the array representing the number pattern to be repeated, m = size of D, max = maximum value of elements in D, min = minimum value of elements in D. Than c := min, p := max - min + 1 and q := p^m*sum_{i=1..m} (D(i)-min)/p^i. Example: D = (1, 2, 1, -1, -2, -1), c = -2, m = 6, p = 5 and q = 12276 for this sequence. - Hieronymus Fischer, Jan 04 2013

Examples

			G.f. = 1 + 2*x + x^2 - x^3 - 2*x^4 - x^5 + x^6 + 2*x^7 + x^8 - x^9 - 2*x^10 + x^11 + ...
		

Crossrefs

Cf. A049310. Apart from signs, same as A061347.

Programs

  • Maple
    A057079:=n->[1, 2, 1, -1, -2, -1][(n mod 6)+1]: seq(A057079(n), n=0..100); # Wesley Ivan Hurt, Mar 10 2015
  • Mathematica
    a[n_] := {1, 2, 1, -1, -2, -1}[[Mod[n, 6] + 1]]; Array[a, 100, 0] (* Jean-François Alcover, Jul 05 2013 *)
    CoefficientList[Series[(1 + x)/(1 - x + x^2), {x, 0, 71}], x] (* Michael De Vlieger, Jul 10 2017 *)
    PadRight[{},100,{1,2,1,-1,-2,-1}] (* Harvey P. Dale, Nov 11 2024 *)
  • PARI
    {a(n) = [1, 2, 1, -1, -2, -1][n%6 + 1]}; /* Michael Somos, Jul 14 2006 */
    
  • PARI
    {a(n) = if( n<0, n = 2-n); polcoeff( (1 + x) / (1 - x + x^2) + x * O(x^n), n)}; /* Michael Somos, Jul 14 2006 */
    
  • PARI
    a(n)=2^(n%3%2)*(-1)^(n\3) \\ Tani Akinari, Aug 15 2013

Formula

a(n) = S(n, 1) + S(n-1, 1) = S(2*n, sqrt(3)); S(n, x) := U(n, x/2), Chebyshev polynomials of 2nd kind, A049310. S(n, 1) = A010892(n).
a(n) = 2*cos((n-1)*Pi/3) = a(n-1) - a(n-2) = -a(n-3) = a(n-6) = (A022003(n+1)+1)*(-1)^floor(n/3). Unsigned a(n) = 4 - a(n-1) - a(n-2). - Henry Bottomley, Mar 29 2001
a(n) = (-1)^floor(n/3) + ((-1)^floor((n-1)/3) + (-1)^floor((n+1)/3))/2. - Mario Catalani (mario.catalani(AT)unito.it), Jan 07 2003
a(n) = (1/2 - sqrt(3)*i/2)^(n-1) + (1/2 + sqrt(3)*i/2)^(n-1) = cos(Pi*n/3) + sqrt(3)*sin(Pi*n/3). - Paul Barry, Mar 15 2004
The period 3 sequence (2, -1, -1, ...) has a(n) = 2*cos(2*Pi*n/3) = (-1/2 - sqrt(3)*i/2)^n + (-1/2 + sqrt(3)*i/2)^n. - Paul Barry, Mar 15 2004
Euler transform of length 6 sequence [2, -2, -1, 0, 0, 1]. - Michael Somos, Jul 14 2006
G.f.: (1 + x) / (1 - x + x^2) = (1 - x^2)^2 * (1 - x^3) / ((1 - x)^2 * (1 - x^6)). a(n) = a(2-n) for all n in Z. - Michael Somos, Jul 14 2006
a(n) = A033999(A002264(n))*(A000035(A010872(n))+1). - Hieronymus Fischer, Jun 20 2007
a(n) = (3*A033999(A002264(n)) - A033999(n))/2. - Hieronymus Fischer, Jun 20 2007
a(n) = (-1)^floor(n/3)*((n mod 3) mod 2 + 1). - Hieronymus Fischer, Jun 20 2007
a(n) = (3*(-1)^floor(n/3) - (-1)^n)/2. - Hieronymus Fischer, Jun 20 2007
a(n) = (-1)^((n-1)/3) + (-1)^((1-n)/3). - Jaume Oliver Lafont, May 13 2010
E.g.f.: E(x) = S(0), S(k) = 1 + 2*x/(6*k+1 - x*(6*k+1)/(4*(3*k+1) + x + 4*x*(3*k+1)/(6*k + 3 - x - x*(6*k+3)/(3*k + 2 + x - x*(3*k+2)/(12*k + 10 + x - x*(12*k+10)/(x - (6*k+6)/S(k+1))))))); (continued fraction). - Sergei N. Gladkovskii, Dec 14 2011
a(n) = -2 + floor((281/819)*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 04 2013
a(n) = -2 + floor((11/14)*5^(n+1)) mod 5. - Hieronymus Fischer, Jan 04 2013
a(n) = A010892(n) + A010892(n-1).
a(n) = ( (1+i*sqrt(3))^(n-1) + (1-i*sqrt(3))^(n-1) )/2^(n-1), where i=sqrt(-1). - Bruno Berselli, Dec 01 2014
a(n) = 2*sin((2n+1)*Pi/6). - Wesley Ivan Hurt, Apr 04 2015
a(n) = hypergeom([-n/2-2, -n/2-5/2], [-n-4], 4). - Peter Luschny, Dec 17 2016
G.f.: 1 / (1 - 2*x / (1 + 3*x / (2 - x))). - Michael Somos, Dec 29 2016
a(n) = (2*n+1)*(Sum_{k=0..n} ((-1)^k/(2*k+1))*binomial(n+k,2*k)) for n >= 0. - Werner Schulte, Jul 10 2017
Sum_{n>=0} (a(n)/(2*n+1))*x^(2*n+1) = arctan(x/(1-x^2)) for -1 < x < 1. - Werner Schulte, Jul 10 2017
E.g.f.: exp(x/2)*(sqrt(3)*cos(sqrt(3)*x/2) + 3*sin(sqrt(3)*x/2))/sqrt(3). - Stefano Spezia, Aug 04 2025

A002266 Integers repeated 5 times.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16
Offset: 0

Views

Author

Keywords

Comments

For n > 3, number of consecutive "11's" after the (n+3) "1's" in the continued fraction for sqrt(L(n+2)/L(n)) where L(n) is the n-th Lucas number A000032 (see example). E.g., the continued fraction for sqrt(L(11)/L(9)) is [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 58, 2, 4, 1, ...] with 12 consecutive ones followed by floor(11/5)=2 elevens. - Benoit Cloitre, Jan 08 2006
Complement of A010874, since A010874(n) + 5*a(n) = n. - Hieronymus Fischer, Jun 01 2007
From Paul Curtz, May 13 2020: (Start)
Main N-S vertical of the pentagonal spiral built with this sequence is A001105:
21
20 15 15
20 14 10 10 15
20 14 9 6 6 10 15
20 14 9 5 3 3 6 10 15
20 14 9 5 2 1 1 3 6 10 16
19 14 9 5 2 0 0 0 1 3 6 11 16
19 13 9 5 2 0 0 1 3 7 11 16
19 13 8 5 2 2 1 4 7 11 16
19 13 8 4 4 4 4 7 11 16
19 13 8 8 8 7 7 11 17
18 13 12 12 12 12 12 17
18 18 18 18 17 17 17
The main S-N vertical and the next one are A000217. (End)

Crossrefs

Programs

Formula

a(n) = floor(n/5), n >= 0.
G.f.: x^5/((1-x)(1-x^5)).
a(n) = (n - A010874(n))/5. - Hieronymus Fischer, May 29 2007
For n >= 5, a(n) = floor(log_5(5^a(n-1) + 5^a(n-2) + 5^a(n-3) + 5^a(n-4) + 5^a(n-5))). - Vladimir Shevelev, Jun 22 2010
Sum_{n>=5} (-1)^(n+1)/a(n) = log(2) (A002162). - Amiram Eldar, Sep 30 2022

Extensions

Incorrect formula removed by Ridouane Oudra, Oct 16 2021

A057078 Periodic sequence 1,0,-1,...; expansion of (1+x)/(1+x+x^2).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Aug 04 2000

Keywords

Comments

Partial sums of signed sequence is shifted unsigned one: |a(n+2)| = A011655(n+1).
With interpolated zeros, a(n) = sin(5*Pi*n/6 + Pi/3)/sqrt(3) + cos(Pi*n/6 + Pi/6)/sqrt(3); this gives the diagonal sums of the Riordan array (1-x^2, x(1-x^2)). - Paul Barry, Feb 02 2005
From Tom Copeland, Nov 02 2014: (Start)
With a shift and a sign change the o.g.f. of this array becomes the compositional inverse of the shifted Motzkin or Riordan numbers A005043,
(x - x^2) / (1 - x + x^2) = x*(1-x) / (1 - x*(1-x)) = x*(1-x) + [x*(1-x)]^2 + ... . Expanding each term of this series and arranging like powers of x in columns gives skewed rows of the Pascal triangle and reading along the columns gives (mod-signs and indexing) A011973, A169803, and A115139 (see also A091867, A092865, A098925, and A102426 for these term-by-term expansions and A030528). (End)

Examples

			G.f. = 1 - x^2 + x^3 - x^5 + x^6 - x^8 + x^9 - x^11 + x^12 - x^14 + x^15 + ...
		

Crossrefs

Programs

Formula

a(n) = S(n, -1) + S(n - 1, -1) = S(2*n, 1); S(n, x) := U(n, x/2), Chebyshev polynomials of 2nd kind, A049310. S(n, -1) = A049347(n). S(n, 1) = A010892(n).
From Mario Catalani (mario.catalani(AT)unito.it), Jan 08 2003: (Start)
a(n) = (1/2)*((-1)^floor(2*n/3) + (-1)^floor((2*n+1)/3)).
a(n) = -a(n-1) - a(n-2).
a(n) = A061347(n) - A049347(n+2). (End)
a(n) = Sum_{k=0..n} binomial(n+k, 2k)*(-1)^(n-k) = Sum_{k=0..floor((n+1)/2)} binomial(n+1-k, k)*(-1)^(n-k). - Mario Catalani (mario.catalani(AT)unito.it), Aug 20 2003
Binomial transform is A010892. a(n) = 2*sqrt(3)*sin(2*Pi*n/3 + Pi/3)/3. - Paul Barry, Sep 13 2003
a(n) = cos(2*Pi*n/3) + sin(2*Pi*n/3)/sqrt(3). - Paul Barry, Oct 27 2004
a(n) = Sum_{k=0..n} (-1)^A010060(2n-2k)*(binomial(2n-k, k) mod 2). - Paul Barry, Dec 11 2004
a(n) = (4/3)*(|sin(Pi*(n-2)/3)| - |sin(Pi*n/3)|)*|sin(Pi*(n-1)/3)|. - Hieronymus Fischer, Jun 27 2007
a(n) = 1 - (n mod 3) = 1 + 3*floor(n/3) - n. - Hieronymus Fischer, Jun 27 2007
a(n) = 1 - A010872(n) = 1 + 3*A002264(n) - n. - Hieronymus Fischer, Jun 27 2007
Euler transform of length 3 sequence [0, -1, 1]. - Michael Somos, Oct 15 2008
a(n) = a(n-1)^2 - a(n-2)^2 with a(0) = 1, a(1) = 0. - Francesco Daddi, Aug 02 2011
a(n) = A049347(n) + A049347(n-1). - R. J. Mathar, Jun 26 2013
E.g.f.: exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, May 16 2023
a(n) = -a(-1-n) for all n in Z. - Michael Somos, Feb 20 2024
From Peter Bala, Sep 08 2024: (Start)
G.f. A(x) satisfies A(x) = (1 + x)*(1 - x*A(x)).
1/x * series_reversion(x/A(x)) = the g.f of A364374. (End)
Showing 1-10 of 123 results. Next