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 10 results.

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

A174709 Partial sums of floor(n/6).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 21, 24, 27, 30, 33, 36, 40, 44, 48, 52, 56, 60, 65, 70, 75, 80, 85, 90, 96, 102, 108, 114, 120, 126, 133, 140, 147, 154, 161, 168, 176, 184, 192
Offset: 0

Views

Author

Mircea Merca, Nov 30 2010

Keywords

Comments

Partial sums of A152467.

Examples

			a(7) = floor(0/6) + floor(1/6) + floor(2/6) + floor(3/6) + floor(4/6) + floor(5/6) + floor(6/6) + floor(7/6) = 0 + 0 + 0 + 0 + 0 + 0 + 1 + 1 = 2.
		

Crossrefs

Programs

Formula

a(n) = round(n*(n-4)/12) = round((2*n^2 - 8*n - 1)/24).
a(n) = floor((n-2)^2/12).
a(n) = ceiling((n+1)*(n-5)/12).
a(n) = a(n-6) + n - 5, n > 5.
From R. J. Mathar, Nov 30 2010: (Start)
a(n) = 2*a(n-1) - a(n-2) + a(n-6) - 2*a(n-7) + a(n-8).
G.f.: -x^6 / ( (1+x)*(x^2-x+1)*(1+x+x^2)*(x-1)^3 ).
a(n) = -n/3 + 5/72 + n^2/12 + (-1)^n/24 + A057079(n+5)/6 + A061347(n)/18. (End)
a(6n) = A000567(n), a(6n+1) = 2*A000326(n), a(6n+2) = A033428(n), a(6n+3) = A049451(n), a(6n+4) = A045944(n), a(6n+5) = A028896(n). - Philippe Deléham, Mar 26 2013
a(n) = A008724(n-2). - R. J. Mathar, Jul 10 2015
Sum_{n>=6} 1/a(n) = Pi^2/18 - Pi/(2*sqrt(3)) + 49/12. - Amiram Eldar, Aug 13 2022

A132270 a(n) = floor((n^7-1)/(7*n^6)), which is the same as integers repeated 7 times.

Original entry on oeis.org

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

Views

Author

Mohammad K. Azarian, Nov 06 2007

Keywords

Crossrefs

Cf. A004526 ([n/2]), A002264 ([n/3]), A002265 ([n/4]), A002266 ([n/5]), A054895.
Cf. A152467 ([n/6]), A132292 ([(n-1)/8]).
Cf. A002162.

Programs

Formula

a(n) = floor((n^7-n^6)/(7*n^6-6*n^5)). - Mohammad K. Azarian, Nov 08 2007
G.f.: x^8/(1-x-x^7+x^8). - Robert Israel, Feb 02 2015
a(n) = a(n-1)+a(n-7)-a(n-8). - Wesley Ivan Hurt, May 03 2021
a(n) = floor((n-1)/7). - M. F. Hasler, May 19 2021
Sum_{n>=8} (-1)^n/a(n) = log(2) (A002162). - Amiram Eldar, Sep 30 2022

Extensions

Offset corrected by Mohammad K. Azarian, Nov 19 2008

A010881 Simple periodic sequence: n mod 12.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The value of the rightmost digit in the base-12 representation of n. - Hieronymus Fischer, Jun 11 2007

Examples

			a(27) = 3 since 27 = 12*2+3.
		

Crossrefs

Partial sums: A130490. Other related sequences A130481, A130482, A130483, A130484, A130485, A130486, A130487, A130488, A130489.

Programs

Formula

From Hieronymus Fischer, May 31 2007: (Start)
a(n) = n mod 12.
Complex representation: a(n) = (1/12)*(1-r^n)*Sum_{k=1..11} k*Product_{m=1..11, m<>k} (1-r^(n-m)) where r = exp(Pi/6*i) = (sqrt(3)+i)/2 and i = sqrt(-1).
Trigonometric representation: a(n) = (512/3)^2*(sin(n*Pi/12))^2*Sum_{k=1..11} k*Product_{m=1..11, m<>k} (sin((n-m)*Pi/12))^2.
G.f.: (Sum_{k=1..11} k*x^k)/(1-x^12).
G.f.: x*(11*x^12-12*x^11+1)/((1-x^12)*(1-x)^2). (End)
From Hieronymus Fischer, Jun 11 2007: (Start)
a(n) = (n mod 2)+2*(floor(n/2) mod 6) = A000035(n)+2*A010875(A004526(n)).
a(n) = (n mod 3)+3*(floor(n/3) mod 4) = A010872(n)+3*A010873(A002264(n)).
a(n) = (n mod 4)+4*(floor(n/4) mod 3) = A010873(n)+4*A010872(A002265(n)).
a(n) = (n mod 6)+6*(floor(n/6) mod 2) = A010875(n)+6*A000035(A152467(n)).
a(n) = (n mod 2)+2*(floor(n/2) mod 2)+4*(floor(n/4) mod 3) = A000035(n)+2*A000035(A004526(n))+4*A010872(A002265(n)). (End)
a(A001248(k) + 17) = 6 for k>2. - Reinhard Zumkeller, May 12 2010
a(n) = A034326(n+1)-1. - M. F. Hasler, Sep 25 2014

