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

A056530 Sequence remaining after third round of Flavius Josephus sieve; remove every fourth term of A047241.

Original entry on oeis.org

1, 3, 7, 13, 15, 19, 25, 27, 31, 37, 39, 43, 49, 51, 55, 61, 63, 67, 73, 75, 79, 85, 87, 91, 97, 99, 103, 109, 111, 115, 121, 123, 127, 133, 135, 139, 145, 147, 151, 157, 159, 163, 169, 171, 175, 181, 183, 187, 193, 195, 199, 205, 207, 211, 217, 219, 223, 229, 231
Offset: 1

Views

Author

Henry Bottomley, Jun 19 2000

Keywords

Comments

Numbers {1, 3, 7} mod 12: A017533, A017557, A017605 interleaved.

Crossrefs

We have A000027 after 0 rounds of sieving, A005408 after 1 round of sieving, A047241 after 2 rounds, A056530 after 3 rounds, A056531 after 4 rounds, A000960 after all rounds. After n rounds the remaining sequence comprises A002944(n) numbers mod A003418(n+1), i.e. 1/(n+1) of them.

Programs

  • Mathematica
    LinearRecurrence[{1,0,1,-1},{1,3,7,13},60] (* Harvey P. Dale, Oct 19 2022 *)

Formula

From Chai Wah Wu, Jul 24 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 4.
G.f.: x*(5*x^3 + 4*x^2 + 2*x + 1)/(x^4 - x^3 - x + 1). (End)
a(n) = 4*n - (13 + 2*A131713(n))/3. - R. J. Mathar, Jun 22 2020

A086515 Duplicate of A047241.

Original entry on oeis.org

1, 3, 7, 9, 13, 15, 19, 21, 25, 27, 31, 33, 37, 39, 43, 45, 49, 51, 55, 57, 61, 63, 67, 69, 73, 75, 79, 81, 85, 87, 91, 93, 97, 99, 103, 105, 109, 111, 115, 117, 121, 123, 127, 129, 133, 135, 139, 141, 145, 147, 151, 153, 157, 159, 163, 165, 169, 171, 175, 177, 181, 183
Offset: 1

Views

Author

Keywords

A136320 Terms of A047241 swapped in pairs.

Original entry on oeis.org

3, 1, 9, 7, 15, 13, 21, 19, 27, 25, 33, 31, 39, 37, 45, 43, 51, 49, 57, 55, 63, 61, 69, 67, 75, 73, 81, 79, 87, 85, 93, 91, 99, 97, 105, 103, 111, 109, 117, 115, 123, 121, 129, 127, 135, 133, 141, 139, 147, 145, 153, 151, 159, 157, 165, 163, 171, 169, 177, 175, 183
Offset: 0

Views

Author

Paul Curtz, Mar 25 2008

Keywords

Formula

a(n) = 6*n - a(n-1) - 2 (with a(0)=3). - Vincenzo Librandi, Nov 24 2010
From Chai Wah Wu, Jul 28 2020: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 2.
G.f.: (5*x^2 - 2*x + 3)/((x - 1)^2*(x + 1)). (End)

A016945 a(n) = 6*n+3.

Original entry on oeis.org

3, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 93, 99, 105, 111, 117, 123, 129, 135, 141, 147, 153, 159, 165, 171, 177, 183, 189, 195, 201, 207, 213, 219, 225, 231, 237, 243, 249, 255, 261, 267, 273, 279, 285, 291, 297, 303, 309, 315, 321, 327
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0(37).
Continued fraction expansion of tanh(1/3).
If a 2-set Y and a 3-set Z are disjoint subsets of an n-set X then a(n-4) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 08 2007
Leaves of the Odd Collatz-Tree: a(n) has no odd predecessors in all '3x+1' trajectories where it occurs: A139391(2*k+1) <> a(n) for all k; A082286(n)=A006370(a(n)). - Reinhard Zumkeller, Apr 17 2008
Let random variable X have a uniform distribution on the interval [0,c] where c is a positive constant. Then, for positive integer n, the coefficient of determination between X and X^n is (6n+3)/(n+2)^2, that is, A016945(n)/A000290(n+2). Note that the result is independent of c. For the derivation of this result, see the link in the Links section below. - Dennis P. Walsh, Aug 20 2013
Positions of 3 in A020639. - Zak Seidov, Apr 29 2015
a(n+2) gives the sum of 6 consecutive terms of A004442 starting with A004442(n). - Wesley Ivan Hurt, Apr 08 2016
Numbers k such that Fibonacci(k) mod 4 = 2. - Bruno Berselli, Oct 17 2017
Also numbers k such that t^k == -1 (mod 7), where t is a member of A047389. - Bruno Berselli, Dec 28 2017

