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

A191673 Dispersion of A004773 (>1 and congruent to 0 or 1 or 2 mod 4), by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 8, 10, 11, 9, 12, 14, 16, 15, 13, 17, 20, 22, 21, 19, 18, 24, 28, 30, 29, 26, 23, 25, 33, 38, 41, 40, 36, 32, 27, 34, 45, 52, 56, 54, 49, 44, 37, 31, 46, 61, 70, 76, 73, 66, 60, 50, 42, 35, 62, 82, 94, 102, 98, 89, 81, 68, 57, 48, 39, 84
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

For a background discussion of dispersions, see A191426.
...
Each of the sequences (4n, n>2), (4n+1, n>0), (3n+2, n>=0), generates a dispersion. Each complement (beginning with its first term >1) also generates a dispersion. The six sequences and dispersions are listed here:
...
A191452=dispersion of A008586 (4k, k>=1)
A191667=dispersion of A016813 (4k+1, k>=1)
A191668=dispersion of A016825 (4k+2, k>=0)
A191669=dispersion of A004767 (4k+3, k>=0)
A191670=dispersion of A042968 (1 or 2 or 3 mod 4 and >=2)
A191671=dispersion of A004772 (0 or 1 or 3 mod 4 and >=2)
A191672=dispersion of A004773 (0 or 1 or 2 mod 4 and >=2)
A191673=dispersion of A004773 (0 or 2 or 3 mod 4 and >=2)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191452 has 1st col A042968, all else A008486
A191667 has 1st col A004772, all else A016813
A191668 has 1st col A042965, all else A016825
A191669 has 1st col A004773, all else A004767
A191670 has 1st col A008486, all else A042968
A191671 has 1st col A016813, all else A004772
A191672 has 1st col A016825, all else A042965
A191673 has 1st col A004767, all else A004773
...
Regarding the dispersions A191670-A191673, there is a formula for sequences of the type "(a or b or c mod m)", (as in the Mathematica program below):
If f(n)=(n mod 3), then (a,b,c,a,b,c,a,b,c,...) is given by
a*f(n+2)+b*f(n+1)+c*f(n), so that "(a or b or c mod m)" is given by
a*f(n+2)+b*f(n+1)+c*f(n)+m*floor((n-1)/3)), for n>=1.

Examples

			Northwest corner:
1....2....4....6....9
3....5....8....12...17
7....10...14...20...28
11...16...22...30...41
15...21...29...40...54
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12; c = 40; c1 = 12;
    a = 2; b = 4; c2 = 5; m[n_] := If[Mod[n, 3] == 0, 1, 0];
    f[n_] := a*m[n + 2] + b*m[n + 1] + c2*m[n] + 4*Floor[(n - 1)/3]
    Table[f[n], {n, 1, 30}] (* A004773 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191673 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191673 *)

A004767 a(n) = 4*n + 3.

Original entry on oeis.org

3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, 223
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0(12).
Binary expansion ends 11.
These the numbers for which zeta(2*x+1) needs just 2 terms to be evaluated. - Jorge Coveiro, Dec 16 2004 [This comment needs clarification]
a(n) is the smallest k such that for every r from 0 to 2n - 1 there exist j and i, k >= j > i > 2n - 1, such that j - i == r (mod (2n - 1)), with (k, (2n - 1)) = (j,(2n - 1)) = (i, (2n - 1)) = 1. - Amarnath Murthy, Sep 24 2003
Complement of A004773. - Reinhard Zumkeller, Aug 29 2005
Any (4n+3)-dimensional manifold endowed with a mixed 3-Sasakian structure is an Einstein space with Einstein constant lambda = 4n + 2 [Theorem 3, p. 10 of Ianus et al.]. - Jonathan Vos Post, Nov 24 2008
Solutions to the equation x^(2*x) = 3*x (mod 4*x). - Farideh Firoozbakht, May 02 2010
Subsequence of A022544. - Vincenzo Librandi, Nov 20 2010
First differences of A084849. - Reinhard Zumkeller, Apr 02 2011
Numbers n such that {1, 2, 3, ..., n} is a losing position in the game of Nim. - Franklin T. Adams-Watters, Jul 16 2011
Numbers n such that there are no primes p that satisfy the relationship p XOR n = p + n. - Brad Clardy, Jul 22 2012
The XOR of all numbers from 1 to a(n) is 0. - David W. Wilson, Apr 21 2013
A089911(4*a(n)) = 4. - Reinhard Zumkeller, Jul 05 2013
First differences of A014105. - Ivan N. Ianakiev, Sep 21 2013
All triangular numbers in the sequence are congruent to {3, 7} mod 8. - Ivan N. Ianakiev, Nov 12 2013
Apart from the initial term, length of minimal path on an n-dimensional cubic lattice (n > 1) of side length 2, until a self-avoiding walk gets stuck. Construct a path connecting all 2n points orthogonally adjacent from the center, ending at the center. Starting at any point adjacent to the center, there are 2 steps to reach each of the remaining 2n - 1 points, resulting in path length 4n - 2 with a final step connecting the center, for a total path length of 4n - 1, comprising 4n points. - Matthew Lehman, Dec 10 2013
a(n-1), n >= 1, appears as first column in the triangles A238476 and A239126 related to the Collatz problem. - Wolfdieter Lang, Mar 14 2014
For the Collatz Conjecture, we identify two types of odd numbers. This sequence contains all the ascenders: where (3*a(n) + 1) / 2 is odd and greater than a(n). See A016813 for the descenders. - Jaroslav Krizek, Jul 29 2016

