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 14 results. Next

A000931 Padovan sequence (or Padovan numbers): a(n) = a(n-2) + a(n-3) with a(0) = 1, a(1) = a(2) = 0.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200, 265, 351, 465, 616, 816, 1081, 1432, 1897, 2513, 3329, 4410, 5842, 7739, 10252, 13581, 17991, 23833, 31572, 41824, 55405, 73396, 97229, 128801, 170625
Offset: 0

Views

Author

Keywords

Comments

Number of compositions of n into parts congruent to 2 mod 3 (offset -1). - Vladeta Jovovic, Feb 09 2005
a(n) is the number of compositions of n into parts that are odd and >= 3. Example: a(10)=3 counts 3+7, 5+5, 7+3. - David Callan, Jul 14 2006
Referred to as N0102 in R. K. Guy's "Anyone for Twopins?" - Rainer Rosenthal, Dec 05 2006
Zagier conjectures that a(n+3) is the maximum number of multiple zeta values of weight n > 1 which are linearly independent over the rationals. - Jonathan Sondow and Sergey Zlobin (sirg_zlobin(AT)mail.ru), Dec 20 2006
Starting with offset 6: (1, 1, 2, 2, 3, 4, 5, ...) = INVERT transform of A106510: (1, 1, -1, 0, 1, -1, 0, 1, -1, ...). - Gary W. Adamson, Oct 10 2008
Starting with offset 7, the sequence 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, ... is called the Fibonacci quilt sequence by Catral et al., in Fib. Q. 2017. - N. J. A. Sloane, Dec 24 2021
Triangle A145462: right border = A000931 starting with offset 6. Row sums = Padovan sequence starting with offset 7. - Gary W. Adamson, Oct 10 2008
Starting with offset 3 = row sums of triangle A146973 and INVERT transform of [1, -1, 2, -2, 3, -3, ...]. - Gary W. Adamson, Nov 03 2008
a(n+5) corresponds to the diagonal sums of "triangle": 1; 1; 1,1; 1,1; 1,2,1; 1,2,1; 1,3,3,1; 1,3,3,1; 1,4,6,4,1; ..., rows of Pascal's triangle (A007318) repeated. - Philippe Deléham, Dec 12 2008
With offset 3: (1, 0, 1, 1, 1, 2, 2, ...) convolved with the tribonacci numbers prefaced with a "1": (1, 1, 1, 2, 4, 7, 13, ...) = the tribonacci numbers, A000073. (Cf. triangle A153462.) - Gary W. Adamson, Dec 27 2008
a(n) is also the number of strings of length (n-8) from an alphabet {A, B} with no more than one A or 2 B's consecutively. (E.g., n = 4: {ABAB,ABBA,BABA,BABB,BBAB} and a(4+8) = 5.) - Toby Gottfried, Mar 02 2010
p(n):=A000931(n+3), n >= 1, is the number of partitions of the numbers {1,2,3,...,n} into lists of length two or three containing neighboring numbers. The 'or' is inclusive. For n=0 one takes p(0)=1. For details see the W. Lang link. There the explicit formula for p(n) (analog of the Binet-de Moivre formula for Fibonacci numbers) is also given. Padovan sequences with different inputs are also considered there. - Wolfdieter Lang, Jun 15 2010
Equals the INVERTi transform of Fibonacci numbers prefaced with three 1's, i.e., (1 + x + x^2 + x^3 + x^4 + 2x^5 + 3x^6 + 5x^7 + 8x^8 + 13x^9 + ...). - Gary W. Adamson, Apr 01 2011
When run backwards gives (-1)^n*A050935(n).
a(n) is the top left entry of the n-th power of the 3 X 3 matrix [0, 0, 1; 1, 0, 1; 0, 1, 0] or of the 3 X 3 matrix [0, 1, 0; 0, 0, 1; 1, 1, 0]. - R. J. Mathar, Feb 03 2014
Figure 4 of Brauchart et al., 2014, shows a way to "visualize the Padovan sequence as cuboid spirals, where the dimensions of each cuboid made up by the previous ones are given by three consecutive numbers in the sequence". - N. J. A. Sloane, Mar 26 2014
a(n) is the number of closed walks from a vertex of a unidirectional triangle containing an opposing directed edge (arc) between the second and third vertices. Equivalently the (1,1) entry of A^n where the adjacency matrix of digraph is A=(0,1,0;0,0,1;1,1,0). - David Neil McGrath, Dec 19 2014
Number of compositions of n-3 (n >= 4) into 2's and 3's. Example: a(12)=5 because we have 333, 3222, 2322, 2232, and 2223. - Emeric Deutsch, Dec 28 2014
The Hoffman (2015) paper "offers significant evidence that the number of quantities needed to generate the weight-n multiple harmonic sums mod p is" a(n). - N. J. A. Sloane, Jun 24 2016
a(n) gives the number of compositions of n-5 into odd parts where the order of the 1's does not matter. For example, a(11)=4 counts the following compositions of 6: (5,1)=(1,5), (3,3), (3,1,1,1)=(1,3,1,1)=(1,1,3,1)=(1,1,1,3), (1,1,1,1,1,1). - Gregory L. Simay, Aug 04 2016
For n > 6, a(n) is the number of maximal matchings in the (n-5)-path graph, maximal independent vertex sets and minimal vertex covers in the (n-6)-path graph, and minimal edge covers in the (n-5)-pan graph and (n-3)-path graphs. - Eric W. Weisstein, Mar 30, Aug 03, and Aug 07 2017
From James Mitchell and Wilf A. Wilson, Jul 21 2017: (Start)
a(2n + 5) + 2n - 4, n > 2, is the number of maximal subsemigroups of the monoid of order-preserving mappings on a set with n elements.
a(n + 6) + n - 3, n > 3, is the number of maximal subsemigroups of the monoid of order-preserving or reversing mappings on a set with n elements.
(End)
Has the property that the largest of any four consecutive terms equals the sum of the two smallest. - N. J. A. Sloane, Aug 29 2017 [David Nacin points out that there are many sequences with this property, such as 1,1,1,2,1,1,1,2,1,1,1,2,... or 2,3,4,5,2,3,4,5,2,3,4,5,... or 2,2,1,3,3, 4,1,4, 5,5,1,6,6, 7,1,7, 8,8,1,9,9, 10,1,10, ... (spaces added for clarity), and a conjecture I made here in 2017 was simply wrong. I have deleted it. - N. J. A. Sloane, Oct 23 2018]
a(n) is also the number of maximal cliques in the (n+6)-path complement graph. - Eric W. Weisstein, Apr 12 2018
a(n+8) is the number of solus bitstrings of length n with no runs of 3 zeros. - Steven Finch, Mar 25 2020
Named after the architect Richard Padovan (b. 1935). - Amiram Eldar, Jun 08 2021
Shannon et al. (2006) credit a French architecture student Gérard Cordonnier with the discovery of these numbers.
For n >= 3, a(n) is the number of sequences of 0s and 1s of length (n-2) that begin with a 0, end with a 0, contain no two consecutive 0s, and contain no three consecutive 1s. - Yifan Xie, Oct 20 2022
For n >= 2, a(n+5) is the number of ways to tile the 1xn board with dominoes and squares (ie. size 1x1) such that are either none or one squares between dominoes, none or one squares at both ends of the board, and there is at least one domino. For example, for n=6, a(11)=4 since the tilings are |2|2, |22|, 2|2| and 222 (where 2 represents a domino and | a square). - Enrique Navarrete, Aug 31 2024