A123919 Number of numbers congruent to 2 or 4 mod 6 and <= n.

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, Oct 29 2006

Keywords

Comments

First differences of A056827. - R. J. Mathar, Nov 22 2008
a(n+2) is the graph radius of the n X n knight graph for n > 7. - Eric W. Weisstein, Nov 20 2019

Crossrefs

Programs

  • GAP
    a:=[0,1,1,2,2,2,2];; for n in [8..80] do a[n]:=a[n-1]+a[n-6]-a[n-7]; od; a; # G. C. Greubel, Aug 07 2019
    
  • Magma
    [Floor(n/2) - Floor(n/6) : n in [1..100]]; // Wesley Ivan Hurt, Apr 26 2021
  • Mathematica
    a[n_] := Floor[n/2] - Floor[n/6]; Array[a, 80] (* Robert G. Wilson v, Oct 29 2006 *)
    LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {0, 1, 1, 2, 2, 2, 2}, 80] (* G. C. Greubel, Aug 07 2019 *)
  • PARI
    my(x='x+O('x^80)); concat([0], Vec(x^2*(1+x^2)/((1-x)*(1-x^6)))) \\ G. C. Greubel, Aug 07 2019
    
  • PARI
    a(n) = floor(n/2) - floor(n/6);  \\ Joerg Arndt, Nov 23 2019
    

Formula

a(n) = floor(n/2) - floor(n/6).
From R. J. Mathar, Nov 22 2008: (Start)
G.f.: x^2*(1+x^2)/((1+x)*(1-x)^2*(1+x+x^2)*(1-x+x^2)).
a(n+1) - a(n) = A120325(n+1). (End)
a(n) = A004526(n) - A152467(n). - Omar E. Pol, Nov 25 2019
a(n) = a(n-1)+a(n-6)-a(n-7). - Wesley Ivan Hurt, Apr 26 2021
a(n) = floor((2*n+3+(-1)^n)/6). - Adriano Caroli, Mar 14 2025

A117910 Expansion of (1 + x + x^2 + x^4)/((1-x^3)*(1-x^6)).

Original entry on oeis.org

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

Views

Author

Paul Barry, Apr 01 2006

Keywords

Comments

Diagonal sums of A117908.
Appears to be a permutation of floor((n+5)/5).

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 100); Coefficients(R!( (1+x+x^2+x^4)/((1-x^3)*(1-x^6)) )); // G. C. Greubel, Oct 21 2021
    
  • Mathematica
    CoefficientList[Series[(1+x+x^2+x^4)/((1-x^3)(1-x^6)),{x,0,100}],x] (* or *) LinearRecurrence[{0,0,1,0,0,1,0,0,-1},{1,1,1,1,2,1,2,3,2},100] (* Harvey P. Dale, Apr 10 2014 *)
    Table[If[Mod[n,3]==1, Mod[Binomial[n+2,3], n+2], Floor[(n+6)/6]], {n, 0, 100}] (* G. C. Greubel, Nov 18 2021 *)
  • Sage
    def A117910_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+x+x^2+x^4)/((1-x^3)*(1-x^6)) ).list()
    A117910_list(100) # G. C. Greubel, Oct 21 2021

Formula

a(n) = a(n-3) + a(n-6) - a(n-9).
a(n) = Sum_{k=0..floor(n/2)} 0^abs(L(C(n-k,2)/3) - 2*L(C(k,2)/3)) where L(j/p) is the Legendre symbol of j and p.
From G. C. Greubel, Nov 18 2021: (Start)
a(n) = A152467(n+3) + A152467(n+6) if n == 1 (mod 3), otherwise A152467(n+6).
a(n) = A175676(n+2) if n == 1 (mod 3), otherwise A152467(n+6).
a(n) = A002264(n+3) if n == 1 (mod 3), otherwise A152467(n+6). (End)

A260307 a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-6) - a(n-7) - a(n-8) + a(n-9) with a(0) - a(8) as shown below.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 8, 7, 10, 9, 13, 10, 15, 12, 17, 14, 20, 15, 22, 17, 24, 19, 27, 20, 29, 22, 31, 24, 34, 25, 36, 27, 38, 29, 41, 30, 43, 32, 45, 34, 48, 35, 50, 37, 52, 39, 55, 40, 57, 42, 59, 44, 62, 45, 64, 47, 66, 49, 69, 50, 71, 52, 73, 54, 76, 55, 78
Offset: 0

Views

Author

Paul Curtz, Nov 22 2015

Keywords

Comments