Crossrefs

Third row of A092260.
Subsequence of A061641; complement of A047263; bisection of A047241.
Cf. A000225. - Loren Pearson, Jul 02 2009
Cf. A020639. - Zak Seidov, Apr 29 2015
Odd numbers in A355200.

Programs

Formula

a(n) = 3*(2*n + 1) = 3*A005408(n), odd multiples of 3.
A008615(a(n)) = n. - Reinhard Zumkeller, Feb 27 2008
A157176(a(n)) = A103333(n+1). - Reinhard Zumkeller, Feb 24 2009
a(n) = 12*n - a(n-1) for n>0, a(0)=3. - Vincenzo Librandi, Nov 20 2010
G.f.: 3*(1+x)/(1-x)^2. - Mario C. Enriquez, Dec 14 2016
E.g.f.: 3*(1 + 2*x)*exp(x). - G. C. Greubel, Sep 18 2019
Sum_{n>=0} (-1)^n/a(n) = Pi/12 (A019679). - Amiram Eldar, Dec 10 2021
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=0} (1 - (-1)^n/a(n)) = sqrt(2)/2 (A010503).
Product_{n>=0} (1 + (-1)^n/a(n)) = sqrt(3/2) (A115754). (End)
a(n) = (n+2)^2 - (n-1)^2. - Alexander Yutkin, Mar 15 2025

A212959 Number of (w,x,y) such that w,x,y are all in {0,...,n} and |w-x| = |x-y|.

Original entry on oeis.org

1, 4, 11, 20, 33, 48, 67, 88, 113, 140, 171, 204, 241, 280, 323, 368, 417, 468, 523, 580, 641, 704, 771, 840, 913, 988, 1067, 1148, 1233, 1320, 1411, 1504, 1601, 1700, 1803, 1908, 2017, 2128, 2243, 2360, 2481, 2604, 2731, 2860, 2993, 3128, 3267
Offset: 0

Views

Author

Clark Kimberling, Jun 01 2012

Keywords

Comments

