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

A079978 Characteristic function of multiples of three.

Original entry on oeis.org

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

Views

Author

Vladimir Baltic, Feb 17 2003

Keywords

Comments

Period 3: repeat [1, 0, 0].
a(n)=1 if n=3k, a(n)=0 otherwise.
Decimal expansion of 1/999.
Number of permutations satisfying -k <= p(i)-i <= r and p(i)-i not in I, i=1..n, with k=1, r=2, I={0,1}.
a(n) is also the number of partitions of n with every part being three (a(0)=1 because the empty partition has no parts). Hence a(n) is also the number of 2-regular graphs on n vertices with each component having girth 3. - Jason Kimberley, Oct 02 2011
Euler transformation of A185013. - Jason Kimberley, Oct 02 2011
If b(0)=0 and for n > 0, b(n)=a(n), then starting at n=0, b(n) is the number of incongruent equilateral triangles formed from the vertices of a regular n-gon. The number of incongruent isosceles triangles (strictly two equal sides) is A174257(n) and the number of incongruent scalene triangles is A069905(n-3) for n > 2, otherwise 0. The total number of incongruent triangles is A069905(n). - Frank M Jackson, Nov 19 2022

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Essentially the same as A022003.
Partial sums are given by A002264(n+3).
Characteristic function of multiples of g: A000007 (g=0), A000012 (g=1), A059841 (g=2), this sequence (g=3), A121262 (g=4), A079998 (g=5), A079979 (g=6), A082784 (g=7). - Jason Kimberley, Oct 14 2011
Cf. A007908, A011655 (bit flipped).

Programs

Formula

a(n) = a(n-3) for n > 2.
G.f.: 1/(1-x^3) = 1/( (1-x)*(1+x+x^2)).
a(n) = (1 + e^(i*Pi*A002487(n)))/2, i=sqrt(-1). - Paul Barry, Jan 14 2005
Additive with a(p^e) = 1 if p = 3, 0 otherwise.
a(n) = ((n+1) mod 3) mod 2. Also: a(n) = (1/2)*(1 + (-1)^(n + floor((n+1)/3))). - Hieronymus Fischer, May 29 2007
a(n) = 1 - A011655(n). - Reinhard Zumkeller, Nov 30 2009
a(n) = (1 + (-1)^(2*n/3) + (-1)^(-2*n/3))/3. - Jaume Oliver Lafont, May 13 2010
For the general case: the characteristic function of numbers that are multiples of m is a(n) = floor(n/m) - floor((n-1)/m), m,n > 0. - Boris Putievskiy, May 08 2013
a(n) = floor( ((n-1) mod 3)/2 ). - Wesley Ivan Hurt, Jun 29 2013
a(n) = 2^(n mod 3) mod 2. - Olivier Gérard, Jul 04 2013
a(n) = (w^(2*n) + w^n + 1)/3, w = (-1 + i*sqrt(3))/2 (w is a primitive 3rd root of unity). - Bogart B. Strauss, Jul 20 2013
E.g.f.: (exp(x) + 2*exp(-x/2)*cos(sqrt(3)*x/2))/3. - Geoffrey Critzer, Nov 03 2014
a(n) = (sin(Pi*(n+1)/3)^2)*(2/3) + sin(Pi*(n+1)*2/3)/sqrt(3). - Mikael Aaltonen, Jan 03 2015
a(n) = (2*n^2 + 1) mod 3. The characteristic function of numbers that are multiples of 2k+1 is (2*k*n^(2*k) + 1) mod (2k+1). Example: A058331(n) mod 3 for k=1, A211412(n) mod 5 for k=2, ... - Eric Desbiaux, Dec 25 2015
a(n) = floor(2*(n-1)/3) - 2*floor((n-1)/3). - Wesley Ivan Hurt, Jul 25 2016
a(n) == A007908(n+1) (mod 3), n >= 0. See A011655 (bit flipped). - Wolfdieter Lang, Jun 12 2017
a(n) = 1/3 + (2/3)*cos((2/3)*n*Pi). - Ridouane Oudra, Jan 22 2021
a(n) = A000217(n+1) mod 3. - Christopher Adams, Jan 05 2025

