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

A032766 Numbers that are congruent to 0 or 1 (mod 3).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 90, 91, 93, 94, 96, 97, 99, 100, 102, 103
Offset: 0

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

Omitting the initial 0, a(n) is the number of 1's in the n-th row of the triangle in A118111. - Hans Havermann, May 26 2002
Binomial transform is A053220. - Michael Somos, Jul 10 2003
Smallest number of different people in a set of n-1 photographs that satisfies the following conditions: In each photograph there are 3 women, the woman in the middle is the mother of the person on her left and is a sister of the person on her right and the women in the middle of the photographs are all different. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
Partial sums of A000034. - Richard Choulet, Jan 28 2010
Starting with 1 = row sums of triangle A171370. - Gary W. Adamson, Feb 15 2010
a(n) is the set of values for m in which 6k + m can be a perfect square (quadratic residues of 6 including trivial case of 0). - Gary Detlefs, Mar 19 2010
For n >= 2, a(n) is the smallest number with n as an anti-divisor. - Franklin T. Adams-Watters, Oct 28 2011
Sequence is also the maximum number of floors with 3 elevators and n stops in a "Convenient Building". See A196592 and Erich Friedman link below. - Robert Price, May 30 2013
a(n) is also the total number of coins left after packing 4-curves patterns (4c2) into a fountain of coins base n. The total number of 4c2 is A002620 and voids left is A000982. See illustration in links. - Kival Ngaokrajang, Oct 26 2013
Number of partitions of 6n into two even parts. - Wesley Ivan Hurt, Nov 15 2014
Number of partitions of 3n into exactly 2 parts. - Colin Barker, Mar 23 2015
Nonnegative m such that floor(2*m/3) = 2*floor(m/3). - Bruno Berselli, Dec 09 2015
For n >= 3, also the independence number of the n-web graph. - Eric W. Weisstein, Dec 31 2015
Equivalently, nonnegative numbers m for which m*(m+2)/3 and m*(m+5)/6 are integers. - Bruno Berselli, Jul 18 2016
Also the clique covering number of the n-Andrásfai graph for n > 0. - Eric W. Weisstein, Mar 26 2018
Maximum sum of degeneracies over all decompositions of the complete graph of order n+1 into three factors. The extremal decompositions are characterized in the Bickle link below. - Allan Bickle, Dec 21 2021
Also the Hadwiger number of the n-cocktail party graph. - Eric W. Weisstein, Apr 30 2022
The number of integer rectangles with a side of length n+1 and the property: the bisectors of the angles form a square within its limits. - Alexander M. Domashenko, Oct 17 2024
The maximum possible number of 5-cycles in an outerplanar graph on n+4 vertices. - Stephen Bartell, Jul 10 2025

Crossrefs

Cf. A006578 (partial sums), A000034 (first differences), A016789 (complement).
Essentially the same: A049624.
Column 1 (the second leftmost) of triangular table A026374.
Column 1 (the leftmost) of square array A191450.
Row 1 of A254051.
Row sums of A171370.
Cf. A066272 for anti-divisors.
Cf. A253888 and A254049 (permutations of this sequence without the initial zero).
Cf. A254103 and A254104 (pair of permutations based on this sequence and its complement).