A260708 difference table rows have the same nine-step recurrence:
0, 1, 3, 6, 10, 16, 21, 29, 36, 46, 55, 65, 78, 93, ...
1, 2, 3, 4, 6, 5, 8, 7, 10, 9, 13, 10, 15, 12, ... = a(n)
1, 1, 1, 2, -1, 3, -1, 3, -1, 4, -3, 5, -3, 5, ... = b(n)
0, 0, 1, -3, 4, -4, 4, -4, 5, -7, 8, -8, 8, -8, ... (see A042965(n)).
(b(2n) + b(2n+1) = A052901(n+2).)

Crossrefs

Cf. A004767, A010718, A042965, A047212, A047282, A052901, A152467, A260160 (eight-step recurrence), A260699 (nine-step recurrence), A260708.

Programs

  • Magma
    I:=[1,2,3,4,6,5,8,7];[n le 8 select I[n] else Self(n-2) + Self(n-6) - Self(n-8): n in [1..70]]; // Vincenzo Librandi, Dec 26 2015
  • Mathematica
    RecurrenceTable[{a[n] == a[n-2] + a[n-6] - a[n-8], a[0]=1, a[1]=2, a[2]=3, a[3]=4, a[4]=6, a[5]=5, a[6]=8, a[7]=7}, a, {n,0,100}] (* G. C. Greubel, Nov 23 2015 *)
  • PARI
    Vec((x^6+x^5+3*x^4+2*x^3+2*x^2+2*x+1)/((x-1)^2*(x+1)^2*(x^2-x+1)*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Nov 22 2015
    
  • PARI
    vector(100, n, n--; n + (-1)^n *((n+2)\6) + 1) \\ Altug Alkan, Nov 24 2015
    

Formula

a(2n) = A047282(n). a(2n+1) = A047212(n+1).
a(n) = A260708(n+1) - A260708(n).
a(n+6) = a(n) + period of length 2: repeat 7, 5.
a(2n) + a(2n+1) = 3 + 4*n.
a(n) = n + 1 + (-1)^n*A152467(n+2).
From Colin Barker, Nov 22 2015: (Start)
a(n) = a(n-2) + a(n-6) - a(n-8) for n>7.
G.f.: (x^6+x^5+3*x^4+2*x^3+2*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2-x+1)*(x^2+x+1)).
(End)

A343609 a(n) = floor(n/9).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, May 19 2021

Keywords

Comments

Also: Nonnegative integers repeated 9 times (with natural offset 0).

Crossrefs

Cf. A004526 ([n/2]), A002264 ([n/3]), A002265 ([n/4]), A002266 ([n/5]), A152467 ([n/6]), A132270 ([(n-1)/7]), A132292 ([(n-1)/8]), A059995 ([n/10]), A344420 ([n/11]), A342696 ([n/12]).
Repunits A002275 = A343609 o A011557.

Programs

  • Maple
    A343609 := n -> iquo(n,9); # illustration: map( A343609, [$0..99] );
  • Mathematica
    A343609[n_] := Floor[n/9]
    a[n_] := Quotient[n, 9]; Array[a, 100, 0] (* Amiram Eldar, May 19 2021 *)
    LinearRecurrence[{1,0,0,0,0,0,0,0,1,-1},{0,0,0,0,0,0,0,0,0,1},100] (* Harvey P. Dale, Mar 01 2025 *)
  • PARI
    apply( A343609(n)=n\9, [0..99])

Formula

a(n) = A002264(A002264(n)).
a(n) = a(n-1) + a(n-9) - a(n-10), n > 9;
G.f.: x^9/(1 - x - x^9 + x^10).

A242602 Integers repeated thrice in a canonical order.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Jun 17 2014

Keywords

Comments

See the comments under A242601 for the k-family of sequences s(k,n), k = 1, 2, ..., and n >= 0. The present sequence is s(3,k). See the Myerson-van der Poorten link, p. 4.

Crossrefs

Cf. A242601, A152467 (unsigned version with three additional leading zeros).

Formula

O.g.f.: x^3/((1 + x^3)^2*(1 - x)) = x^3/(1 - x + 2*x^3 - 2*x^4 + x^6 - x^7).
a(n) = a(n-1) - 2*a(n-3) + 2*a(n-4) - a(n-6) + a(n-7), n >= 7, with a(0) = a(1) = a(2) = 0, a(3) = a(4) = a(5) = 1 and a(6) = -1.
a(n) = floor((n+3)/6)*(-1)^floor((n+3)/3), n >= 0.

A358370 a(n) is the size of the largest 3-independent set in the cyclic group Zn.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Nov 12 2022

Keywords

Crossrefs

Programs

  • Mathematica
    b[n_]:=Min[Intersection[Divisors[n], Select[Prime[Range[PrimePi[n]]], Mod[#, 6]==5 &]]]; a[n_]:=If[EvenQ[n], Floor[n/4], If[IntegerQ[b[n]], (1+1/b[n])n/6, Floor[n/6]]]; Array[a,80]

Formula

a(n) = floor(n/4) if n is even, a(n) = (1 + 1/p)*n/6 if n is odd with smallest prime divisor p congruent 5 mod 6, and a(n) = floor(n/6) otherwise.
Showing 1-10 of 10 results.