Extensions

Name simplified by Ralf Stephan, Nov 22 2010
Name changed by Jason Kimberley, Oct 14 2011

A003269 a(n) = a(n-1) + a(n-4) with a(0) = 0, a(1) = a(2) = a(3) = 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 3, 4, 5, 7, 10, 14, 19, 26, 36, 50, 69, 95, 131, 181, 250, 345, 476, 657, 907, 1252, 1728, 2385, 3292, 4544, 6272, 8657, 11949, 16493, 22765, 31422, 43371, 59864, 82629, 114051, 157422, 217286, 299915, 413966, 571388, 788674, 1088589, 1502555, 2073943
Offset: 0

Views

Author

Keywords

Comments

This comment covers a family of sequences which satisfy a recurrence of the form a(n) = a(n-1) + a(n-m), with a(n) = 1 for n = 0..m-1. The generating function is 1/(1-x-x^m). Also a(n) = Sum_{i=0..n/m} binomial(n-(m-1)*i, i). This family of binomial summations or recurrences gives the number of ways to cover (without overlapping) a linear lattice of n sites with molecules that are m sites wide. Special case: m=1: A000079; m=4: A003269; m=5: A003520; m=6: A005708; m=7: A005709; m=8: A005710.
For this family of sequences, a(n+1) is the number of compositions of n+1 into parts 1 and m. For n>=m, a(n-m+1)is the number of compositions of n in which each part is greater than m or equivalently, in which parts 1 through m are excluded. - Gregory L. Simay, Jul 14 2016
For this family of sequences, let a(m,n) = a(n-1) + a(n-m). Then the number of compositions of n having m as a least summand is a(m, n-m) - a(m+1, n-m-1). - Gregory L. Simay, Jul 14 2016
For n>=3, a(n-3) = number of compositions of n in which each part is >=4. - Milan Janjic, Jun 28 2010
For n>=1, number of compositions of n into parts == 1 (mod 4). Example: a(8)=5 because there are 5 compositions of 8 into parts 1 or 5: (1,1,1,1,1,1,1,1), (1,1,1,5), (1,1,5,1), (1,5,1,1), (5,1,1,1). - Adi Dani, Jun 16 2011
a(n+1) is the number of compositions of n into parts 1 and 4. - Joerg Arndt, Jun 25 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=4, 2*a(n-3) equals the number of 2-colored compositions of n with all parts >= 4, such that no adjacent parts have the same color. - Milan Janjic, Nov 27 2011
Number of permutations satisfying -k<=p(i)-i<=r and p(i)-i not in I, i=1..n, with k=1, r=3, I={1,2}. - Vladimir Baltic, Mar 07 2012
a(n+4) equals the number of binary words of length n having at least 3 zeros between every two successive ones. - Milan Janjic, Feb 07 2015
From Clark Kimberling, Jun 13 2016: (Start)
Let T* be the infinite tree with root 0 generated by these rules: if p is in T*, then p+1 is in T* and x*p is in T*.
Let g(n) be the set of nodes in the n-th generation, so that g(0) = {0}, g(1) = {1}, g(2) = {2,x}, g(3) = {3, 2*x, x+1, x^2}, etc.
Let T(r) be the tree obtained by substituting r for x.
If N is a positive integer such that r = N^(1/4) is not an integer, then the number of (not necessarily distinct) integers in g(n) is A003269(n), for n > = 1. See A274142. (End)

Examples

			G.f.: x + x^2 + x^3 + x^4 + 2*x^5 + 3*x^6 + 4*x^7 + 5*x^8 + 7*x^9 + 10*x^10 + ...