Examples

			G.f. = 3 + 7*x + 11*x^2 + 15*x^3 + 19*x^4 + 23*x^5 + 27*x^6 + 31*x^7 + ...
		

References

  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 85.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999. See Theorem 8.1 on page 240.

Crossrefs

Cf. A017101 and A004771 (bisection: 3 and 7 mod 8).
Cf. A016838 (square).

Programs

Formula

G.f.: (3+x)/(1-x)^2. - Paul Barry, Feb 27 2003
a(n) = 2*a(n-1) - a(n-2) for n > 1, a(0) = 3, a(1) = 7. - Philippe Deléham, Nov 03 2008
a(n) = A017137(n)/2. - Reinhard Zumkeller, Jul 13 2010
a(n) = 8*n - a(n-1) + 2 for n > 0, a(0) = 3. - Vincenzo Librandi, Nov 20 2010
a(n) = A005408(A005408(n)). - Reinhard Zumkeller, Jun 27 2011
a(n) = 3 + A008586(n). - Omar E. Pol, Jul 27 2012
a(n) = A014105(n+1) - A014105(n). - Michel Marcus, Sep 21 2013
a(n) = A016813(n) + 2. - Jean-Bernard François, Sep 27 2013
a(n) = 4*n - 1, with offset 1. - Wesley Ivan Hurt, Mar 12 2014
From Ilya Gutkovskiy, Jul 29 2016: (Start)
E.g.f.: (3 + 4*x)*exp(x).
Sum_{n >= 0} (-1)^n/a(n) = (Pi + 2*log(sqrt(2) - 1))/(4*sqrt(2)) = A181049. (End)