In the following guide to related sequences: M=max(x,y,z), m=min(x,y,z), and R=range=M-m. In some cases, it is an offset of the listed sequence which fits the conditions shown for w,x,y. Each sequence satisfies a linear recurrence relation, some of which are identified in the list by the following code (signature):
A: 2, 0, -2, 1, i.e., a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4);
B: 3, -2, -2, 3, -1;
C: 4, -6, 4, -1;
D: 1, 2, -2, -1, 1;
E: 2, 1, -4, 1, 2, -1;
F: 2, -1, 1, -2, 1;
G: 2, -1, 0, 1, -2, 1;
H: 2, -1, 2, -4, 2, -1, 2, -1;
I: 3, -3, 2, -3, 3, -1;
J: 4, -7, 8, -7, 4, -1.
...
A212959 ... |w-x|=|x-y| ...... recurrence type A
A212960 ... |w-x| != |x-y| ................... B
A212683 ... |w-x| < |x-y| .................... B
A212684 ... |w-x| >= |x-y| ................... B
A212963 ... see entry for definition ......... B
A212964 ... |w-x| < |x-y| < |y-w| ............ B
A006331 ... |w-x| < y ........................ C
A005900 ... |w-x| <= y ....................... C
A212965 ... w = R ............................ D
A212966 ... 2*w = R
A212967 ... w < R ............................ E
A212968 ... w >= R ........................... E
A077043 ... w = x > R ........................ A
A212969 ... w != x and x > R ................. E
A212970 ... w != x and x < R ................. E
A055998 ... w = x + y - 1
A011934 ... w < floor((x+y)/2) ............... B
A182260 ... w > floor((x+y)/2) ............... B
A055232 ... w <= floor((x+y)/2) .............. B
A011934 ... w >= floor((x+y)/2) .............. B
A212971 ... w < floor((x+y)/3) ............... B
A212972 ... w >= floor((x+y)/3) .............. B
A212973 ... w <= floor((x+y)/3) .............. B
A212974 ... w > floor((x+y)/3) ............... B
A212975 ... R is even ........................ E
A212976 ... R is odd ......................... E
A212978 ... R = 2*n - w - x
A212979 ... R = average{w,x,y}
A212980 ... w < x + y and x < y .............. B
A212981 ... w <= x+y and x < y ............... B
A212982 ... w < x + y and x <= y ............. B
A212983 ... w <= x + y and x <= y ............ B
A002623 ... w >= x + y and x <= y ............ B
A087811 ... w = 2*x + y ...................... A
A008805 ... w = 2*x + 2*y .................... D
A000982 ... 2*w = x + y ...................... F
A001318 ... 2*w = 2*x + y .................... F
A001840 ... w = 3*x + y
A212984 ... 3*w = x + y
A212985 ... 3*w = 3*x + y
A001399 ... w = 2*x + 3*y
A212986 ... 2*w = 3*x + y
A008810 ... 3*x = 2*x + y .................... F
A212987 ... 3*w = 2*x + 2*y
A001972 ... w = 4*x + y ...................... G
A212988 ... 4*w = x + y ...................... G
A212989 ... 4*w = 4*x + y
A008812 ... 5*w = 2*x + 3*y
A016061 ... n < w + x + y <= 2*n ............. C
A000292 ... w + x + y <=n .................... C
A000292 ... 2*n < w + x + y <= 3*n ........... C
A212977 ... n/2 < w + x + y <= n
A143785 ... w < R < x ........................ E
A005996 ... w < R <= x ....................... E
A128624 ... w <= R <= x ...................... E
A213041 ... R = 2*|w - x| .................... A
A213045 ... R < 2*|w - x| .................... B
A087035 ... R >= 2*|w - x| ................... B
A213388 ... R <= 2*|w - x| ................... B
A171218 ... M < 2*m .......................... B
A213389 ... R < 2|w - x| ..................... E
A213390 ... M >= 2*m ......................... E
A213391 ... 2*M < 3*m ........................ H
A213392 ... 2*M >= 3*m ....................... H
A213393 ... 2*M > 3*m ........................ H
A213391 ... 2*M <= 3*m ....................... H
A047838 ... w = |x + y - w| .................. A
A213396 ... 2*w < |x + y - w| ................ I
A213397 ... 2*w >= |x + y - w| ............... I
A213400 ... w < R < 2*w
A069894 ... min(|w-x|,|x-y|) = 1
A000384 ... max(|w-x|,|x-y|) = |w-y|
A213395 ... max(|w-x|,|x-y|) = w
A213398 ... min(|w-x|,|x-y|) = x ............. A
A213399 ... max(|w-x|,|x-y|) = x ............. D
A213479 ... max(|w-x|,|x-y|) = w+x+y ......... D
A213480 ... max(|w-x|,|x-y|) != w+x+y ........ E
A006918 ... |w-x| + |x-y| > w+x+y ............ E
A213481 ... |w-x| + |x-y| <= w+x+y ........... E
A213482 ... |w-x| + |x-y| < w+x+y ............ E
A213483 ... |w-x| + |x-y| >= w+x+y ........... E
A213484 ... |w-x|+|x-y|+|y-w| = w+x+y
A213485 ... |w-x|+|x-y|+|y-w| != w+x+y ....... J
A213486 ... |w-x|+|x-y|+|y-w| > w+x+y ........ J
A213487 ... |w-x|+|x-y|+|y-w| >= w+x+y ....... J
A213488 ... |w-x|+|x-y|+|y-w| < w+x+y ........ J
A213489 ... |w-x|+|x-y|+|y-w| <= w+x+y ....... J
A213490 ... w,x,y,|w-x|,|x-y| distinct
A213491 ... w,x,y,|w-x|,|x-y| not distinct
A213493 ... w,x,y,|w-x|,|x-y|,|w-y| distinct
A213495 ... w = min(|w-x|,|x-y|,|w-y|)
A213492 ... w != min(|w-x|,|x-y|,|w-y|)
A213496 ... x != max(|w-x|,|x-y|)
A213498 ... w != max(|w-x|,|x-y|,|w-y|)
A213497 ... w = min(|w-x|,|x-y|)
A213499 ... w != min(|w-x|,|x-y|)
A213501 ... w != max(|w-x|,|x-y|)
A213502 ... x != min(|w-x|,|x-y|)
...
A211795 includes a guide for sequences that count 4-tuples (w,x,y,z) having all terms in {0,...,n} and satisfying selected properties. Some of the sequences indexed at A211795 satisfy recurrences that are represented in the above list.
Partial sums of the numbers congruent to {1,3} mod 6 (see A047241). - Philippe Deléham, Mar 16 2014