The number of compositions of 12 having 4 as a least summand is a(4, 12 -4 + 1) - a(5, 12 - 5 + 1) = A003269(9) - A003520(8) = 7-4 = 3. The compositions are (84), (48) and (444). - _Gregory L. Simay_, Jul 14 2016
		

References

  • A. Brousseau, Fibonacci and Related Number Theoretic Tables. Fibonacci Association, San Jose, CA, 1972, p. 120.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A017898 for an essentially identical sequence.
Row sums of A180184.

Programs

  • Haskell
    a003269 n = a003269_list !! n
    a003269_list = 0 : 1 : 1 : 1 : zipWith (+) a003269_list
                                              (drop 3 a003269_list)
    -- Reinhard Zumkeller, Feb 27 2011
    
  • Magma
    I:=[0,1,1,1]; [n le 4 select I[n] else Self(n-1) + Self(n-4) :n in [1..50]]; // Marius A. Burtea, Sep 13 2019
    
  • Maple
    with(combstruct): SeqSetU := [S, {S=Sequence(U), U=Set(Z, card > 3)}, unlabeled]: seq(count(SeqSetU, size=j), j=4..51);
    seq(add(binomial(n-3*k,k),k=0..floor(n/3)),n=0..47); # Zerinvary Lajos, Apr 03 2007
    A003269:=z/(1-z-z**4); # Simon Plouffe in his 1992 dissertation
    ZL:=[S, {a = Atom, b = Atom, S = Prod(X,Sequence(Prod(X,b))), X = Sequence(b,card >= 3)}, unlabelled]: seq(combstruct[count](ZL, size=n), n=3..50); # Zerinvary Lajos, Mar 26 2008
    M:= Matrix(4, (i,j)-> if j=1 then [1,0,0,1][i] elif (i=j-1) then 1 else 0 fi); a:= n-> (M^(n))[1,2]; seq(a(n), n=0..48); # Alois P. Heinz, Jul 27 2008
  • Mathematica
    a[0]= 0; a[1]= a[2]= a[3]= 1; a[n_]:= a[n]= a[n-1] + a[n-4]; Table[a[n], {n,0,50}]
    CoefficientList[Series[x/(1-x-x^4), {x,0,50}], x] (* Zerinvary Lajos, Mar 29 2007 *)
    Table[Sum[Binomial[n-3*i-1,i], {i,0,(n-1)/3}], {n,0,50}]
    LinearRecurrence[{1,0,0,1}, {0,1,1,1}, 50] (* Robert G. Wilson v, Jul 12 2014 *)
    nxt[{a_,b_,c_,d_}]:={b,c,d,a+d}; NestList[nxt,{0,1,1,1},50][[;;,1]] (* Harvey P. Dale, May 27 2024 *)
  • PARI
    {a(n) = polcoeff( if( n<0, (1 + x^3) / (1 + x^3 - x^4), 1 / (1 - x - x^4)) + x * O(x^abs(n)), abs(n))} /* Michael Somos, Jul 12 2003 */
    
  • SageMath
    @CachedFunction
    def a(n): return ((n+2)//3) if (n<4) else a(n-1) + a(n-4) # a = A003269
    [a(n) for n in (0..50)] # G. C. Greubel, Jul 25 2022

Formula

G.f.: x/(1-x-x^4).
G.f.: -1 + 1/(1-Sum_{k>=0} x^(4*k+1)).
a(n) = a(n-3) + a(n-4) + a(n-5) + a(n-6) for n>4.
a(n) = floor(d*c^n + 1/2) where c is the positive real root of -x^4+x^3+1 and d is the positive real root of 283*x^4-18*x^2-8*x-1 (c=1.38027756909761411... and d=0.3966506381592033124...). - Benoit Cloitre, Nov 30 2002
Equivalently, a(n) = floor(c^(n+3)/(c^4+3) + 1/2) with c as defined above (see A086106). - Greg Dresden and Shuer Jiang, Aug 31 2019
a(n) = term (1,2) in the 4 X 4 matrix [1,1,0,0; 0,0,1,0; 0,0,0,1; 1,0,0,0]^n. - Alois P. Heinz, Jul 27 2008
From Paul Barry, Oct 20 2009: (Start)
a(n+1) = Sum_{k=0..n} C((n+3*k)/4,k)*((1+(-1)^(n-k))/2 + cos(Pi*n/2))/2;
a(n+1) = Sum_{k=0..n} C(k,floor((n-k)/3))(2*cos(2*Pi*(n-k)/3)+1)/3. (End)
a(n) = Sum_{j=0..(n-1)/3} binomial(n-1-3*j,j) (cf. A180184). - Vladimir Kruchinin, May 23 2011
A017817(n) = a(-4 - n) * (-1)^n. - Michael Somos, Jul 12 2003
G.f.: Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(2*k+1 + x^3)/( x*(2*k+2 + x^3) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 29 2013
Appears a(n) = hypergeometric([1/4-n/4,1/2-n/4,3/4-n/4,1-n/4], [1/3-n/3,2/3-n/3,1-n/3], -4^4/3^3) for n>=10. - Peter Luschny, Sep 18 2014

Extensions

Additional comments from Yong Kong (ykong(AT)curagen.com), Dec 16 2000
Initial 0 prepended by N. J. A. Sloane, Apr 09 2008

A072856 Number of permutations satisfying i-4<=p(i)<=i+4, i=1..n (permutations of length n within distance 4).

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 504, 1902, 6902, 25231, 95401, 365116, 1396948, 5316192, 20135712, 76227216, 288878956, 1095937420, 4159450913, 15783649241, 59878012558, 227128287882, 861543171080, 3268198646496, 12398132725784, 47033439463906, 178423731589482
Offset: 0

Views

Author

Vladimir Baltic, Jul 25 2002

Keywords

Comments

a(n) equals the permanent of the n X n matrix with 1's along the nine central diagonals and 0's everywhere else. - John M. Campbell, Jul 09 2011

Crossrefs

Formula

G.f.: (1 -2*x -3*x^2 -x^3 +4*x^4 -31*x^5 -5*x^6 +32*x^7 -21*x^8 +129*x^9 +94*x^10 -83*x^11 +11*x^12 -192*x^13 -59*x^14 +63*x^15 -16*x^16 +3*x^17 -29*x^18 -46*x^19 -57*x^20 +253*x^21 -28*x^22 -101*x^23 +17*x^24 +104*x^25 -15*x^26 -29*x^27 +10*x^28 -x^29 +x^30 -x^32 -3*x^33 +x^35) / (1 -3*x -2*x^2 +x^3 +x^4 -70*x^5 -39*x^6 +31*x^7 +114*x^8 +522*x^9 +184*x^10 -34*x^11 -46*x^12 -1444*x^13 -202*x^14 +606*x^15 -1204*x^16 -198*x^17 +804*x^18 -542*x^19 +26*x^20 +2372*x^21 +318*x^22 -1582*x^23 +328*x^24 +2018*x^25 +222*x^26 -810*x^27 -184*x^28 +706*x^29 +14*x^30 -204*x^31 -70*x^32 -14*x^33 -28*x^34 +22*x^35 +11*x^36 -47*x^37 +8*x^38 +11*x^39 +x^40 +4*x^41 -x^42 -x^43). - Torleiv Kløve, Jan 13 2009; corrected by Colin Barker, Jul 06 2013

Extensions

a(0)=1 prepended and more terms added by Colin Barker, Jul 06 2013

A072850 Number of permutations satisfying i-2<=p(i)<=i+4, i=1..n.

Original entry on oeis.org

1, 2, 6, 18, 54, 146, 391, 1081, 3004, 8320, 22984, 63424, 175176, 484113, 1337721, 3695886, 10210702, 28209954, 77940078, 215337554, 594943087, 1643728129, 4541349672, 12547013504, 34665373744, 95774808224, 264610227072
Offset: 1

Views

Author

Vladimir Baltic, Jul 25 2002

Keywords

Crossrefs

Formula

Recurrence: a(n) = a(n - 1) + 2*a(n - 2) + 4*a(n - 3) + 6*a(n - 4) + 10*a(n - 5) + 12*a(n - 6) - 4*a(n - 7) - 6*a(n - 8) - 6*a(n - 9) - 2*a(n - 11) - 2*a(n - 12) + a(n - 14) + a(n - 15).
G.f.: - (x^9 + x^7 - 2*x^6 - 2*x^4 - 2*x^3 - x^2 + 1)/(x^15 + x^14 - 2*x^12 - 2*x^11 - 6*x^9 - 6*x^8 - 4*x^7 + 12*x^6 + 10*x^5 + 6*x^4 + 4*x^3 + 2*x^2 + x - 1)

A080014 Number of permutations satisfying -k<=p(i)-i<=r and p(i)-i not in I, i=1..n, with k=2, r=2, I={1}.

Original entry on oeis.org

1, 1, 1, 3, 6, 10, 18, 35, 65, 119, 221, 412, 764, 1416, 2629, 4881, 9057, 16807, 31194, 57894, 107442, 199399, 370065, 686799, 1274617, 2365544, 4390184, 8147680, 15121161, 28063153, 52082017, 96658283, 179386750, 332921362, 617864098
Offset: 0

Views

Author

Vladimir Baltic, Jan 24 2003

Keywords

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,1,1,1,-1,-1},{1,1,1,3,6,10},40] (* Harvey P. Dale, Mar 10 2024 *)
  • PARI
    Vec(-(x^2-1)/(x^6+x^5-x^4-x^3-x^2-x+1)+O(x^99)) \\ Charles R Greathouse IV, Jun 12 2015