A004523 Two even followed by one odd; or floor(2n/3).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Guenther Rosenbaum showed that the sequence represents the optimal number of guesses in the static Mastermind game with two pegs. Namely, the optimal number of static guesses equals 2k, if the number of colors is either (3k - 1) or 3k and is (2k + 1), if the number of colors is (3k + 1), k >= 1. - Alex Bogomolny, Mar 06 2002
First differences are in A011655. - R. J. Mathar, Mar 19 2008
a(n+1) is the maximum number of wins by a team in a sequence of n basketball games if the team's longest winning streak is 2 games. See example below. In general, floor(k(n+1)/(k+1)) gives the maximum number of wins in n games when the longest winning streak is of length k. - Dennis P. Walsh, Apr 18 2012
Sum_{n>=2} 1/a(n)^k = Sum_{j>=1} Sum_{i=1..2} 1/(i*j)^k = Zeta(k)^2 - Zeta(k)*Zeta(k,3), where Zeta(,) is the generalized Riemann zeta function, for the case k=2 this sum is 5*Pi^2/24. - Enrique Pérez Herrero, Jun 25 2012
a(n) is the pattern of (0+2k, 0+2k, 1+2k), k>=0. a(n) is also the number of odd integers divisible by 3 in ]2(n-1)^2, 2n^2[. - Ralf Steiner, Jun 25 2017
a(n) is also the total domination number of the n-triangular (Johnson) graph for n > 2. - Eric W. Weisstein, Apr 09 2018
a(n) is the maximum total domination number of connected graphs with order n>2. The extremal graphs are "brushes", as defined in the links below. - Allan Bickle, Dec 24 2021
a(n) is the minimal number of ascending or descending staircase walks necessary to cover a chessboard of size n-1, for n > 1. See Ackerman and Pinchasi. - Sela Fried, Jan 16 2023

Examples

			For n=11, we have a(11)=7 since there are at most 7 wins by a team in a sequence of 10 games in which its longest winning streak is 2 games. One such win-loss sequence with 7 wins is wwlwwlwwlw. - _Dennis P. Walsh_, Apr 18 2012
		

Crossrefs

Zero followed by partial sums of A011655.

Programs

  • Haskell
    a004523 n = a004523_list !! n
    a004523_list = 0 : 0 : 1 : map (+ 2) a004523_list
    -- Reinhard Zumkeller, Nov 06 2012
    
  • Magma
    [Floor(2*n/3): n in [0..50]]; // G. C. Greubel, Nov 02 2017
  • Maple
    seq(floor(2n/3), n=0..75);
  • Mathematica
    Table[Floor[2 n/3], {n, 0, 75}]
    Table[(6 n + 3 Cos[2 n Pi/3] - Sqrt[3] Sin[2 n Pi/3] - 3)/9, {n, 0, 20}] (* Eric W. Weisstein, Apr 08 2018 *)
    Floor[2 Range[0, 20]/3] (* Eric W. Weisstein, Apr 08 2018 *)
    LinearRecurrence[{1, 0, 1, -1}, {0, 1, 2, 2}, {0, 20}] (* Eric W. Weisstein, Apr 08 2018 *)
    CoefficientList[Series[x^2 (1 + x)/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Apr 08 2018 *)
    Table[If[EvenQ[n],{n,n},n],{n,0,50}]//Flatten (* Harvey P. Dale, May 27 2021 *)
  • PARI
    a(n)=2*n\3 \\ Charles R Greathouse IV, Sep 02 2015
    

Formula

G.f.: (x^2 + 2*x^3 + 2*x^4 + x^5)/(1 - x^3)^2, not reduced. - Len Smiley
a(n) = floor(2*n/3).
a(0) = a(1) = 0; for n > 1, a(n) = n - 1 - floor(a(n-1)/2). - Benoit Cloitre, Nov 26 2002
a(n) = a(n-1) + (1/2)*((-1)^floor((2*n+2)/3)+1), with a(0)=0. - Mario Catalani (mario.catalani(AT)unito.it), Oct 20 2003
a(n) = Sum_{k=0..n-1} (Fibonacci(k) mod 2). - Paul Barry, May 31 2005
a(n) = A004773(n) - A004396(n). - Reinhard Zumkeller, Aug 29 2005
O.g.f.: x^2*(1 + x)/((1 - x)^2*(1 + x + x^2)). - R. J. Mathar, Mar 19 2008
a(n) = ceiling(2*(n-1)/3) = n - 1 - floor((n-1)/3). - Bruno Berselli, Jan 18 2017
a(n) = (6*n - 3 + 2*sqrt(3)*sin(2*(n-2)*Pi/3))/9. - Wesley Ivan Hurt, Sep 30 2017
Sum_{n>=2} (-1)^n/a(n) = Pi/4 (A003881). - Amiram Eldar, Sep 29 2022

A042968 Numbers not divisible by 4.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 50, 51, 53, 54, 55, 57, 58, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 90, 91, 93, 94, 95, 97, 98, 99, 101, 102
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Equivalently, numbers whose square part is odd. Cf. A028982. - Peter Munn, Jul 14 2020
More generally the sequence of numbers not divisible by some fixed integer m >= 2 is given by a(n,m) = 1 + n + floor(n/(m-1)). - Benoit Cloitre, Jul 11 2009
Also a(n,m) = floor((m*n-1)/(m-1)) [with offset 1]. - Gary Detlefs, May 14 2011
Numbers not having more even than odd divisors: A048272(a(n)) >= 0. - Reinhard Zumkeller, Jan 21 2012
Extending the comments of Benoit Cloitre (Jul 11 2009) and Gary Detlefs (May 14 2011), the g.f. is A(m,x) = (1-x^m) / ((1-x^(m-1))*(1-x)^2) where m >= 2 is fixed. - Werner Schulte, Apr 26 2018

Examples

			G.f. = 1 + 2*x + 3*x^2 + 5*x^3 + 6*x^4 + 7*x^5 + 9*x^6 + 10*x^7 + 11*x^8 + ... - _Michael Somos_, Jun 17 2018
		

Crossrefs

Cf. A071619 (partial sums); A008586 (complement).
Numbers that are congruent to {k0,k1,k2} mod 4: A004772, A004773, A042965, a(n).

Programs

  • Haskell
    a042968 = (`div` 3) . (subtract 1) . (* 4)
    a042968_list = filter ((/= 0) . (`mod` 4)) [1..]
    -- Reinhard Zumkeller, Sep 02 2012
    
  • Magma
    [n+1+Floor(n/3): n in [0..80]]; // Vincenzo Librandi, Aug 03 2015
    
  • Maple
    seq(n+floor((n-1)/3), n=1..80); # Muniru A Asiru, Feb 17 2019
  • Mathematica
    Select[Table[n,{n,200}], Mod[#,4] != 0&] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011 *)
    LinearRecurrence[{1,0,1,-1},{1,2,3,5},80]  (* or *) Drop[Range[110],{4,-1,4}] (* Harvey P. Dale, Jan 07 2023 *)
  • PARI
    {a(n) = 1 + n + n\3};
    
  • Python
    def A042968(n): return n+(n-1)//3 # Chai Wah Wu, Apr 13 2025
  • Sage
    [1+n+floor(n/3) for n in (0..80)] # G. C. Greubel, Feb 17 2019
    

Formula

a(n) = a(n-1) + a(n-3) - a(n-4).
a(n) = a(n-3) + 4, with a(1) = 1.
G.f.: x * (1+x) * (1+x^2) / ( (1+x+x^2)*(1-x)^2 ). - Michael Somos, Jan 12 2000
A064680(A064680(a(n))) = a(n). - Reinhard Zumkeller, Oct 19 2001
Nearest integer to (Sum_{k>n} 1/k^4)/(Sum_{k>n} 1/k^5). - Benoit Cloitre, Jun 12 2003
a(n) = n + 1 + floor(n/3). - Benoit Cloitre, Jul 11 2009
a(n) = floor((4*n+3)/3). - Gary Detlefs, May 14 2011
A214546(a(n)) >= 0 for n > 0. - Reinhard Zumkeller, Jul 20 2012
a(n) = 2*n - ceiling(2*n/3) + 1. - Arkadiusz Wesolowski, Sep 21 2012
Sum_{k=0..n} a(n) = A071619(n+1). - L. Edson Jeffery, Jul 30 2014
The g.f. A(x) satisfies x*A(x)^2 = (B(x)/x)^2 + (B(x)/x), where B(x) is the o.g.f. of A042965. - Peter Bala, Apr 12 2017
a(n) = (12*n + 6 + 3*cos(2*n*Pi/3) + sqrt(3)*sin(2*n*Pi/3))/9. - Wesley Ivan Hurt, Sep 30 2017
Euler transform of length 4 sequence [2, 0, 1, -1]. - Michael Somos, Jun 17 2018
a(n) = -a(-1-n) for all n in Z. - Michael Somos, Jun 17 2018
E.g.f.: (2/3)*exp(x)*(1 + 2*x) + (1/9)*exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)). - Stefano Spezia, Nov 16 2019
a(n) = (12*n + 6 + w^(2*n)*(w + 2) - w^n*(w - 1))/9 where w = (-1 + sqrt(-3))/2. - Guenther Schrack, Jun 07 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(2)-1)*Pi/8. - Amiram Eldar, Dec 05 2021

Extensions

Edited by Peter Munn, Nov 16 2019
I restored my original (1999) definition and offset, which in the intervening 21 years had been lost. - N. J. A. Sloane, Jun 12 2021

A004396 One even number followed by two odd numbers.

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 37, 37, 38, 39, 39, 40, 41, 41, 42, 43, 43, 44, 45, 45, 46, 47, 47
Offset: 0

Views

Author

Keywords

Comments

Maximal number of points on a triangular grid of edge length n-1 with no 2 points on same row, column, or diagonal. See Problem 252 in The Inquisitive Problem Solver. - R. K. Guy [Comment revised by N. J. A. Sloane, Jul 01 2016]
See also Problem C2 of 2009 International Mathematical Olympiad. - Ruediger Jehn, Oct 19 2021
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(3).
Starting at 3, 3, ..., gives maximal number of acute angles in an n-gon. - Takenov Nurdin (takenov_vert(AT)e-mail.ru), Mar 04 2003
Let b(1) = b(2) = 1, b(k) = b(k-1)+( b(k-2) reduced (mod 2)); then a(n) = b(n-1). - Benoit Cloitre, Aug 14 2002
(1+x+x^2+x^3 ) / ( (1-x^2)*(1-x^3)) is the Poincaré series [or Poincare series] (or Molien series) for Sigma_4.
For n > 6, maximum number of knight moves to reach any square from the corner of an (n-2) X (n-2) chessboard. Likewise for n > 6, the maximum number of knight moves to reach any square from the middle of an (2n-5) X (2n-5) chessboard. - Ralf Stephan, Sep 15 2004
A transform of the Jacobsthal numbers A001045 under the mapping of g.f.s g(x)->g(x/(1+x^2)). - Paul Barry, Jan 16 2005
For n >= 1; a(n) = number of successive terms of A040001 that add to n; or length of n-th term of A028359. - Jaroslav Krizek, Mar 28 2010
For n > 0: a(n) = length of n-th row in A082870. - Reinhard Zumkeller, Apr 13 2014
Also the independence number of the n-triangular honeycomb queen graph. - Eric W. Weisstein, Jul 14 2017
In a game of basketball points can be accumulated by making field goals (two or three points) or free throws (one point). a(n) is the number of different ways to score n-1 points. For example, a score of 4 can be achieved in 3 different ways, with 2 shots (3+1 or 2+2), 3 shots (2+1+1) or 4 shots (1+1+1+1), so a(5) = 3. - Ivan N. Ianakiev, Mar 31 2025

Examples

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

References

  • J. Kurschak, Hungarian Mathematical Olympiads, 1976, Mir, Moscow.
  • Paul Vanderlind, Richard K. Guy, and Loren C. Larson, The Inquisitive Problem Solver, MAA, 2002. See Problem 252.

Crossrefs

Programs

  • Haskell
    a004396 n = a004396_list !! n
    a004396_list = 0 : 1 : 1 : map (+ 2) a004396_list
    -- Reinhard Zumkeller, Nov 06 2012
    
  • Magma
    [(Floor(n/3) + Ceiling(n/3)): n in [0..70]]; // Vincenzo Librandi, Aug 07 2011
    
  • Maple
    A004396:=n->floor((2*n + 1)/3); seq(A004396(n), n=0..100); # Wesley Ivan Hurt, Nov 30 2013
  • Mathematica
    Table[Floor[(2 n + 1)/3], {n, 0, 75}]
    With[{n = 50}, Riffle[Range[0, n], Range[1, n, 2], {3, -1, 3}]] (* Harvey P. Dale, May 14 2015 *)
    CoefficientList[Series[(x + x^3)/((1 - x) (1 - x^3)), {x, 0, 71}], x] (* Michael De Vlieger, Oct 27 2016 *)
    a[ n_] := Quotient[2 n + 1, 3]; (* Michael Somos, Oct 23 2017 *)
    a[ n_] := Sign[n] SeriesCoefficient[ (x + x^3) / ((1 - x) (1 - x^3)), {x, 0, Abs@n}]; (* Michael Somos, Oct 23 2017 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 1, 2, 3}, {0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
    f[-1]=0; f[n_]:=Length[Union[Plus@@@FrobeniusSolve[{1,2,3},n]]]; f/@Range[-1,100] (* Ivan N. Ianakiev, Mar 31 2025 *)
  • PARI
    a(n)=2*n\/3 \\ Charles R Greathouse IV, Apr 17 2012
    
  • Sage
    def a(n) : return( dimension_cusp_forms( Gamma0(3), 2*n+4) ); # Michael Somos, Jul 03 2014

Formula

G.f.: (x+x^3)/((1-x)*(1-x^3)).
a(n) = floor( (2*n + 1)/3 ).
a(n) = a(n-1) + (1/2)*((-1)^floor((4*n+2)/3) + 1), a(0) = 0. - Mario Catalani (mario.catalani(AT)unito.it), Oct 20 2003
a(n) = 2n/3 - cos(2*Pi*n/3 + Pi/3)/3 + sqrt(3)*sin(2*Pi*n/3 + Pi/3)/9. - Paul Barry, Mar 18 2004
a(n) = A096777(n+1) - A096777(n) for n > 0. - Reinhard Zumkeller, Jul 09 2004
From Paul Barry, Jan 16 2005: (Start)
G.f.: x*(1+x^2)/(1-x-x^3+x^4).
a(n) = a(n-1) + a(n-3) - a(n-4) for n>3.
a(n) = Sum_{k = 0..n} binomial(n-k-1, k)*(-1)^k*A001045(n-2k). (End)
a(n) = (A006369(n) - (A006369(n) mod 2) * (-1)^(n mod 3)) / (1 + A006369(n) mod 2). - Reinhard Zumkeller, Jan 23 2005
a(n) = A004773(n) - A004523(n). - Reinhard Zumkeller, Aug 29 2005
a(n) = floor(n/3) + ceiling(n/3). - Jonathan Vos Post, Mar 19 2006
a(n+1) = A008620(2n). - Philippe Deléham, Dec 14 2006
a(A032766(n)) = n. - Reinhard Zumkeller, Oct 30 2009
a(n) = floor((2*n^2+4*n+2)/(3*n+4)). - Gary Detlefs, Jul 13 2010
Euler transform of length 4 sequence [1, 1, 1, -1]. - Michael Somos, Jul 03 2014
a(n) = n - floor((n+1)/3). - Wesley Ivan Hurt, Sep 17 2015
a(n) = A092200(n) - floor((n+5)/3). - Filip Zaludek, Oct 27 2016
a(n) = -a(-n) for all n in Z. - Michael Somos, Oct 30 2016
E.g.f.: (2/9)*(3*exp(x)*x + sqrt(3)*exp(-x/2)*sin(sqrt(3)*x/2)). - Stefano Spezia, Sep 20 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/2. - Amiram Eldar, Sep 29 2022

A191667 Dispersion of A016813 (4k+1, k>1), by antidiagonals.

Original entry on oeis.org

1, 5, 2, 21, 9, 3, 85, 37, 13, 4, 341, 149, 53, 17, 6, 1365, 597, 213, 69, 25, 7, 5461, 2389, 853, 277, 101, 29, 8, 21845, 9557, 3413, 1109, 405, 117, 33, 10, 87381, 38229, 13653, 4437, 1621, 469, 133, 41, 11, 349525, 152917, 54613, 17749, 6485, 1877, 533
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

For a background discussion of dispersions, see A191426.
...
Each of the sequences (4n, n>2), (4n+1, n>0), (3n+2, n>=0), generates a dispersion. Each complement (beginning with its first term >1) also generates a dispersion. The six sequences and dispersions are listed here:
...
A191452=dispersion of A008586 (4k, k>=1)
A191667=dispersion of A016813 (4k+1, k>=1)
A191668=dispersion of A016825 (4k+2, k>=0)
A191669=dispersion of A004767 (4k+3, k>=0)
A191670=dispersion of A042968 (1 or 2 or 3 mod 4 and >=2)
A191671=dispersion of A004772 (0 or 1 or 3 mod 4 and >=2)
A191672=dispersion of A004773 (0 or 1 or 2 mod 4 and >=2)
A191673=dispersion of A004773 (0 or 2 or 3 mod 4 and >=2)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191452 has 1st col A042968, all else A008486
A191667 has 1st col A004772, all else A016813
A191668 has 1st col A042965, all else A016825
A191669 has 1st col A004773, all else A004767
A191670 has 1st col A008486, all else A042968
A191671 has 1st col A016813, all else A004772
A191672 has 1st col A016825, all else A042965
A191673 has 1st col A004767, all else A004773
...
Regarding the dispersions A191670-A191673, there is a formula for sequences of the type "(a or b or c mod m)", (as in the Mathematica program below):
If f(n)=(n mod 3), then (a,b,c,a,b,c,a,b,c,...) is given by a*f(n+2)+b*f(n+1)+c*f(n), so that "(a or b or c mod m)" is given by a*f(n+2)+b*f(n+1)+c*f(n)+m*floor((n-1)/3)), for n>=1.

Examples

			Northwest corner:
1....5....21....85....341
2....9....37....149...597
3....13...53....213...853
4....17...69....277...1109
6....25...101...405...1621
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    f[n_] := 4*n+1
    Table[f[n], {n, 1, 30}]  (* A016813 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191667 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191667  *)

A000969 Expansion of g.f. (1 + x + 2*x^2)/((1 - x)^2*(1 - x^3)).

Original entry on oeis.org

1, 3, 7, 12, 18, 26, 35, 45, 57, 70, 84, 100, 117, 135, 155, 176, 198, 222, 247, 273, 301, 330, 360, 392, 425, 459, 495, 532, 570, 610, 651, 693, 737, 782, 828, 876, 925, 975, 1027, 1080, 1134, 1190, 1247, 1305, 1365, 1426, 1488, 1552, 1617, 1683, 1751, 1820, 1890
Offset: 0

Views

Author

Keywords

Comments

From Paul Curtz, Oct 07 2018: (Start)
Terms that are on the x-axis of the following spiral (without 0):
28--29--29--30--31--31--32
|
27 13--14--15--15--16--17
| | |
27 13 4---5---5---6 17
| | | | |
26 12 3 0---1 7 18
| | | | | |
25 11 3---2---1 7 19
| | | |
25 11--10---9---9---8 19
| |
24--23--23--22--21--21--20 (End)
Diagonal 1, 4, 8, 13, 20, 28, ... (without 0) is A143978. - Bruno Berselli, Oct 08 2018

References

  • 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).