Examples

			a(1)=4 counts these (x,y,z): (0,0,0), (1,1,1), (0,1,0), (1,0,1).
Numbers congruent to {1, 3} mod 6: 1, 3, 7, 9, 13, 15, 19, ...
a(0) = 1;
a(1) = 1 + 3 = 4;
a(2) = 1 + 3 + 7 = 11;
a(3) = 1 + 3 + 7 + 9 = 20;
a(4) = 1 + 3 + 7 + 9 + 13 = 33;
a(5) = 1 + 3 + 7 + 9 + 13 + 15 = 48; etc. - _Philippe Deléham_, Mar 16 2014
		

References

  • A. Barvinok, Lattice Points and Lattice Polytopes, Chapter 7 in Handbook of Discrete and Computational Geometry, CRC Press, 1997, 133-152.
  • P. Gritzmann and J. M. Wills, Lattice Points, Chapter 3.2 in Handbook of Convex Geometry, vol. B, North-Holland, 1993, 765-797.

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[Abs[w - x] == Abs[x - y], s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 50]]   (* A212959 *)
  • PARI
    a(n)=(6*n^2+8*n+3)\/4 \\ Charles R Greathouse IV, Jul 28 2015

Formula

a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
G.f.: (1+2*x+3*x^2)/((1+x)*(1-x)^3).
a(n) + A212960(n) = (n+1)^3.
a(n) = (6*n^2 + 8*n + 3 + (-1)^n)/4. - Luce ETIENNE, Apr 05 2014
a(n) = 2*A069905(3*(n+1)+2) - 3*(n+1). - Ayoub Saber Rguez, Aug 31 2021

A047270 Numbers that are congruent to {3, 5} mod 6.

Original entry on oeis.org

3, 5, 9, 11, 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, 141, 143, 147, 149
Offset: 1

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0( 10 ).
This sequence is an interleaving of A016945 with A016969. - Guenther Schrack, Nov 16 2018

Crossrefs

Cf. A047235 [(6*n-(-1)^n-3)/2], A047241 [(6*n-(-1)^n-5)/2], A047238 [(6*n-(-1)^n-7)/2]. [Bruno Berselli, Jun 24 2010]
Subsequence of A186422.
From Guenther Schrack, Nov 18 2018: (Start)
Complement: A047237.
First differences: A105397(n) for n > 0.
Partial sums: A227017(n+1) for n > 0.
Elements of odd index: A016945.
Elements of even index: A016969(n-1) for n > 0. (End)