Formula

Recurrence: a(n) = a(n-1)+a(n-2)+a(n-3)+a(n-4)-a(n-5)-a(n-6).
G.f.: -(x^2-1)/(x^6+x^5-x^4-x^3-x^2-x+1).

A079955 Number of permutations satisfying -k<=p(i)-i<=r and p(i)-i not in I, i=1..n, with k=1, r=5, I={0,2,3}.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 2, 2, 3, 3, 5, 6, 9, 11, 15, 19, 26, 34, 46, 60, 80, 105, 140, 185, 246, 325, 431, 570, 756, 1001, 1327, 1757, 2328, 3083, 4085, 5411, 7169, 9496, 12580, 16664, 22076, 29244, 38741, 51320, 67985, 90060, 119305, 158045, 209366, 277350, 367411
Offset: 0

Views

Author

Vladimir Baltic, Feb 19 2003

Keywords

Comments

Number of compositions (ordered partitions) of n into elements of the set {2,5,6}.

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1-x^2-x^5-x^6) )); // G. C. Greubel, Dec 11 2019
    
  • Maple
    seq(coeff(series(1/(1-x^2-x^5-x^6), x, n+1), x, n), n = 0..50); # G. C. Greubel, Dec 11 2019
  • Mathematica
    LinearRecurrence[{0, 1, 0, 0, 1, 1}, {1, 0, 1, 0, 1, 1}, 51] (* Jean-François Alcover, Dec 11 2019 *)
  • PARI
    a(n) = ([0,1,0,0,0,0; 0,0,1,0,0,0; 0,0,0,1,0,0; 0,0,0,0,1,0; 0,0,0,0,0,1; 1,1,0,0,1,0]^n*[1;0;1;0;1;1])[1,1] \\ Charles R Greathouse IV, Jul 28 2015
    
  • Sage
    def A079955_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-x^2-x^5-x^6) ).list()
    A079955_list(50) # G. C. Greubel, Dec 11 2019