Examples

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

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 47, ex. 4.
  • Minerva Catral, Pari L. Ford, Pamela E. Harris, Steven J. Miller, Dawn Nelson, Zhao Pan, and Huanzhong Xu, Legal Decompositions Arising from Non-positive Linear Recurrences, Fib. Quart., 55:3 (2017), 252-275. [Note that there is an earlier version of this paper, with only five authors, on the arXiv in 2016. Note to editors: do not merge these two citations. - N. J. A. Sloane, Dec 24 2021]
  • Richard K. Guy, "Anyone for Twopins?" in D. A. Klarner, editor, The Mathematical Gardner. Prindle, Weber and Schmidt, Boston, 1981, pp. 10-11.
  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • A. G. Shannon, P. G. Anderson and A. F. Horadam, Properties of Cordonnier, Perrin and Van der Laan numbers, International Journal of Mathematical Education in Science and Technology, Volume 37:7 (2006), 825-831. See P_n.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Ian Stewart, L'univers des nombres, "La sculpture et les nombres", pp. 19-20, Belin-Pour La Science, Paris, 2000.
  • Hans van der Laan, Het plastische getal. XV lessen over de grondslagen van de architectonische ordonnantie. Leiden, E.J. Brill, 1967.
  • Don Zagier, Values of zeta functions and their applications, in First European Congress of Mathematics (Paris, 1992), Vol. II, A. Joseph et al. (eds.), Birkhäuser, Basel, 1994, pp. 497-512.

Crossrefs

The following are basically all variants of the same sequence: A000931, A078027, A096231, A124745, A133034, A134816, A164001, A182097, A228361 and probably A020720. However, each one has its own special features and deserves its own entry.
Closely related to A001608.
Doubling every term gives A291289.