Programs

  • Mathematica
    Select[Range@ 149, MemberQ[{3, 5}, Mod[#, 6]] &] (* or *)
    Array[(6 # - (-1)^# - 1)/2 &, 50] (* or *)
    Fold[Append[#1, 6 #2 - Last@ #1 - 4] &, {3}, Range[2, 50]] (* or *)
    CoefficientList[Series[(3 + 2 x + x^2)/((1 + x) (1 - x)^2), {x, 0, 49}], x] (* Michael De Vlieger, Jan 12 2018 *)
  • PARI
    a(n) = (6*n - 1 - (-1)^n)/2 \\ David Lovler, Aug 25 2022

Formula

a(n) = sqrt(2)*sqrt((1-6*n)*(-1)^n + 18*n^2 - 6*n + 1)/2. - Paul Barry, May 11 2003
From Bruno Berselli, Jun 24 2010: (Start)
G.f.: (3+2*x+x^2)/((1+x)*(1-x)^2).
a(n) - a(n-1) - a(n-2) + a(n-3) = 0, with n > 3.
a(n) = (6*n - (-1)^n - 1)/2. (End)
a(n) = 6*n - a(n-1) - 4 with n > 1, a(1)=3. - Vincenzo Librandi, Aug 05 2010
From Guenther Schrack, Nov 17 2018: (Start)
a(n) = a(n-2) + 6 for n > 2.
a(-n) = -A047241(n+1) for n > 0.
a(n) = A109613(n-1) + 2*n for n > 0.
a(n) = 2*A001651(n) + 1.
m-element moving averages: Sum_{k=1..m} a(n-m+k)/m = A016777(n-m/2) for m = 2, 4, 6, ... and n >= m. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)) - log(3)/4. - Amiram Eldar, Dec 13 2021
E.g.f.: 1 + 3*x*exp(x) - cosh(x). - David Lovler, Aug 25 2022

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

A047273 Numbers that are congruent to {0, 1, 3, 5} mod 6.

Original entry on oeis.org

0, 1, 3, 5, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19, 21, 23, 24, 25, 27, 29, 30, 31, 33, 35, 36, 37, 39, 41, 42, 43, 45, 47, 48, 49, 51, 53, 54, 55, 57, 59, 60, 61, 63, 65, 66, 67, 69, 71, 72, 73, 75, 77, 78, 79, 81, 83, 84, 85, 87, 89, 90, 91, 93, 95, 96, 97, 99, 101, 102, 103
Offset: 1

Views

Author

Keywords

Comments

Complement of A047235. - Reinhard Zumkeller, Oct 01 2008

Crossrefs

First differences of A281026.
See A301729 for an essentially identical sequence.

Programs

  • Haskell
    a047273 n = a047273_list !! (n-1)
    a047273_list = 0 : 1 : 3 : 5 : map (+ 6) a047273_list
    -- Reinhard Zumkeller, Feb 19 2013
    
  • Magma
    [(6*n-6+(-1)^(n div 2)+(-1)^(-n div 2))/4: n in [1..100]]; // Wesley Ivan Hurt, May 20 2016
  • Maple
    seq(2*(n-floor(n/4)) - (3-I^n-(-I)^n-(-1)^n)/4, n = 0..69); # Gary Detlefs, Mar 19 2010
  • Mathematica
    LinearRecurrence[{2,-2,2,-1},{0,1,3,5},80] (* Harvey P. Dale, Jan 04 2015 *)
  • PARI
    a(n)=n+(n+1)\4+(n+2)\4
    
  • Sage
    [(lucas_number1(n+2, 0, 1)+3*n)/2 for n in range(0, 70)] # Zerinvary Lajos, Mar 09 2009
    

Formula

G.f.: x*(1+x+x^2)/((1-x)^2*(1+x^2)) = x*(1-x^2)*(1-x^3)/((1-x)^3*(1-x^4)).
a(n) = n + A004524(n+1) = -a(-n) for all n in Z.
Starting (1, 3, 5, ...) = partial sums of (1, 2, 2, 1, 1, 2, 2, 1, 1, ...). - Gary W. Adamson, Jun 19 2008
A093719(a(n)) = 1. - Reinhard Zumkeller, Oct 01 2008
a(n) = 2*(n-floor(n/4)) - (3-I^n-(-I)^n-(-1)^n)/4, with offset 0..a(0)=0. - Gary Detlefs, Mar 19 2010
a(n) = (3*n-3+cos(Pi*n/2))/2. - R. J. Mathar, Oct 08 2010
From Wesley Ivan Hurt, May 20 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-6+(-1)^(n/2)+(-1)^(-n/2))/4. (End)
Euler transform of length 4 sequence [3, -1, -1, 1]. - Michael Somos, Jun 24 2017
Sum_{n>=2} (-1)^n/a(n) = log(2)/3 + log(3)/2. - Amiram Eldar, Dec 16 2021
E.g.f.: (2 + 3*exp(x)*(x - 1) + cos(x))/2. - Stefano Spezia, Jul 26 2024

A047228 Numbers that are congruent to {2, 3, 4} mod 6.

Original entry on oeis.org

2, 3, 4, 8, 9, 10, 14, 15, 16, 20, 21, 22, 26, 27, 28, 32, 33, 34, 38, 39, 40, 44, 45, 46, 50, 51, 52, 56, 57, 58, 62, 63, 64, 68, 69, 70, 74, 75, 76, 80, 81, 82, 86, 87, 88, 92, 93, 94, 98, 99, 100, 104, 105, 106, 110, 111, 112, 116, 117, 118, 122, 123, 124
Offset: 1

Views

Author

Keywords

Comments

In other words, numbers that are divisible by 2 or by 3, but not by 6 (sorted). - David James Sycamore, Aug 22 2023

Examples

			From _David A. Corneth_, Aug 22 2023: (Start)
10 is in the sequence as 10 == 4 (mod 6) and 4 is in {2, 3, 4}.
11 is not in the sequence as 11 == 5 (mod 6) and 5 is not in {2, 3, 4}. (End)
		

Crossrefs

Programs

  • Haskell
    a047228 n = a047228_list !! (n-1)
    a047228_list = 2 : 3 : 4 : map (+ 6) a047228_list
    -- Reinhard Zumkeller, Feb 19 2013
    
  • Magma
    [n: n in [0..120] | n mod 6 in [2..4]]; // Vincenzo Librandi, Jan 05 2013
    
  • Maple
    A047228:=n->2*n-1-cos(2*n*Pi/3)+sin(2*n*Pi/3)/sqrt(3): seq(A047228(n), n=1..100); # Wesley Ivan Hurt, Jun 13 2016
  • Mathematica
    Select[Range[0, 150], MemberQ[{2, 3, 4}, Mod[#, 6]]&] (* Vincenzo Librandi, Jan 06 2013 *)
  • PARI
    a(n) = 6*((n-1)\3) + 2 + (n-1)%3 \\ David A. Corneth, Aug 22 2023
    
  • PARI
    nxt(n) = if(n%3 == 1, n+4, n+1) \\ David A. Corneth, Aug 22 2023

Formula

From Paul Barry, Sep 01 2009: (Start)
G.f.: (2+x+x^2+2*x^3)/(1-x-x^3+x^4).
a(n) = 2*n-1-cos(2*n*Pi/3)+sin(2*n*Pi/3)/sqrt(3). (End) [adapted for offset 1 by Wesley Ivan Hurt, Jun 13 2016]
From Wesley Ivan Hurt, Jun 13 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(3k) = 6k-2, a(3k-1) = 6k-3, a(3k-2) = 6k-4. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (4*sqrt(3)-3)*Pi/36. - Amiram Eldar, Dec 16 2021
E.g.f.: 2 + exp(x)*(2*x - 1) - exp(-x/2)*(3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Jul 26 2024

A047233 Numbers that are congruent to {0, 4} mod 6.

Original entry on oeis.org

0, 4, 6, 10, 12, 16, 18, 22, 24, 28, 30, 34, 36, 40, 42, 46, 48, 52, 54, 58, 60, 64, 66, 70, 72, 76, 78, 82, 84, 88, 90, 94, 96, 100, 102, 106, 108, 112, 114, 118, 120, 124, 126, 130, 132, 136, 138, 142, 144, 148, 150, 154, 156, 160, 162, 166, 168, 172, 174, 178, 180, 184, 186, 190, 192, 196, 198
Offset: 1

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2*n cusp forms for Gamma_0(17).
Nonnegative k such that k*(k + 2)/6 is an integer. - Bruno Berselli, Mar 06 2018

Crossrefs

Cf. A047241: (6*n - (-1)^n - 5)/2.
Cf. A342819.

Programs

Formula

From Bruno Berselli, Jun 24 2010: (Start)
G.f.: 2*x^2*(2 + x)/((1 + x)*(1 - x)^2).
a(n) = a(n-1) + a(n-2) - a(n-3) for n>3.
a(n) = (6*n + (-1)^n - 5)/2. (End)
a(n) = 6*n - a(n-1) - 8 for n>1, a(1)=0. - Vincenzo Librandi, Aug 05 2010
a(n+1) = Sum_{k>=0} A030308(n,k)*A058764(k+1). - Philippe Deléham, Oct 17 2011
Sum_{n>=2} (-1)^n/a(n) = log(3)/4 - sqrt(3)*Pi/36. - Amiram Eldar, Dec 13 2021
E.g.f.: 2 + ((6*x -5)*exp(x) + exp(-x))/2. - David Lovler, Aug 25 2022
Showing 1-10 of 30 results. Next