Formula

a(n) = a(n-2) + a(n-5) + a(n-6).
G.f.: 1/(1 - x^2 - x^5 - x^6).

A079998 The characteristic function of the multiples of five.

Original entry on oeis.org

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

Views

Author

Vladimir Baltic, Feb 10 2003

Keywords

Comments

Number of permutations satisfying -k <= p(i) - i <= r and p(i) - i not in I, i = 1..n, with k = 2, r = 3, I = {-1, 0, 1, 2}.
a(n) = 1 if n = 5k, a(n) = 0 otherwise. Also, number of permutations satisfying -k <= p(i) - i <= r and p(i) - i not in I, i = 1..n, with k = 1, r = 4, I = {0, 1, 2, 3}.
a(n) is also the number of partitions of n with each part being five (a(0) = 1 because the empty partition has no parts to test equality with five). Hence a(n) is also the number of 2-regular graphs on n vertices with each component having girth exactly five. - Jason Kimberley, Oct 02 2011
This sequence is the Euler transformation of A185015. - Jason Kimberley, Oct 02 2011

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Characteristic function of multiples of g: A000007 (g = 0), A000012 (g = 1), A059841 (g = 2), A079978 (g = 3), A121262 (g = 4), this sequence (g = 5), A079979 (g = 6), A082784 (g = 7). - Jason Kimberley, Oct 14 2011