Programs

  • GAP
    a:=[1,0,0];; for n in [4..50] do a[n]:=a[n-2]+a[n-3]; od; a; # G. C. Greubel, Dec 30 2019
    
  • Haskell
    a000931 n = a000931_list !! n
    a000931_list = 1 : 0 : 0 : zipWith (+) a000931_list (tail a000931_list)
    -- Reinhard Zumkeller, Feb 10 2011
    
  • Magma
    I:=[1,0,0]; [n le 3 select I[n] else Self(n-2) + Self(n-3): n in [1..60]]; // Vincenzo Librandi, Jul 21 2015
    
  • Maple
    A000931 := proc(n) option remember; if n = 0 then 1 elif n <= 2 then 0 else procname(n-2)+procname(n-3); fi; end;
    A000931:=-(1+z)/(-1+z^2+z^3); # Simon Plouffe in his 1992 dissertation; gives sequence without five leading terms
    a[0]:=1; a[1]:=0; a[2]:=0; for n from 3 to 50 do a[n]:=a[n-2]+a[n-3]; end do; # Francesco Daddi, Aug 04 2011
  • Mathematica
    CoefficientList[Series[(1-x^2)/(1-x^2-x^3), {x, 0, 50}], x]
    a[0]=1; a[1]=a[2]=0; a[n_]:= a[n]= a[n-2] + a[n-3]; Table[a[n], {n, 0, 50}] (* Robert G. Wilson v, May 04 2006 *)
    LinearRecurrence[{0,1,1}, {1,0,0}, 50] (* Harvey P. Dale, Jan 10 2012 *)
    Table[RootSum[-1 -# +#^3 &, 5#^n -6#^(n+1) +4#^(n+2) &]/23, {n,0,50}] (* Eric W. Weisstein, Nov 09 2017 *)
  • PARI
    Vec((1-x^2)/(1-x^2-x^3) + O(x^50)) \\ Charles R Greathouse IV, Feb 11 2011
    
  • PARI
    {a(n) = if( n<0, polcoeff(1/(1+x-x^3) + x * O(x^-n), -n), polcoeff( (1 - x^2)/(1-x^2-x^3) + x * O(x^n), n))}; /* Michael Somos, Sep 18 2012 */
    
  • Python
    def aupton(nn):
        alst = [1, 0, 0]
        for n in range(3, nn+1): alst.append(alst[n-2]+alst[n-3])
        return alst
    print(aupton(49)) # Michael S. Branicky, Mar 28 2022
  • Sage
    def A000931_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-x^2)/(1-x^2-x^3) ).list()
    A000931_list(50) # G. C. Greubel, Dec 30 2019
    

Formula

G.f.: (1-x^2)/(1-x^2-x^3).
a(n) is asymptotic to r^n / (2*r+3) where r = 1.3247179572447... = A060006, the real root of x^3 = x + 1. - Philippe Deléham, Jan 13 2004
a(n)^2 + a(n+2)^2 + a(n+6)^2 = a(n+1)^2 + a(n+3)^2 + a(n+4)^2 + a(n+5)^2 (Barniville, Question 16884, Ed. Times 1911).
a(n+5) = a(0) + a(1) + ... + a(n).
a(n) = central and lower right terms in the (n-3)-th power of the 3 X 3 matrix M = [0 1 0 / 0 0 1 / 1 1 0]. E.g., a(13) = 7. M^10 = [3 5 4 / 4 7 5 / 5 9 7]. - Gary W. Adamson, Feb 01 2004
G.f.: 1/(1 - x^3 - x^5 - x^7 - x^9 - ...). - Jon Perry, Jul 04 2004
a(n+4) = Sum_{k=0..floor((n-1)/2)} binomial(floor((n+k-2)/3), k). - Paul Barry, Jul 06 2004
a(n+3) = Sum_{k=0..floor(n/2)} binomial(k, n-2k). - Paul Barry, Sep 17 2004, corrected by Greg Dresden and Zi Ye, Jul 06 2021
a(n+3) is diagonal sum of A026729 (as a number triangle), with formula a(n+3) = Sum_{k=0..floor(n/2)} Sum_{i=0..n-k} (-1)^(n-k+i)*binomial(n-k, i)*binomial(i+k, i-k). - Paul Barry, Sep 23 2004
a(n) = a(n-1) + a(n-5) = A003520(n-4) + A003520(n-13) = A003520(n-3) - A003520(n-9). - Henry Bottomley, Jan 30 2005
a(n+3) = Sum_{k=0..floor(n/2)} binomial((n-k)/2, k)(1+(-1)^(n-k))/2. - Paul Barry, Sep 09 2005
The sequence 1/(1-x^2-x^3) (a(n+3)) is given by the diagonal sums of the Riordan array (1/(1-x^3), x/(1-x^3)). The row sums are A000930. - Paul Barry, Feb 25 2005
a(n) = A023434(n-7) + 1 for n >= 7. - David Callan, Jul 14 2006
a(n+5) corresponds to the diagonal sums of A030528. The binomial transform of a(n+5) is A052921. a(n+5) = Sum_{k=0..floor(n/2)} Sum_{k=0..n} (-1)^(n-k+i)*binomial(n-k, i)binomial(i+k+1, 2k+1). - Paul Barry, Jun 21 2004
r^(n-1) = (1/r)*a(n) + r*a(n+1) + a(n+2), where r = 1.32471... is the real root of x^3 - x - 1 = 0. Example: r^8 = (1/r)*a(9) + r*a(10) + a(11) = (1/r)*2 + r*3 + 4 = 9.483909... - Gary W. Adamson, Oct 22 2006
a(n) = (r^n)/(2r+3) + (s^n)/(2s+3) + (t^n)/(2t+3) where r, s, t are the three roots of x^3-x-1. - Keith Schneider (schneidk(AT)email.unc.edu), Sep 07 2007
a(n) = -k*a(n-1) + a(n-2) + (k+1)a(n-2) + k*a(n-4), n > 3, for any value of k. - Gary Detlefs, Sep 13 2010
From Francesco Daddi, Aug 04 2011: (Start)
a(0) + a(2) + a(4) + a(6) + ... + a(2*n) = a(2*n+3).
a(0) + a(3) + a(6) + a(9) + ... + a(3*n) = a(3*n+2)+1.
a(0) + a(5) + a(10) + a(15) + ... + a(5*n) = a(5*n+1)+1.
a(0) + a(7) + a(14) + a(21) + ... + a(7*n) = (a(7*n) + a(7*n+1) + 1)/2. (End)
a(n+3) = Sum_{k=0..floor((n+1)/2)} binomial((n+k)/3,k), where binomial((n+k)/3,k)=0 for noninteger (n+k)/3. - Nikita Gogin, Dec 07 2012
a(n) = A182097(n-3) for n > 2. - Jonathan Sondow, Mar 14 2014
a(n) = the k-th difference of a(n+5k) - a(n+5k-1), k>=1. For example, a(10)=3 => a(15)-a(14) => 2nd difference of a(20)-a(19) => 3rd difference of a(25)-a(24)... - Bob Selcoe, Mar 18 2014
Construct the power matrix T(n,j) = [A^*j]*[S^*(j-1)] where A=(0,0,1,0,1,0,1,...) and S=(0,1,0,0,...) or A063524. [* is convolution operation] Define S^*0=I with I=(1,0,0,...). Then a(n) = Sum_{j=1...n} T(n,j). - David Neil McGrath, Dec 19 2014
If x=a(n), y=a(n+1), z=a(n+2), then x^3 + 2*y*x^2 - z^2*x - 3*y*z*x + y^2*x + y^3 - y^2*z + z^3 = 1. - Alexander Samokrutov, Jul 20 2015
For the sequence shifted by 6 terms, a(n) = Sum_{k=ceiling(n/3)..ceiling(n/2)} binomial(k+1,3*k-n) [Doslic-Zubac]. - N. J. A. Sloane, Apr 23 2017
From Joseph M. Shunia, Jan 21 2020: (Start)
a(2n) = 2*a(n-1)*a(n) + a(n)^2 + a(n+1)^2, for n > 8.
a(2n-1) = 2*a(n)*a(n+1) + a(n-1)^2, for n > 8.
a(2n+1) = 2*a(n+1)*a(n+2) + a(n)^2, for n > 7. (End)
0*a(0) + 1*a(1) + 2*a(2) + ... + n*a(n) = n*a(n+5) - a(n+9) + 2. - Greg Dresden and Zi Ye, Jul 02 2021
From Greg Dresden and Zi Ye, Jul 06 2021: (Start)
2*a(n) = a(n+2) + a(n-5) for n >= 5.
3*a(n) = a(n+4) - a(n-9) for n >= 9.
4*a(n) = a(n+5) - a(n-9) for n >= 9. (End)