Programs

  • Haskell
    a032766 n = div n 2 + n  -- Reinhard Zumkeller, Dec 13 2014
    (MIT/GNU Scheme) (define (A032766 n) (+ n (floor->exact (/ n 2)))) ;; Antti Karttunen, Jan 24 2015
    
  • Magma
    &cat[ [n, n+1]: n in [0..100 by 3] ]; // Vincenzo Librandi, Nov 16 2014
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+3 od: seq(a[n], n=0..69); # Zerinvary Lajos, Mar 16 2008
    seq(floor(n/2)+n, n=0..69); # Gary Detlefs, Mar 19 2010
    select(n->member(n mod 3,{0,1}), [$0..103]); # Peter Luschny, Apr 06 2014
  • Mathematica
    a[n_] := a[n] = 2a[n - 1] - 2a[n - 3] + a[n - 4]; a[0] = 0; a[1] = 1; a[2] = 3; a[3] = 4; Array[a, 60, 0] (* Robert G. Wilson v, Mar 28 2011 *)
    Select[Range[0, 200], MemberQ[{0, 1}, Mod[#, 3]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
    Flatten[{#,#+1}&/@(3Range[0,40])] (* or *) LinearRecurrence[{1,1,-1}, {0,1,3}, 100] (* or *) With[{nn=110}, Complement[Range[0,nn], Range[2,nn,3]]] (* Harvey P. Dale, Mar 10 2013 *)
    CoefficientList[Series[x (1 + 2 x) / ((1 - x) (1 - x^2)), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 16 2014 *)
    Floor[3 Range[0, 69]/2] (* L. Edson Jeffery, Jan 14 2017 *)
    Drop[Range[0,110],{3,-1,3}] (* Harvey P. Dale, Sep 02 2023 *)
  • PARI
    {a(n) = n + n\2}
    
  • PARI
    concat(0, Vec(x*(1+2*x)/((1-x)*(1-x^2)) + O(x^100))) \\ Altug Alkan, Dec 09 2015
    
  • SageMath
    [int(3*n//2) for n in range(101)] # G. C. Greubel, Jun 23 2024

Formula

G.f.: x*(1+2*x)/((1-x)*(1-x^2)).
a(-n) = -A007494(n).
a(n) = A049615(n, 2), for n > 2.
From Paul Barry, Sep 04 2003: (Start)
a(n) = (6n - 1 + (-1)^n)/4.
a(n) = floor((3n + 2)/2) - 1 = A001651(n) - 1.
a(n) = sqrt(2) * sqrt( (6n-1) (-1)^n + 18n^2 - 6n + 1 )/4.
a(n) = Sum_{k=0..n} 3/2 - 2*0^k + (-1)^k/2. (End)
a(n) = 3*floor(n/2) + (n mod 2) = A007494(n) - A000035(n). - Reinhard Zumkeller, Apr 04 2005
a(n) = 2 * A004526(n) + A004526(n+1). - Philippe Deléham, Aug 07 2006
a(n) = 1 + ceiling(3*(n-1)/2). - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
Row sums of triangle A133083. - Gary W. Adamson, Sep 08 2007
a(n) = (cos(Pi*n) - 1)/4 + 3*n/2. - Bart Snapp (snapp(AT)coastal.edu), Sep 18 2008
A004396(a(n)) = n. - Reinhard Zumkeller, Oct 30 2009
a(n) = floor(n/2) + n. - Gary Detlefs, Mar 19 2010
a(n) = 3n - a(n-1) - 2, for n>0, a(0)=0. - Vincenzo Librandi, Nov 19 2010
a(n) = n + (n-1) - (n-2) + (n-3) - ... 1 = A052928(n) + A008619(n-1). - Jaroslav Krizek, Mar 22 2011
a(n) = a(n-1) + a(n-2) - a(n-3). - Robert G. Wilson v, Mar 28 2011
a(n) = Sum_{k>=0} A030308(n,k) * A003945(k). - Philippe Deléham, Oct 17 2011
a(n) = 2n - ceiling(n/2). - Wesley Ivan Hurt, Oct 25 2013
a(n) = A000217(n) - 2 * A002620(n-1). - Kival Ngaokrajang, Oct 26 2013
a(n) = Sum_{i=1..n} gcd(i, 2). - Wesley Ivan Hurt, Jan 23 2014
a(n) = 2n + floor((-n - (n mod 2))/2). - Wesley Ivan Hurt, Mar 31 2014
A092942(a(n)) = n for n > 0. - Reinhard Zumkeller, Dec 13 2014
a(n) = floor(3*n/2). - L. Edson Jeffery, Jan 18 2015
a(n) = A254049(A249745(n)) = (1+A007310(n)) / 2 for n >= 1. - Antti Karttunen, Jan 24 2015
E.g.f.: (3*x*exp(x) - sinh(x))/2. - Ilya Gutkovskiy, Jul 18 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)) + log(3)/2. - Amiram Eldar, Dec 04 2021

Extensions

Better description from N. J. A. Sloane, Aug 01 1998

A109613 Odd numbers repeated.

Original entry on oeis.org

1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 41, 41, 43, 43, 45, 45, 47, 47, 49, 49, 51, 51, 53, 53, 55, 55, 57, 57, 59, 59, 61, 61, 63, 63, 65, 65, 67, 67, 69, 69, 71, 71, 73
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 01 2005

Keywords

Comments

The number of rounds in a round-robin tournament with n competitors. - A. Timothy Royappa, Aug 13 2011
Diagonal sums of number triangle A113126. - Paul Barry, Oct 14 2005
When partitioning a convex n-gon by all the diagonals, the maximum number of sides in resulting polygons is 2*floor(n/2)+1 = a(n-1) (from Moscow Olympiad problem 1950). - Tanya Khovanova, Apr 06 2008
The inverse values of the coefficients in the series expansion of f(x) = (1/2)*(1+x)*log((1+x)/(1-x)) lead to this sequence; cf. A098557. - Johannes W. Meijer, Nov 12 2009
From Reinhard Zumkeller, Dec 05 2009: (Start)
First differences: A010673; partial sums: A000982;
A059329(n) = Sum_{k = 0..n} a(k)*a(n-k);
A167875(n) = Sum_{k = 0..n} a(k)*A005408(n-k);
A171218(n) = Sum_{k = 0..n} a(k)*A005843(n-k);
A008794(n+2) = Sum_{k = 0..n} a(k)*A059841(n-k). (End)
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(5). - Michael Somos, May 29 2013
For n > 4: a(n) = A230584(n) - A230584(n-2). - Reinhard Zumkeller, Feb 10 2015
The arithmetic function v+-(n,2) as defined in A290988. - Robert Price, Aug 22 2017
For n > 0, also the chromatic number of the (n+1)-triangular (Johnson) graph. - Eric W. Weisstein, Nov 17 2017
a(n-1), for n >= 1, is also the upper bound a_{up}(b), where b = 2*n + 1, in the first (top) row of the complete coach system Sigma(b) of Hilton and Pedersen [H-P]. All odd numbers <= a_{up}(b) of the smallest positive restricted residue system of b appear once in the first rows of the c(2*n+1) = A135303(n) coaches. If b is an odd prime a_{up}(b) is the maximum. See a comment in the proof of the quasi-order theorem of H-P, on page 263 ["Furthermore, every possible a_i < b/2 ..."]. For an example see below. - Wolfdieter Lang, Feb 19 2020
Satisfies the nested recurrence a(n) = a(a(n-2)) + 2*a(n-a(n-1)) with a(0) = a(1) = 1. Cf. A004001. - Peter Bala, Aug 30 2022
The binomial transform is 1, 2, 6, 16, 40, 96, 224, 512, 1152, 2560,.. (see A057711). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 + x + 3*x^2 + 3*x^3 + 5*x^4 + 5*x^5 + 7*x^6 + 7*x^7 + 9*x^8 + 9*x^9 + ...
Complete coach system for (a composite) b = 2*n + 1 = 33: Sigma(33) ={[1; 5], [5, 7, 13; 2, 1, 2]} (the first two rows are here 1 and 5, 7, 13), a_{up}(33) = a(15) = 15. But 15 is not in the reduced residue system modulo 33, so the maximal (odd) a number is 13. For the prime b = 31, a_{up}(31) = a(14) = 15 appears as maximum of the first rows. - _Wolfdieter Lang_, Feb 19 2020
		

References

  • Peter Hilton and Jean Pedersen, A Mathematical Tapestry: Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, 2010, 3rd printing 2012, pp. (260-281).

Crossrefs

Complement of A052928 with respect to the universe A004526. - Guenther Schrack, Aug 21 2018
First differences of A000982, A061925, A074148, A105343, A116940, and A179207. - Guenther Schrack, Aug 21 2018

Programs

Formula

a(n) = 2*floor(n/2) + 1.
a(n) = A052928(n) + 1 = 2*A004526(n) + 1.
a(n) = A028242(n) + A110654(n).
a(n) = A052938(n-2) + A084964(n-2) for n > 1. - Reinhard Zumkeller, Aug 27 2005
G.f.: (1 + x + x^2 + x^3)/(1 - x^2)^2. - Paul Barry, Oct 14 2005
a(n) = 2*a(n-2) - a(n-4), a(0) = 1, a(1) = 1, a(2) = 3, a(3) = 3. - Philippe Deléham, Nov 03 2008
a(n) = A001477(n) + A059841(n). - Philippe Deléham, Mar 31 2009
a(n) = 2*n - a(n-1), with a(0) = 1. - Vincenzo Librandi, Nov 13 2010
a(n) = R(n, -2), where R(n, x) is the n-th row polynomial of A211955. a(n) = (-1)^n + 2*Sum_{k = 1..n} (-1)^(n - k - 2)*4^(k-1)*binomial(n+k, 2*k). Cf. A084159. - Peter Bala, May 01 2012
a(n) = A182579(n+1, n). - Reinhard Zumkeller, May 06 2012
G.f.: ( 1 + x^2 ) / ( (1 + x)*(x - 1)^2 ). - R. J. Mathar, Jul 12 2016
E.g.f.: x*exp(x) + cosh(x). - Ilya Gutkovskiy, Jul 12 2016
From Guenther Schrack, Sep 10 2018: (Start)
a(-n) = -a(n-1).
a(n) = A047270(n+1) - (2*n + 2).
a(n) = A005408(A004526(n)). (End)
a(n) = A000217(n) / A004526(n+1), n > 0. - Torlach Rush, Nov 10 2023

A047238 Numbers that are congruent to {0, 2} mod 6.

Original entry on oeis.org

0, 2, 6, 8, 12, 14, 18, 20, 24, 26, 30, 32, 36, 38, 42, 44, 48, 50, 54, 56, 60, 62, 66, 68, 72, 74, 78, 80, 84, 86, 90, 92, 96, 98, 102, 104, 108, 110, 114, 116, 120, 122, 126, 128, 132, 134, 138, 140, 144, 146, 150, 152, 156, 158, 162
Offset: 1

Views

Author

Keywords

Comments

Complement of A047251, or "Polyrhythmic Sequence" P(2,3); the present sequence represents where the "rests" occur in a "3 against 2" polyrhythm. (See A267027 for definition and description). - Bob Selcoe, Jan 12 2016

Crossrefs

Cf. A047270 [(6*n-(-1)^n-1)/2], A047235 [(6*n-(-1)^n-3)/2], A047241 [(6*n-(-1)^n-5)/2].

Programs

  • Magma
    [n: n in [0..200]|n mod 6 in {0,2}]; // Vincenzo Librandi, Jan 12 2016
  • Mathematica
    Select[Range[0,200],MemberQ[{0,2},Mod[#,6]]&] (* or *) LinearRecurrence[ {1,1,-1},{0,2,6},70] (* Harvey P. Dale, Jun 15 2011 *)
  • PARI
    forstep(n=0,200,[2,4],print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011
    

Formula

From Bruno Berselli, Jun 24 2010: (Start)
G.f.: 2*x*(1+2*x)/((1+x)*(1-x)^2).
a(n) = a(n-1) + a(n-2) - a(n-3), a(0)=0, a(1)=2, a(2)=6.
a(n) = (6*n - (-1)^n-7)/2.
a(n) = 2*A032766(n-1). (End)
a(n) = 6*n - a(n-1) - 10 (with a(1)=0). - Vincenzo Librandi, Aug 05 2010
a(n+1) = Sum_{k>=0} A030308(n,k)*A111286(k+2). - Philippe Deléham, Oct 17 2011
a(n) = 2*floor(3*n/2). - Enrique Pérez Herrero, Jul 04 2012
Sum_{n>=2} (-1)^n/a(n) = sqrt(3)*Pi/36 + log(3)/4. - Amiram Eldar, Dec 13 2021
E.g.f: 3*(x-1)*exp(x) - cosh(x) + 4. - David Lovler, Jul 11 2022

A047257 Numbers that are congruent to {4, 5} mod 6.

Original entry on oeis.org

4, 5, 10, 11, 16, 17, 22, 23, 28, 29, 34, 35, 40, 41, 46, 47, 52, 53, 58, 59, 64, 65, 70, 71, 76, 77, 82, 83, 88, 89, 94, 95, 100, 101, 106, 107, 112, 113, 118, 119, 124, 125, 130, 131, 136, 137, 142, 143, 148, 149
Offset: 1

Views

Author

Keywords

Comments

Equivalently, numbers m such that 2^m - m is divisible by 3. Indeed, for every prime p, there are infinitely many numbers m such that 2^m - m (A000325) is divisible by p, here are numbers m corresponding to p = 3. - Bernard Schott, Dec 10 2021
Numbers k for which A276076(k) and A276086(k) are multiples of nine. For a simple proof, consider the penultimate digit in the factorial and primorial base expansions of n, A007623 and A049345. - Antti Karttunen, Feb 08 2024

References

  • Michael Doob, The Canadian Mathematical Olympiad & L'Olympiade Mathématique du Canada 1969-1993, Canadian Mathematical Society & Société Mathématique du Canada, Problem 4, 1983, page 158, 1993.

Crossrefs

Cf. A000325.
Similar with: A299174 (p = 2), this sequence (p = 3), A349767 (p = 5).

Programs

Formula

a(n) = 4 + 6*floor(n/2) + n mod 2.
a(n) = 6*n-a(n-1)-3, with a(1)=4. - Vincenzo Librandi, Aug 05 2010
G.f.: ( x*(4+x+x^2) ) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = 3*n - (-1)^n. - Wesley Ivan Hurt, Mar 20 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)) - log(2)/3. - Amiram Eldar, Dec 14 2021
E.g.f.: 1 + 3*x*exp(x) - exp(-x). - David Lovler, Aug 25 2022

A186422 First differences of A186421.

Original entry on oeis.org

1, 1, -1, 3, -1, 3, -3, 5, -3, 5, -5, 7, -5, 7, -7, 9, -7, 9, -9, 11, -9, 11, -11, 13, -11, 13, -13, 15, -13, 15, -15, 17, -15, 17, -17, 19, -17, 19, -19, 21, -19, 21, -21, 23, -21, 23, -23, 25, -23, 25, -25, 27, -25, 27, -27, 29, -27, 29, -29, 31, -29, 31, -31, 33, -31, 33, -33, 35, -33, 35, -35, 37, -35, 37, -37, 39, -37, 39, -39, 41, -39, 41, -41, 43
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 21 2011

Keywords

Comments

a(n) = A186421(n+1) - A186421(n);
a(2*n) = - A109613(n-1) for n>0; a(2*n+1) = A109613(n);
a(3*k) = A047270(floor((k+1)/2)) * (-1)^(k+1);
a(3*k+1) = A007310(floor((k+2)/2)) * (-1)^k;
a(3*k+2) = A047241(floor((k+3)/2)) * (-1)^(k+1).

Crossrefs

Programs

  • Haskell
    a186422 n = a186422_list !! n
    a186422_list = zipWith (-) (tail a186421_list) a186421_list
    
  • Magma
    /* By definition: */
    A186421:=func;
    [A186421(n+1)-A186421(n): n in [0..90]]; // Bruno Berselli, Mar 04 2013
  • Mathematica
    Differences@ CoefficientList[Series[x (1 + 2 x + 2 x^3 + x^4)/((1 + x^2) (x - 1)^2 (1 + x)^2), {x, 0, 84}], x] (* Michael De Vlieger, Oct 02 2017 *)
  • Maxima
    makelist(-((2*n+1)*(-1)^n-2*%i^(n*(n+1))-3)/4,n,0,83); /* Bruno Berselli, Mar 04 2013 */
    

Formula

G.f.: -(x^4+2*x^3+2*x+1) / ((x-1)*(x+1)^2*(x^2+1)). - Colin Barker, Mar 04 2013
a(n) = -((2*n+1)*(-1)^n-2*i^(n*(n+1))-3)/4, where i=sqrt(-1). [Bruno Berselli, Mar 04 2013]
a(n) = cos((n-1)*Pi)*(2*n+1-2*cos(n*Pi/2)-3*cos(n*Pi)-2*sin(n*Pi/2))/4. - Wesley Ivan Hurt, Oct 02 2017
E.g.f.: (cos(x) + (1 + x)*cosh(x) - sin(x) - (x - 2)*sinh(x))/2. - Stefano Spezia, May 09 2021

A047247 Numbers that are congruent to {2, 3, 4, 5} (mod 6).

Original entry on oeis.org

2, 3, 4, 5, 8, 9, 10, 11, 14, 15, 16, 17, 20, 21, 22, 23, 26, 27, 28, 29, 32, 33, 34, 35, 38, 39, 40, 41, 44, 45, 46, 47, 50, 51, 52, 53, 56, 57, 58, 59, 62, 63, 64, 65, 68, 69, 70, 71, 74, 75, 76, 77, 80, 81, 82, 83, 86, 87, 88, 89, 92, 93, 94, 95, 98, 99
Offset: 1

Views

Author

Keywords

Comments

The sequence is the interleaving of A047235 with A047270. - Guenther Schrack, Feb 10 2019
Numbers k for which A276076(k) and A276086(k) are multiples of three. For a simple proof, consider the penultimate digit in the factorial and primorial base expansions of n, A007623 and A049345. - Antti Karttunen, Feb 08 2024

Crossrefs

Programs

  • Magma
    [n : n in [0..100] | n mod 6 in [2, 3, 4, 5]]; // Wesley Ivan Hurt, May 21 2016
    
  • Maple
    A047247:=n->(6*n-1-I^(2*n)-(1-I)*I^(-n)-(1+I)*I^n)/4: seq(A047247(n), n=1..100); # Wesley Ivan Hurt, May 21 2016
  • Mathematica
    Table[(6n-1-I^(2n)-(1-I)*I^(-n)-(1+I)*I^n)/4, {n, 80}] (* Wesley Ivan Hurt, May 21 2016 *)
    LinearRecurrence[{1,0,0,1,-1},{2,3,4,5,8},70] (* Harvey P. Dale, May 25 2024 *)
  • PARI
    my(x='x+O('x^70)); Vec(x*(2+x+x^2+x^3+x^4)/((1-x)*(1-x^4))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    a=(x*(2+x+x^2+x^3+x^4)/((1-x)*(1-x^4))).series(x, 72).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019

Formula

G.f.: x*(2+x+x^2+x^3+x^4) / ( (1+x)*(1+x^2)*(1-x)^2 ). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (6*n - 1 - i^(2*n) - (1-i)*i^(-n) - (1+i)*i^n)/4 where i = sqrt(-1).
a(2*n) = A047270(n), a(2*n-1) = A047235(n).
a(n) = A047227(n) + 1, a(1-n) = - A047227(n). (End)
From Guenther Schrack, Feb 10 2019: (Start)
a(n) = (6*n - 1 - (-1)^n -2*(-1)^(n*(n+1)/2))/4.
a(n) = a(n-4) + 6, a(1)=2, a(2)=3, a(3)=4, a(4)=5, for n > 4.
a(n) = A047227(n) + 1. a(n) = A047246(n) + 2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi/12 - 2*log(2)/3 + log(3)/4. - Amiram Eldar, Dec 17 2021

Extensions

More terms from Wesley Ivan Hurt, May 21 2016

A047237 Numbers that are congruent to {0, 1, 2, 4} mod 6.

Original entry on oeis.org

0, 1, 2, 4, 6, 7, 8, 10, 12, 13, 14, 16, 18, 19, 20, 22, 24, 25, 26, 28, 30, 31, 32, 34, 36, 37, 38, 40, 42, 43, 44, 46, 48, 49, 50, 52, 54, 55, 56, 58, 60, 61, 62, 64, 66, 67, 68, 70, 72, 73, 74, 76, 78, 79, 80, 82, 84, 85, 86, 88, 90, 91, 92, 94, 96, 97
Offset: 1

Views

Author

Keywords

Comments

The sequence is the interleaving of A047238(n) with A016777(n-1). - Guenther Schrack, Feb 11 2019

Crossrefs

Programs

  • GAP
    Filtered([0..100],n->n mod 6 = 0 or n mod 6 = 1 or n mod 6 = 2 or n mod 6 = 4); # Muniru A Asiru, Feb 19 2019
  • Magma
    [n : n in [0..110] | n mod 6 in [0, 1, 2, 4]]; // G. C. Greubel, Feb 16 2019
    
  • Maple
    A047237:=n->(6*n-8+I^(1-n)-I^(1+n))/4: seq(A047237(n), n=1..100); # Wesley Ivan Hurt, May 21 2016
  • Mathematica
    Table[(6n-8+I^(1-n)-I^(1+n))/4, {n, 80}] (* Wesley Ivan Hurt, May 21 2016 *)
    LinearRecurrence[{2,-2,2,-1},{0,1,2,4},120] (* Harvey P. Dale, Jan 21 2018 *)
  • PARI
    my(x='x+O('x^70)); concat([0], Vec(x^2*(1+2*x^2)/((1+x^2)*(1-x)^2))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    a=(x^2*(1+2*x^2)/((1+x^2)*(1-x)^2)).series(x, 72).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019
    

Formula

Starting (1, 2, 4, 6, ...) = partial sums of (1, 1, 2, 2, 1, 1, 2, 2, ...). - Gary W. Adamson, Jun 19 2008
G.f.: x^2*(1+2*x^2) / ((1+x^2)*(1-x)^2). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = (6*n - 8 + i^(1-n) - i^(1+n))/4 where i=sqrt(-1).
a(2*n) = A016777(n-1), a(2*n-1) = A047238(n). (End)
From Guenther Schrack, Feb 11 2019: (Start)
a(n) = (6*n - 8 + (1 - (-1)^n)*(-1)^(n*(n-1)/2))/4.
a(n) = a(n-4) + 6, a(1)=0, a(2)=1, a(3)=2, a(4)=4, for n > 4.
a(-n) = -A047262(n+2).
a(n) = A118286(n-1)/2 for n > 1.
a(n) = A047255(n) - 1. (End)
Sum_{n>=2} (-1)^n/a(n) = sqrt(3)*Pi/36 + log(2)/3 + log(3)/4. - Amiram Eldar, Dec 16 2021

Extensions

More terms from Wesley Ivan Hurt, May 21 2016

A047251 Numbers that are congruent to {1, 3, 4, 5} (mod 6).

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 10, 11, 13, 15, 16, 17, 19, 21, 22, 23, 25, 27, 28, 29, 31, 33, 34, 35, 37, 39, 40, 41, 43, 45, 46, 47, 49, 51, 52, 53, 55, 57, 58, 59, 61, 63, 64, 65, 67, 69, 70, 71, 73, 75, 76, 77, 79, 81, 82, 83, 85, 87, 88, 89, 91, 93, 94, 95, 97, 99
Offset: 1

Views

Author

Keywords

Comments

"Polyrhythmic Sequence" P(2,3): numbers congruent to 1 (mod 2) and 1 (mod 3). (See A267027 for definition and description.) - Bob Selcoe, Jan 12 2016

Crossrefs

Programs

Formula

From R. J. Mathar, Oct 08 2011: (Start)
a(n) = 3*n/2 - 1/2 - cos(Pi*n/2)/2.
G.f.: x*(x^3+x+1)/((x-1)^2*(x^2+1)). (End)
a(n) = (-2 - (-i)^n - i^n + 6n)/4, with i=sqrt(-1). - Colin Barker, Oct 19 2015
From Wesley Ivan Hurt, May 31 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(2k) = A047270(k), a(2k-1) = A016777(k-1) for n>0. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = 5*sqrt(3)*Pi/36 - log(2)/3 + log(3)/4. - Amiram Eldar, Dec 17 2021

A030118 a(0) = 1, a(1) = 1, a(n) = a(n-1) - a(n-2) + n.

Original entry on oeis.org

1, 1, 2, 4, 6, 7, 7, 7, 8, 10, 12, 13, 13, 13, 14, 16, 18, 19, 19, 19, 20, 22, 24, 25, 25, 25, 26, 28, 30, 31, 31, 31, 32, 34, 36, 37, 37, 37, 38, 40, 42, 43, 43, 43, 44, 46, 48, 49, 49, 49, 50, 52, 54, 55, 55, 55, 56, 58, 60, 61, 61, 61, 62, 64, 66, 67, 67, 67, 68, 70, 72, 73
Offset: 0

Views

Author

Keywords

Comments

Contains all positive integers except for 3 mod 6 and 5 mod 6 (A047270). - Jon Perry, Nov 02 2014

Crossrefs

Programs

  • GAP
    Concatenation([1], List([1..80], n-> n+1 - ((-1)^Int((n-1)/3) + (-1)^Int(n/3))/2 )); # G. C. Greubel, Jul 24 2019
  • Magma
    [1] cat [n le 2 select (n) else n + Self(n-1)-Self(n-2): n in [1..80]]; // Vincenzo Librandi, Nov 02 2014
    
  • Maple
    A:= gfun:-rectoproc({a(n)=a(n-1)-a(n-2)+n , a(0)=1,a(1)=1},a(n),remember):
    seq(A(n),n=0..80); # Robert Israel, Nov 02 2014
  • Mathematica
    Table[n+1 -((-1)^Floor[(n-1)/3] +(-1)^Floor[n/3])/2, {n, 0, 80}] (* G. C. Greubel, Jul 24 2019 *)
    nxt[{n_,a_,b_}]:={n+1,b,b-a+n+1}; NestList[nxt,{1,1,1},80][[;;,2]] (* or *) LinearRecurrence[{3,-4,3,-1},{1,1,2,4},80] (* Harvey P. Dale, May 16 2025 *)
  • PARI
    vector(80, n, n--; n+1 - ((-1)^floor((n-1)/3) + (-1)^floor(n/3))/2) \\ G. C. Greubel, Jul 24 2019
    
  • Sage
    [lucas_number1(n+1,2,1)-lucas_number1(n,1,1) for n in range(0, 80)] # Zerinvary Lajos, Nov 10 2009
    

Formula

a(
G.f.: (1-2*x+3*x^2-x^3)/((1-x+x^2)*(1-x)^2). - Robert Israel, Nov 02 2014
a(n) = n iff n is either 1 or 2 mod 6. - Jon Perry, Nov 02 2014
a(n) = n + 1 - ((-1)^floor((n-1)/3) + (-1)^floor(n/3))/2) = n + 1 - A010892(n+5). - G. C. Greubel, Jul 24 2019
For k >= 1, a(6*k-1) = a(6*k) = a(6*k+1) = 6*k+1; a(6*k+2) = 6*k+2; a(6*k+3) = 6*k+4; a(6*k+4) = 6*k+6. - Bernard Schott, Jul 24 2019
a(n) = 3*a(n-1) - 4*a(n-2) + 3*a(n-3) - a(n-4) for n > 3. - Chai Wah Wu, Jun 30 2020

Extensions

More terms from Erich Friedman

A294774 a(n) = 2*n^2 + 2*n + 5.

Original entry on oeis.org

5, 9, 17, 29, 45, 65, 89, 117, 149, 185, 225, 269, 317, 369, 425, 485, 549, 617, 689, 765, 845, 929, 1017, 1109, 1205, 1305, 1409, 1517, 1629, 1745, 1865, 1989, 2117, 2249, 2385, 2525, 2669, 2817, 2969, 3125, 3285, 3449, 3617, 3789, 3965, 4145, 4329, 4517, 4709, 4905
Offset: 0

Views

Author

Bruno Berselli, Nov 08 2017

Keywords

Comments

This is the case k = 9 of 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 (similar sequences are listed in Crossrefs section). Note that:
2*( 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 ) - k = ( 2*n + (1-(-1)^k)/2 )^2. From this follows an alternative definition for the sequence: Numbers h such that 2*h - 9 is a square. Therefore, if a(n) is a square then its base is a term of A075841.

Crossrefs

1st diagonal of A154631, 3rd diagonal of A055096, 4th diagonal of A070216.
Second column of Mathar's array in A016813 (Comments section).
Subsequence of A001481, A001983, A004766, A020668, A046711 and A057653 (because a(n) = (n+2)^2 + (n-1)^2); A097268 (because it is also a(n) = (n^2+n+3)^2 - (n^2+n+2)^2); A047270; A243182 (for y=1).
Similar sequences (see the first comment): A161532 (k=-14), A181510 (k=-13), A152811 (k=-12), A222182 (k=-11), A271625 (k=-10), A139570 (k=-9), (-1)*A147973 (k=-8), A059993 (k=-7), A268581 (k=-6), A090288 (k=-5), A054000 (k=-4), A142463 or A132209 (k=-3), A056220 (k=-2), A046092 (k=-1), A001105 (k=0), A001844 (k=1), A058331 (k=2), A051890 (k=3), A271624 (k=4), A097080 (k=5), A093328 (k=6), A271649 (k=7), A255843 (k=8), this sequence (k=9).

Programs

  • Maple
    seq(2*n^2 + 2*n + 5, n=0..100); # Robert Israel, Nov 10 2017
  • Mathematica
    Table[2n^2+2n+5,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{5,9,17},50] (* Harvey P. Dale, Sep 18 2023 *)
  • PARI
    Vec((5 - 6*x + 5*x^2) / (1 - x)^3 + O(x^50)) \\ Colin Barker, Nov 13 2017

Formula

O.g.f.: (5 - 6*x + 5*x^2)/(1 - x)^3.
E.g.f.: (5 + 4*x + 2*x^2)*exp(x).
a(n) = a(-1-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 5*A000217(n+1) - 6*A000217(n) + 5*A000217(n-1).
n*a(n) - Sum_{j=0..n-1} a(j) = A002492(n) for n>0.
a(n) = Integral_{x=0..2n+4} |3-x| dx. - Pedro Caceres, Dec 29 2020
Showing 1-10 of 15 results. Next