Crossrefs

Cf. A004773 (first differences), A092498 (partial sums).

Programs

  • Haskell
    a000969 = flip div 3 . a014105 . (+ 1)  -- Reinhard Zumkeller, Jun 23 2015
    
  • Magma
    [Floor(Binomial(2*n+3,2)/3): n in [0..60]]; // G. C. Greubel, Apr 18 2023
    
  • Maple
    A000969:=-(1+z+2*z**2)/(z**2+z+1)/(z-1)**3; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    f[x_, y_]:= Floor[Abs[y/x -x/y]]; Table[f[3, 2n^2+n+2], {n,53}] (* Robert G. Wilson v, Aug 11 2010 *)
    CoefficientList[Series[(1+x+2*x^2)/((1-x)^2*(1-x^3)), {x, 0, 50}], x] (* Stefano Spezia, Oct 08 2018 *)
  • PARI
    a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; 1,-2,1,-1,2]^n*[1;3;7;12;18])[1,1] \\ Charles R Greathouse IV, May 10 2016
    
  • SageMath
    [(binomial(2*n+3,2)//3) for n in range(61)] # G. C. Greubel, Apr 18 2023

Formula

a(n) = floor( (2*n+3)*(n+1)/3 ). Or, a(n) = (2*n+3)*(n+1)/3 but subtract 1/3 if n == 1 mod 3. - N. J. A. Sloane, May 05 2010
a(2^k-2) = A139250(2^k-1), k >= 1. - Omar E. Pol, Feb 13 2010
a(n) = Sum_{i=0..n} floor(4*i/3). - Enrique Pérez Herrero, Apr 21 2012
a(n) = +2*a(n-1) -1*a(n-2) +1*a(n-3) -2*a(n-4) +1*a(n-5). - Joerg Arndt, Apr 22 2012
a(n) = A014105(n+1) = A258708(n+3,n). - Reinhard Zumkeller, Jun 23 2015
Sum_{n>=0} 1/a(n) = 6 - Pi/sqrt(3) - 10*log(2)/3. - Amiram Eldar, Oct 01 2022
E.g.f.: (exp(x)*(8 + 21*x + 6*x^2) + exp(-x/2)*(cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, Apr 05 2023

A191670 Dispersion of A042968 (>1 and congruent to 1 or 2 or 3 mod 4), by antidiagonals.

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 5, 9, 11, 12, 7, 13, 15, 17, 16, 10, 18, 21, 23, 22, 20, 14, 25, 29, 31, 30, 27, 24, 19, 34, 39, 42, 41, 37, 33, 28, 26, 46, 53, 57, 55, 50, 45, 38, 32, 35, 62, 71, 77, 74, 67, 61, 51, 43, 36, 47, 83, 95, 103, 99, 90, 82, 69, 58, 49, 40, 63
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

For a background discussion of dispersions, see A191426.
...
Each of the sequences (4n, n>2), (4n+1, n>0), (3n+2, n>=0), generates a dispersion. Each complement (beginning with its first term >1) also generates a dispersion. The six sequences and dispersions are listed here:
...
A191452=dispersion of A008586 (4k, k>=1)
A191667=dispersion of A016813 (4k+1, k>=1)
A191668=dispersion of A016825 (4k+2, k>=0)
A191669=dispersion of A004767 (4k+3, k>=0)
A191670=dispersion of A042968 (1 or 2 or 3 mod 4 and >=2)
A191671=dispersion of A004772 (0 or 1 or 3 mod 4 and >=2)
A191672=dispersion of A004773 (0 or 1 or 2 mod 4 and >=2)
A191673=dispersion of A004773 (0 or 2 or 3 mod 4 and >=2)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191452 has 1st col A042968, all else A008486
A191667 has 1st col A004772, all else A016813
A191668 has 1st col A042965, all else A016825
A191669 has 1st col A004773, all else A004767
A191670 has 1st col A008486, all else A042968
A191671 has 1st col A016813, all else A004772
A191672 has 1st col A016825, all else A042965
A191673 has 1st col A004767, all else A004773
...
Regarding the dispersions A191670-A191673, there is a formula for sequences of the type "(a or b or c mod m)", (as in the Mathematica program below):
If f(n)=(n mod 3), then (a,b,c,a,b,c,a,b,c,...) is given by
a*f(n+2)+b*f(n+1)+c*f(n), so that "(a or b or c mod m)" is given by
a*f(n+2)+b*f(n+1)+c*f(n)+m*floor((n-1)/3)), for n>=1.

Examples

			Northwest corner:
1....2....3....5....7
4....6....9....13...18
8....11...15...21...29
12...17...23...31...42
16...22...30...41...55
		

Crossrefs

Row 1: A155167, Row 2: A171861.

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12; c = 40; c1 = 12;
    a = 2; b = 3; c2 = 5; m[n_] := If[Mod[n, 3] == 0, 1, 0];
    f[n_] := a*m[n + 2] + b*m[n + 1] + c2*m[n] + 4*Floor[(n - 1)/3]
    Table[f[n], {n, 1, 30}] (* A042968 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191670 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191670 *)

A047226 Numbers that are congruent to {0, 1, 2, 3, 4} mod 6; a(n)=floor(6(n-1)/5).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 78, 79
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [0..100] | n mod 6 in [0..4]]; // Vincenzo Librandi, Jan 06 2013
  • Maple
    A047226 := proc(n)
        option remember;
        if n <= 6 then
            op(n,[0,1,2,3,4,6]) ;
        else
            procname(n-1)+procname(n-5)-procname(n-6) ;
        end if;
    end proc: # R. J. Mathar, Jul 25 2013
  • Mathematica
    Select[Range[0, 100], MemberQ[{0, 1, 2, 3, 4}, Mod[#, 6]]&] (* Vincenzo Librandi, Jan 06 2013 *)

Formula

G.f.: x^2*(1+x+x^2+x^3+2*x^4) / ( (x^4+x^3+x^2+x+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Sep 17 2015, Jul 16 2013: (Start)
a(n) = floor( 6*(n-1)/5 ).
a(n) = a(n-1) + a(n-5) - a(n-6) for n>6.
a(n) = n - 1 + floor((n-1)/5). (End)
Sum_{n>=2} (-1)^n/a(n) = (9-4*sqrt(3))*Pi/36 + log(2+sqrt(3))/(2*sqrt(3)) + log(2)/6. - Amiram Eldar, Dec 17 2021

Extensions

Explicit formula added to definition by M. F. Hasler, Oct 05 2014

A191668 Dispersion of A016825 (4k+2, k>0), by antidiagonals.

Original entry on oeis.org

1, 2, 3, 6, 10, 4, 22, 38, 14, 5, 86, 150, 54, 18, 7, 342, 598, 214, 70, 26, 8, 1366, 2390, 854, 278, 102, 30, 9, 5462, 9558, 3414, 1110, 406, 118, 34, 11, 21846, 38230, 13654, 4438, 1622, 470, 134, 42, 12, 87382, 152918, 54614, 17750, 6486, 1878, 534, 166
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

For a background discussion of dispersions, see A191426.
...
Each of the sequences (4n, n>2), (4n+1, n>0), (3n+2, n>=0), generates a dispersion. Each complement (beginning with its first term >1) also generates a dispersion. The six sequences and dispersions are listed here:
...
A191452=dispersion of A008586 (4k, k>=1)
A191667=dispersion of A016813 (4k+1, k>=1)
A191668=dispersion of A016825 (4k+2, k>=0)
A191669=dispersion of A004767 (4k+3, k>=0)
A191670=dispersion of A042968 (1 or 2 or 3 mod 4 and >=2)
A191671=dispersion of A004772 (0 or 1 or 3 mod 4 and >=2)
A191672=dispersion of A004773 (0 or 1 or 2 mod 4 and >=2)
A191673=dispersion of A004773 (0 or 2 or 3 mod 4 and >=2)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191452 has 1st col A042968, all else A008486
A191667 has 1st col A004772, all else A016813
A191668 has 1st col A042965, all else A016825
A191669 has 1st col A004773, all else A004767
A191670 has 1st col A008486, all else A042968
A191671 has 1st col A016813, all else A004772
A191672 has 1st col A016825, all else A042965
A191673 has 1st col A004767, all else A004773
...
Regarding the dispersions A191670-A191673, there is a formula for sequences of the type "(a or b or c mod m)", (as in the Mathematica program below):
If f(n)=(n mod 3), then (a,b,c,a,b,c,a,b,c,...) is given by
a*f(n+2)+b*f(n+1)+c*f(n), so that "(a or b or c mod m)" is given by
a*f(n+2)+b*f(n+1)+c*f(n)+m*floor((n-1)/3)), for n>=1.

Examples

			Northwest corner:
.    1   2    6   22    86    342   1366    5462   21846    87382
.    3  10   38  150   598   2390   9558   38230  152918   611670
.    4  14   54  214   854   3414  13654   54614  218454   873814
.    5  18   70  278  1110   4438  17750   70998  283990  1135958
.    7  26  102  406  1622   6486  25942  103766  415062  1660246
.    8  30  118  470  1878   7510  30038  120150  480598  1922390
.    9  34  134  534  2134   8534  34134  136534  546134  2184534
.   11  42  166  662  2646  10582  42326  169302  677206  2708822
.   12  46  182  726  2902  11606  46422  185686  742742  2970966
.   13  50  198  790  3158  12630  50518  202070  808278  3233110
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    f[n_] := 4*n-2
    Table[f[n], {n, 1, 30}]  (* A016825 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191668 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191668 *)
    (* Conjectured: *) Grid[Table[(8 + (3*Floor[(4*n + 1)/3] - 2)*4^k)/12, {n, 10}, {k, 10}]] (* L. Edson Jeffery, Feb 14 2015 *)

Formula

Conjecture: a(n,k) = (8 + (3*floor((4*n + 1)/3) - 2)*4^k)/12 = (8 + (3*A042965(n+1) - 2)*A000302(k))/12. - L. Edson Jeffery, Feb 14 2015
Showing 1-10 of 30 results. Next