Programs

Formula

Recurrence: a(n) = a(n-5). G.f.: -1/(x^5 - 1).
a(n) = 1 - A011558(n); a(A008587(n)) = 1; a(A047201(n)) = 0. - Reinhard Zumkeller, Nov 30 2009
a(n) = floor(1/2*cos(2*n*Pi/5) + 1/2). - Gary Detlefs, May 16 2011
a(n) = floor(n/5) - floor((n-1)/5). - Tani Akinari, Oct 21 2012
a(n) = binomial(n - 1, 4) mod 5. - Wesley Ivan Hurt, Oct 06 2014

Extensions

More terms from Antti Karttunen, Dec 21 2017

A079979 Characteristic function of multiples of six.

Original entry on oeis.org

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

Views

Author

Vladimir Baltic, Feb 17 2003

Keywords

Comments

Period 6: repeat [1, 0, 0, 0, 0, 0].
a(n)=1 if n=6k, a(n)=0 otherwise.
Decimal expansion of 1/999999.
Number of permutations satisfying -k <= p(i)-i <= r and p(i)-i not in I, i=1..n, with k=3, r=3, I={-2,-1,0,1,2}.
Also, number of permutations satisfying -k <= p(i)-i <= r and p(i)-i not in I, i=1..n, with k=1, r=5, I={0,1,2,3,4}.
a(n) is also the number of partitions of n such that each part is six (a(0)=1 because the empty partition has no parts to test equality with six). Hence a(n) is also the number of 2-regular graphs on n vertices with each part having girth exactly six. - Jason Kimberley, Oct 10 2011
This sequence is the Euler transformation of A185016. - Jason Kimberley, Oct 10 2011

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Characteristic function of multiples of g: A000007 (g=0), A000012 (g=1), A059841 (g=2), A079978 (g=3), A121262 (g=4), A079998 (g=5), this sequence (g=6), A082784 (g=7).

Programs

Formula

a(n) = a(n-6).
G.f.: 1/(1-x^6).
a(n) = floor((1/2)*cos(n*Pi/3) + 1/2). - Gary Detlefs, May 16 2011
a(n) = floor(n/6) - floor((n-1)/6). - Tani Akinari, Oct 23 2012
a(n) = (((((v^n - w^n)^2)*(2 - (-1)^n)*(w^(2*n) + w^n - 3))^2 - 144)^2)/20736, where w = (-1+i*sqrt(3))/2, v = (1+i*sqrt(3))/2. - Bogart B. Strauss, Sep 20 2013
E.g.f.: (2*cos(sqrt(3)*x/2)*cosh(x/2) + cosh(x))/3. - Vaclav Kotesovec, Feb 15 2015