Extensions

Edited by Charles R Greathouse IV, Mar 17 2010
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A049347 Period 3: repeat [1, -1, 0].

Original entry on oeis.org

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, -1, 0
Offset: 0

Views

Author

Keywords

Comments

G.f. 1/cyclotomic(3, x) (the third cyclotomic polynomial).
Self-convolution yields (-1)^n*A099254(n). - R. J. Mathar, Apr 06 2008
Hankel transform of A099324. - Paul Barry, Aug 10 2009
A057083(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0..n. - Michael Somos, Apr 29 2012
a(n) appears, together with b(n) = A099837(n+3) in the formula 2*exp(2*Pi*n*I/3) = b(n) + a(n)*sqrt(3)*I, n >= 0, with I = sqrt(-1). See A164116 for the case N=5. - Wolfdieter Lang, Feb 27 2014
The binomial transform is 1, 0, -1, -1, 0, 1, 1, 0, -1, -1.. (see A010891). The inverse binom. transform is 1, -2, 3, -3, 0, 9, -27, 54, -81.. (see A057682). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 - x + x^3 - x^4 + x^6 - x^7 + x^9 - x^10 + x^12 - x^13 + x^15 + ...
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 175.

Crossrefs

Alternating row sums of A049310 (Chebyshev-S). [Wolfdieter Lang, Nov 04 2011]

Programs

Formula

G.f.: 1/(1+x+x^2).
a(n) = +1 if n mod 3 = 0, a(n) = -1 if n mod 3 = 1, else 0.
a(n) = S(n, -1) = U(n, -1/2) (Chebyshev's U(n, x) polynomials.)
a(n) = 2*sqrt(3)*cos(2*Pi*n/3 + Pi/6)/3. - Paul Barry, Mar 15 2004
a(n) = Sum_{k >= 0} (-1)^(n-k)*C(n-k, k).
Given g.f. A(x), then B(x) = x * A(x) satisfies 0 = f(B(x), B(x^2)) where f(u, v) = u^2 - v + 2*u*v. - Michael Somos, Oct 03 2006
Euler transform of length 3 sequence [-1, 0, 1]. - Michael Somos, Oct 03 2006
a(n) = b(n+1) where b(n) is multiplicative with b(3^e) = 0^e, b(p^e) = 1 if p == 1 (mod 3), b(p^e) = (-1)^e if p == 2 (mod 3). - Michael Somos, Oct 03 2006
From Michael Somos, Oct 03 2006: (Start)
G.f.: (1 - x) /(1 - x^3).
a(n) = -a(1-n) = -a(n-1) - a(n-2) = a(n-3). (End)
From Michael Somos, Apr 29 2012: (Start)
G.f.: 1 / (1 + x / ( 1 - x / (1 + x))).
a(n) = (-1)^n * A010892(n).
a(n) * n! = A194770(n+1).
Revert transform of A001006. Convolution inverse of A130716. MOBIUS transform of A002324. EULER transform is A111317. BIN1 transform of itself. STIRLING transform is A143818(n+2). (End)
a(-n) = A057078(n). a(n) = A106510(n+1) unless n=0. - Michael Somos, Oct 15 2008
G.f. A(x) = 1/(1+x+x^2) = Q(0); Q(k) = 1- x/(1 - x^2/(x^2 - 1 + x/(x - 1 + x^2/(x^2 - 1/Q(k+1))))); (continued fraction 3 kind, 5-step ). - Sergei N. Gladkovskii, Jun 19 2012
a(n) = -1 + floor(67/333*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = -1 + floor(19/26*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 03 2013
a(n) = ceiling((n-1)/3) - ceiling(n/3) + floor(n/3) - floor((n-1)/3). - Wesley Ivan Hurt, Dec 06 2013
a(n) = n + 1 - 3*floor((n+2)/3). - Mircea Merca, Feb 04 2014
a(n) = A102283(n+1) for all n in Z. - Michael Somos, Sep 24 2019
E.g.f.: exp(-x/2)*(3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Oct 26 2022

Extensions

Edited by Charles R Greathouse IV, Mar 23 2010

A042965 Nonnegative integers not congruent to 2 mod 4.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 31, 32, 33, 35, 36, 37, 39, 40, 41, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 63, 64, 65, 67, 68, 69, 71, 72, 73, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 88, 89, 91, 92
Offset: 1

Views

Author

Keywords

Comments

Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence (starting at 3) gives values of AUB, sorted and duplicates removed. Values of AUBUC give same sequence. - David W. Wilson
These are the nonnegative integers that can be written as a difference of two squares, i.e., n = x^2 - y^2 for integers x,y. - Sharon Sela (sharonsela(AT)hotmail.com), Jan 25 2002. Equivalently, nonnegative numbers represented by the quadratic form x^2-y^2 of discriminant 4. The primes in this sequence are all the odd primes. - N. J. A. Sloane, May 30 2014
Numbers n such that Kronecker(4,n) == mu(gcd(4,n)). - Jon Perry, Sep 17 2002
Count, sieving out numbers of the form 2*(2*n+1) (A016825, "nombres pair-impairs"). A generalized Chebyshev transform of the Jacobsthal numbers: apply the transform g(x) -> (1/(1+x^2)) g(x/(1+x^2)) to the g.f. of A001045(n+2). Partial sums of 1,2,1,1,2,1,.... - Paul Barry, Apr 26 2005
For n>1, equals union of A020883 and A020884. - Lekraj Beedassy, Sep 28 2004
The sequence 1,1,3,4,5,... is the image of A001045(n+1) under the mapping g(x) -> g(x/(1+x^2)). - Paul Barry, Jan 16 2005
With offset 0 starting (1, 3, 4,...) = INVERT transform of A009531 starting (1, 2, -1, -4, 1, 6,...) with offset 0.
Apparently these are the regular numbers modulo 4 [Haukkanan & Toth]. - R. J. Mathar, Oct 07 2011
Numbers of the form x*y in nonnegative integers x,y with x+y even. - Michael Somos, May 18 2013
Convolution of A106510 with A000027. - L. Edson Jeffery, Jan 24 2015
Numbers that are the sum of zero or more consecutive odd positive numbers. - Gionata Neri, Sep 01 2015
Numbers that are congruent to {0, 1, 3} mod 4. - Wesley Ivan Hurt, Jun 10 2016
Nonnegative integers of the form (2+(3*m-2)/4^j)/3, j,m >= 0. - L. Edson Jeffery, Jan 02 2017
This is { x^2 - y^2; x >= y >= 0 }; with the restriction x > y one gets the same set without zero; with the restriction x > 0 (i.e., differences of two nonzero squares) one gets the set without 1. An odd number 2n-1 = n^2 - (n-1)^2, a number 4n = (n+1)^2 - (n-1)^2. - M. F. Hasler, May 08 2018

Examples

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

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section D9.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 83.

Crossrefs

Essentially the complement of A016825.
See A267958 for these numbers multiplied by 4.

Programs

  • Haskell
    a042965 =  (`div` 3) . (subtract 3) . (* 4)
    a042965_list = 0 : 1 : 3 : map (+ 4) a042965_list
    -- Reinhard Zumkeller, Nov 09 2012
    
  • Magma
    [n: n in [0..100] | not n mod 4 in [2]]; // Vincenzo Librandi, Sep 03 2015
    
  • Maple
    a_list := proc(len) local rec; rec := proc(n) option remember;
    ifelse(n <= 4, [0, 1, 3, 4][n], rec(n-1) + rec(n-3) - rec(n-4)) end:
    seq(rec(n), n=1..len) end: a_list(76); # Peter Luschny, Aug 06 2022
  • Mathematica
    nn=100; Complement[Range[0,nn], Range[2,nn,4]] (* Harvey P. Dale, May 21 2011 *)
    f[n_]:=Floor[(4*n-3)/3]; Array[f,70] (* Robert G. Wilson v, Jun 26 2012 *)
    LinearRecurrence[{1, 0, 1, -1}, {0, 1, 3, 4}, 70] (* L. Edson Jeffery, Jan 21 2015 *)
    Select[Range[0, 100], ! MemberQ[{2}, Mod[#, 4]] &] (* Vincenzo Librandi, Sep 03 2015 *)
  • PARI
    a(n)=(4*n-3)\3 \\ Charles R Greathouse IV, Jul 25 2011
    
  • Python
    def A042965(n): return (n<<2)//3-1 # Chai Wah Wu, Feb 10 2025

Formula

Recurrence: a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = n - 1 + (3n-3-sqrt(3)*(1-2*cos(2*Pi*(n-1)/3))*sin(2*Pi*(n-1)/3))/9. Partial sums of the period-3 sequence 0, 1, 1, 2, 1, 1, 2, 1, 1, 2, ... (A101825). - Ralf Stephan, May 19 2013
G.f.: A(x) = x^2*(1+x)^2/((1-x)^2*(1+x+x^2)); a(n)=Sum{k=0..floor(n/2)}, binomial(n-k-1, k)*A001045(n-2*k), n>0. - Paul Barry, Jan 16 2005, R. J. Mathar, Dec 09 2009
a(n) = floor((4*n-3)/3). - Gary Detlefs, May 14 2011
A214546(a(n)) != 0. - Reinhard Zumkeller, Jul 20 2012
From Michael Somos, May 18 2013: (Start)
Euler transform of length 3 sequence [3, -2, 1].
a(2-n) = -a(n). (End)
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = (12*n-12+3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 4k-1, a(3k-1) = 4k-3, a(3k-2) = 4k-4. (End)
a(n) = round((4*n-4)/3). - Mats Granvik, Sep 24 2016
The g.f. A(x) satisfies (A(x)/x)^2 + A(x)/x = x*B(x)^2, where B(x) is the o.g.f. of A042968. - Peter Bala, Apr 12 2017
Sum_{n>=2} (-1)^n/a(n) = log(sqrt(2)+2)/sqrt(2) - (sqrt(2)-1)*log(2)/4. - Amiram Eldar, Dec 05 2021
From Peter Bala, Aug 03 2022: (Start)
a(n) = a(floor(n/2)) + a(1 + ceiling(n/2)) for n >= 2, with a(2) = 1 and a(3) = 3.
a(2*n) = a(n) + a(n+1); a(2*n+1) = a(n) + a(n+2). Cf. A047222 and A006165. (End)
E.g.f.: (9 + 12*exp(x)*(x - 1) + exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, Apr 05 2023

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Peter Pein and Ralf Stephan, Jun 17 2007
Typos fixed in Gary Detlefs's formula and in PARI program by Reinhard Zumkeller, Nov 09 2012

A131534 Period 3: repeat [1, 2, 1].

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, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1
Offset: 0

Views

Author

Paul Curtz, Aug 26 2007

Keywords

Comments

Partial sums of A106510. Inverse binomial transform of A024495 (without leading zeros). - Philippe Deléham, Nov 26 2008
a(n) = A130196(n) - A022003(n) = A080425(n) - A130196(n)+2 = A153727(n)/A130196(n). - Reinhard Zumkeller, Nov 12 2009
Continued fraction expansion of A177346, (1+sqrt(10))/3. - Klaus Brockhaus, May 07 2010
From Daniel Forgues, May 04 2016: (Start)
a(n) = GCD of terms of the sequence S_n = {F_i+F_{i+1}+F_{i+2}+...+F_{i+2n}, i >= 0}, where F_i denotes a Fibonacci number. See A210209.
a(n) = GCD of terms of the sequence S_n = {L_i+L_{i+1}+L_{i+2}+...+L_{i+2n}, i >= 0}, where L_i denotes a Lucas number. See A229339. (End)

Crossrefs

Programs

Formula

G.f.: (x+1)^2/((1-x)*(x^2+x+1)). - R. J. Mathar, Nov 14 2007
a(n) = 4/3 + (2/3)*cos(2*Pi*(n+2)/3). - Jaume Oliver Lafont, May 09 2008
a(n) = A101825(n+1). - R. J. Mathar, Jun 13 2008
a(n) = gcd(F(n)^2+F(n+1)^2, F(n)+F(n+1)). - Gary Detlefs, Dec 29 2010
a(n) = 2 - ((n+2)^2 mod 3). - Gary Detlefs, Oct 13 2011
a(n) = ceiling(n*4/3) - ceiling((n-1)*4/3). - Tom Edgar, Jul 22 2014
a(n) = 2 - abs(3*floor(n/3)+1-n). - Mikael Aaltonen, Jan 02 2015
a(n) = 1+[3|(2n+1)], using Iverson bracket. - Daniel Forgues, May 04 2016
a(n) = a(n-3) for n>2. - Wesley Ivan Hurt, Jul 05 2016
E.g.f.: (4*exp(x) - exp(-x/2)*(cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)))/3. - Stefano Spezia, Aug 04 2025

A143978 a(n) = floor(2*n*(n+1)/3).

Original entry on oeis.org

1, 4, 8, 13, 20, 28, 37, 48, 60, 73, 88, 104, 121, 140, 160, 181, 204, 228, 253, 280, 308, 337, 368, 400, 433, 468, 504, 541, 580, 620, 661, 704, 748, 793, 840, 888, 937, 988, 1040, 1093, 1148, 1204, 1261, 1320, 1380, 1441, 1504, 1568, 1633, 1700, 1768, 1837
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2008

Keywords

Comments

Second diagonal of array A143979, which counts certain unit squares in a lattice. First diagonal: A030511.
Convolution of A042965 with A000012, convolution of A131534 with A000027, and convolution of A106510 with A000217. - L. Edson Jeffery, Jan 24 2015
From Miquel A. Fiol, Aug 31 2024: (Start)
a(n+1) is the maximum number N of vertices of a circulant digraph with steps +-s1, s2, and diameter n.
Depending on the value of n, the following table shows the values of N, s1, and s2:
n | 3*r | 3*r-1 | 3*r-2 |
N | 6*r^2+6*r+1 | 6*r^2+2*r | 6*r^2-2*r |
s1 | 1 | r | r |
s2 | 6*r+3 | 3*r+1 | 3*r-1 |
(End)

Crossrefs

Cf. A000217, A030511, A042965 (first differences), A106510, A131534, A143979.

Programs

  • Maple
    A143978:= n-> (6*n*(n+1) -1 + `mod`(n+2,3) - `mod`(n+1,3))/9;
    seq(A143978(n), n=1..60); # G. C. Greubel, May 27 2020
  • Mathematica
    Table[(6*n^2 +6*n -1  + Mod[n+2, 3] - Mod[n+1, 3])/9, {n, 60}] (* G. C. Greubel, May 27 2020 *)
    Table[Floor[2n (n+1)/3],{n,60}] (* or *) LinearRecurrence[{2,-1,1,-2,1},{1,4,8,13,20},60] (* Harvey P. Dale, Aug 12 2025 *)

Formula

From R. J. Mathar, Oct 05 2009: (Start)
G.f.: x*(1 + x)^2/((1 + x + x^2)*(1-x)^3).
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5). (End)
a(n) = Sum_{k=1..(n+1)} A042965(k). - Klaus Purath, May 23 2020
From G. C. Greubel, May 27 2020: (Start)
a(n) = (ChebyshevU(n, -1/2) - ChebyshevU(n-1, -1/2) + (6*n^2 + 6*n -1))/9.
a(n) = (JacobiSymbol(n+1, 3) - JacobiSymbol(n, 3) + (6*n^2 + 6*n -1))/9.
a(n) = (A102283(n+1) - A102283(n) + A103115(n+1))/9
a(n) = (A131713(n) + A103115(n+1))/9. (End)
Sum_{n>=1} 1/a(n) = 3/2 + (tan(Pi/(2*sqrt(3)))-1)*Pi/(2*sqrt(3)). - Amiram Eldar, Sep 27 2022
E.g.f.: exp(-x/2)*(exp(3*x/2)*(6*x^2 + 12*x - 1) + cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/9. - Stefano Spezia, Apr 05 2023

A163810 Expansion of (1 - x) * (1 - x^2) * (1 - x^3) / (1 - x^6) in powers of x.

Original entry on oeis.org

1, -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, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1
Offset: 0

Views

Author

Michael Somos, Nov 07 2007

Keywords

Examples

			G.f. = 1 - x - x^2 + x^4 + x^5 - x^7 - x^8 + x^10 + x^11 - x^13 - x^14 + ...
		

Crossrefs

A163806(n) = -a(n) unless n=0. A106510(n) = (-1)^n * a(n).
Convolution inverse of A028310. Series reversion of A109081.

Programs

  • Mathematica
    Join[{1},LinearRecurrence[{1, -1},{-1, -1},104]] (* Ray Chandler, Sep 15 2015 *)
  • PARI
    {a(n) = (n==0) + [0, -1, -1, 0, 1, 1][n%6 + 1]};
    
  • PARI
    {a(n) = (n==0) + (-1)^n * kronecker(-3, n)};

Formula

Euler transform of length 6 sequence [ -1, -1, -1, 0, 0, 1].
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = 2 * u * (1 - u) * (2 - v) - (v - u^2).
a(3*n) = 0 unless n=0. a(6*n + 1) = a(6*n + 2) = -1, a(6*n + 4) = a(6*n + 5) = a(0) = 1.
a(-n) = -a(n) unless n=0. a(n+3) = -a(n) unless n=0 or n=-3.
G.f.: (1 - x)^2 / (1 - x + x^2).

A106509 Riordan array ((1+x)/(1+x+x^2), x/(1+x)), read by rows.

Original entry on oeis.org

1, 0, 1, -1, -1, 1, 1, 0, -2, 1, 0, 1, 2, -3, 1, -1, -1, -1, 5, -4, 1, 1, 0, 0, -6, 9, -5, 1, 0, 1, 0, 6, -15, 14, -6, 1, -1, -1, 1, -6, 21, -29, 20, -7, 1, 1, 0, -2, 7, -27, 50, -49, 27, -8, 1, 0, 1, 2, -9, 34, -77, 99, -76, 35, -9, 1, -1, -1, -1, 11, -43, 111, -176, 175, -111, 44, -10, 1
Offset: 0

Views

Author

Paul Barry, May 04 2005

Keywords

Comments

Row sums are A106510.
Diagonal sums are A106511.
Inverse of A072405 (when this starts 1, 0, 1, ...).

Examples

			Triangle begins:
   1;
   0,  1;
  -1, -1,  1;
   1,  0, -2,  1;
   0,  1,  2, -3,  1;
  -1, -1, -1,  5, -4,  1;
		

Crossrefs

Programs

  • Magma
    T:= func< n,k | (&+[ (-1)^j*Binomial(2*n-k-j, j): j in [0..n-k]]) >;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 28 2021
    
  • Mathematica
    (* The function RiordanArray is defined in A256893. *)
    RiordanArray[(1 + #)/(1 + # + #^2)&, #/(1 + #)&, 12] // Flatten (* Jean-François Alcover, Jul 19 2019 *)
  • Sage
    def T(n,k): return sum( (-1)^j*binomial(2*n-k-j, j) for j in (0..n-k))
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 28 2021

Formula

T(n, k) = Sum_{j=0..n-k} (-1)^j*binomial(2n-k-j, j).
T(n,k) = T(n-1,k-1) - 2*T(n-1,k) + T(n-2,k-1) - 2*T(n-2,k) + T(n-3,k-1) - T(n-3,k), T(0,0) = T(1,1) = T(2,2) = 1, T(1,0) = 0, T(2,1) = T(2,0) = -1, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Jan 12 2014
Sum_{k=0..n} T(n,k) = A106510(n). - G. C. Greubel, Apr 28 2021

A163804 Expansion of (1 - x) * (1 - x^4) / ((1 - x^2) * (1 - x^3)) in powers of x.

Original entry on oeis.org

1, -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, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0
Offset: 0

Views

Author

Michael Somos, Aug 04 2009

Keywords

Examples

			1 - x + x^2 - x^4 + x^5 - x^7 + x^8 - x^10 + x^11 - x^13 + x^14 + ...
		

Crossrefs

A106510(n) = -a(n) unless n=0. Convolution inverse of A117659.
Cf. A102283.

Programs

  • Maple
    1, seq(2*sin(4*Pi*n/3)/sqrt(3), n=1..100); # Ridouane Oudra, Jan 09 2025
  • Mathematica
    Join[{1},LinearRecurrence[{-1, -1},{-1, 1},105]] (* Ray Chandler, Sep 15 2015 *)
  • PARI
    {a(n) = (n==0) + [0, -1, 1][n%3 + 1]}
    
  • PARI
    {a(n) = (n==0) - kronecker(-3, n)}

Formula

Euler transform of length 4 sequence [ -1, 1, 1, -1].
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = 2 - v - u * (4 - 2*v - u).
a(3*n) = 0 unless n=0, a(3*n + 1) = -1, a(3*n + 2) = a(0) = 1.
a(-n) = -a(n) unless n=0. a(n+3) = a(n) unless n=0 or n=-3.
G.f.: (1 + x^2) / (1 + x + x^2).
G.f.: A(x) = 1 / (1 + x / (1 + x^2)) = 1 - x / (1 + x / (1 - x / (1 + x))). - Michael Somos, Jan 03 2013
a(n) = A057078(n-2), n>1. - R. J. Mathar, Aug 06 2009
From Ridouane Oudra, Jan 09 2025: (Start)
a(n) = 3*floor((n+1)/3) - n, for n>0.
a(n) = 2*sin(4*Pi*n/3)/sqrt(3), for n>0.
a(n) = - A102283(n), for n>0.
a(n) = - A106510(n), for n>0. (End)

A365085 G.f. satisfies A(x) = 1 + x*A(x) / (1 + x*A(x))^2.

Original entry on oeis.org

1, 1, -1, -2, 5, 6, -30, -13, 189, -56, -1188, 1266, 7194, -14377, -40183, 135278, 188773, -1151800, -503880, 9109076, -3419924, -67220176, 80390824, 458183898, -998680470, -2794491329, 10156144385, 13919066170, -92250872385, -36047778330, 769826420850, -339940775445
Offset: 0

Views

Author

Seiichi Manyama, Aug 21 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n, k)*binomial(n+k-1, n-k)/(n-k+1));

Formula

a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * binomial(n+k-1,n-k) / (n-k+1).

A365083 G.f. satisfies A(x) = 1 + x*A(x) / (1 + x)^4.

Original entry on oeis.org

1, 1, -3, 3, 5, -22, 27, 28, -163, 235, 134, -1188, 1983, 408, -8504, 16320, -1551, -59659, 131507, -46683, -408806, 1040147, -612380, -2721835, 8088003, -6523626, -17457420, 61883839, -62900496, -106248240, 466069760, -571001695, -595520019, 3454539427
Offset: 0

Views

Author

Seiichi Manyama, Aug 21 2023

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{-3, -6, -4, -1}, {1, 1, -3, 3, 5}, 1 + 33] (* Robert P. P. McKone, Aug 21 2023 *)
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n+3*k-1, n-k));

Formula

G.f.: A(x) = 1/( 1 - x/(1+x)^4 ).
a(n) = -3*a(n-1) - 6*a(n-2) - 4*a(n-3) - a(n-4) for n > 4.
a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n+3*k-1,n-k).
Showing 1-10 of 14 results. Next