Extensions

More terms from Antti Karttunen, Dec 22 2017

A079977 Fibonacci numbers interspersed with zeros.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 3, 0, 5, 0, 8, 0, 13, 0, 21, 0, 34, 0, 55, 0, 89, 0, 144, 0, 233, 0, 377, 0, 610, 0, 987, 0, 1597, 0, 2584, 0, 4181, 0, 6765, 0, 10946, 0, 17711, 0, 28657, 0, 46368, 0, 75025, 0, 121393, 0, 196418, 0, 317811, 0, 514229, 0, 832040, 0, 1346269
Offset: 0

Views

Author

Vladimir Baltic, Feb 17 2003

Keywords

Comments

Number of permutations satisfying -k <= p(i)-i <= r and p(i)-i not in I, i=1..n, with k=1, r=3, I={0,2}.
Number of compositions of n into elements of the set {2,4}.
a(n-2) is the number of circular arrangements of the first n positive integers such that adjacent terms have absolute difference 1 or 3. - Ethan Patrick White, Jun 24 2020

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Programs

Formula

a(n) = A000045(k+1) if n=2k, a(n)=0 otherwise.
a(n) = a(n-2) + a(n-4).
G.f.: 1/(1 - x^2 - x^4).

Extensions

Editorial note: normally the alternate zeros are omitted from sequences like this. This entry is an exception. - N. J. A. Sloane

A079962 Number of permutations satisfying -k <= p(i) - i <= r and p(i) - i not in I, i=1..n, with k=1, r=5, I={1,3}.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 9, 14, 22, 36, 58, 94, 153, 247, 399, 646, 1045, 1691, 2737, 4428, 7164, 11592, 18756, 30348, 49105, 79453, 128557, 208010, 336567, 544577, 881145, 1425722, 2306866, 3732588, 6039454, 9772042, 15811497, 25583539, 41395035
Offset: 0

Views

Author

Vladimir Baltic, Feb 19 2003

Keywords

Comments

Number of compositions (ordered partitions) of n into elements of the set {1,3,5,6}. - Mark Dols, Aug 20 2010

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Programs

  • Magma
    [Round(Fibonacci(n+3)/4): n in [0..40]]; // G. C. Greubel, Jan 21 2022
    
  • Maple
    with(combinat,fibonacci): seq(round(fibonacci(n+3)/4),n=0..38) # Mircea Merca, Jan 04 2011
  • Mathematica
    LinearRecurrence[{1,0,1,0,1,1}, {1,1,1,2,3,5}, 41] (* G. C. Greubel, Jan 21 2022 *)
  • PARI
    a(n)=fibonacci(n+3)\/4 \\ Charles R Greathouse IV, Oct 07 2015
    
  • Sage
    [(1/4)*(fibonacci(n+3) + chebyshev_U(n,1/2) + chebyshev_U(2*n,1/2)) for n in (0..40)] # G. C. Greubel, Jan 21 2022

Formula

a(n) = a(n-1) + a(n-3) + a(n-5) + a(n-6).
G.f.: 1/((1+x+x^2)*(1-x+x^2)*(1-x-x^2)).
a(n+1)/a(n) -> golden ratio A001622. - Roger L. Bagula, Mar 13 2006
a(n) + a(n+2) + a(n+4) = Fibonacci(n+5). - Mark Dols, Aug 20 2010
a(n) = round(Fibonacci(n+3)/4). - Mircea Merca, Jan 04 2011
a(n+6) - a(n) = A000045(n+6). - Paul Curtz, Jun 29 2013
a(n) + a(n+1) + a(n+2) = A024490(n+6). - R. J. Mathar, Jun 30 2013
a(n) - a(n-1) + a(n-2) = A094686(n). - R. J. Mathar, Jun 30 2013
4*a(n) = A057078(n) + A010892(n) + A000045(n+3). - R. J. Mathar, Nov 02 2016
Showing 1-10 of 77 results. Next