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.

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

Original entry on oeis.org

2, 4, 8, 10, 14, 16, 20, 22, 26, 28, 32, 34, 38, 40, 44, 46, 50, 52, 56, 58, 62, 64, 68, 70, 74, 76, 80, 82, 86, 88, 92, 94, 98, 100, 104, 106, 110, 112, 116, 118, 122, 124, 128, 130, 134, 136, 140, 142, 146, 148, 152, 154, 158, 160, 164, 166, 170, 172, 176, 178, 182, 184, 188, 190, 194, 196, 200, 202, 206
Offset: 1

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 19 ).
Complement of A047273; A093719(a(n)) = 0. - Reinhard Zumkeller, Oct 01 2008
One could prefix an initial term "1" (or not) and define this sequence through a(n+1) = a(n) + (a(n) mod 6). See A001651 for the analog with 3, A235700 (with 5), A047350 (with 7), A007612 (with 9) and A102039 (with 10). Using 4 or 8 yields a constant sequence from that term on. - M. F. Hasler, Jan 14 2014
Nonnegative m such that m^2/6 + 1/3 is an integer. - Bruno Berselli, Apr 13 2017
Numbers divisible by 2 but not by 3. - David James Sycamore, Apr 04 2018
Numbers k for which A276086(k) is of the form 6m+3. - Antti Karttunen, Dec 03 2022

Crossrefs

Cf. A020760, A020832, A093719, A047273 (complement), A120325 (characteristic function).
Equals 2*A001651.
Cf. A007310 ((6*n+(-1)^n-3)/2). - Bruno Berselli, Jun 24 2010
Positions of 3's in A053669 and in A358840.

Programs

  • Magma
    [ n eq 1 select 2 else Self(n-1)+2*(1+n mod 2): n in [1..70] ]; // Klaus Brockhaus, Dec 13 2008
    
  • Maple
    seq(6*floor((n+1)/2) + 3 + (-1)^n, n=1..67); # Gary Detlefs, Mar 02 2010
  • Mathematica
    Flatten[Table[{6n - 4, 6n - 2}, {n, 40}]] (* Alonso del Arte, Oct 27 2014 *)
  • PARI
    a(n)=(n-1)\2*6+3+(-1)^n \\ Charles R Greathouse IV, Jul 01 2013
    
  • PARI
    first(n) = my(v = vector(n, i, 3*i - 1)); forstep(i = 2, n, 2, v[i]--); v \\ David A. Corneth, Oct 20 2017

Formula

a(n) = 2*A001651(n).
n such that phi(3*n) = phi(2*n). - Benoit Cloitre, Aug 06 2003
G.f.: 2*x*(1 + x + x^2)/((1 + x)*(1 - x)^2). a(n) = 3*n - 3/2 - (-1)^n/2. - R. J. Mathar, Nov 22 2008
a(n) = 3*n + 5..n odd, 3*n + 4..n even a(n) = 6*floor((n+1)/2) + 3 + (-1)^n. - Gary Detlefs, Mar 02 2010
a(n) = 6*n - a(n-1) - 6 (with a(1) = 2). - Vincenzo Librandi, Aug 05 2010
a(n+1) = a(n) + (a(n) mod 6). - M. F. Hasler, Jan 14 2014
Sum_{n>=1} 1/a(n)^2 = Pi^2/27. - Dimitris Valianatos, Oct 10 2017
a(n) = (6*n - (-1)^n - 3)/2. - Ammar Khatab, Aug 23 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)). - Amiram Eldar, Dec 11 2021
E.g.f.: 2 + ((6*x - 3)*exp(x) - exp(-x))/2. - David Lovler, Aug 25 2022
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 2/sqrt(3) (10 * A020832).
Product_{n>=1} (1 + (-1)^n/a(n)) = 1/sqrt(3) (A020760). (End)

A047241 Numbers that are congruent to {1, 3} mod 6.

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

Comments

Also the numbers k such that 10^p+k could possibly be prime. - Roderick MacPhee, Nov 20 2011 This statement can be written as follows. If 10^m + k = prime, for any m >= 1, then k is in this sequence. See the pink box comments by Roderick MacPhee from Dec 09 2014. - Wolfdieter Lang, Dec 09 2014
The odd-indexed terms are one more than the arithmetic mean of their neighbors; the even-indexed terms are one less than the arithmetic mean of their neighbors. - Amarnath Murthy, Jul 29 2003
Partial sums are A212959. - Philippe Deléham, Mar 16 2014
12*a(n) is conjectured to be the length of the boundary after n iterations of the hexagon and square expansion shown in the link. The squares and hexagons have side length 1 in some units. The pattern is supposed to become the planar Archimedean net 4.6.12 when n -> infinity. - Kival Ngaokrajang, Nov 30 2014
Positive numbers k for which 1/2 + k/3 + k^2/6 is an integer. - Bruno Berselli, Apr 12 2018

References

  • L. Lovasz, J. Pelikan, K. Vesztergombi, Discrete Mathematics, Springer (2003); 14.4, p. 225.

Crossrefs

Subsequence of A186422.
Union of A016921 and A016945. - Wesley Ivan Hurt, Sep 28 2013

Programs

  • Haskell
    a047241 n = a047241_list !! (n-1)
    a047241_list = 1 : 3 : map (+ 6) a047241_list
    -- Reinhard Zumkeller, Feb 19 2013
    
  • Maple
    seq(3*k-2-((k+1) mod 2), k=1..100); # Wesley Ivan Hurt, Sep 28 2013
  • Mathematica
    Table[{2, 4}, {30}] // Flatten // Prepend[#, 1]& // Accumulate (* Jean-François Alcover, Jun 10 2013 *)
    Select[Range[200], MemberQ[{1, 3}, Mod[#, 6]]&] (* or *) LinearRecurrence[{1, 1, -1}, {1, 3, 7}, 70] (* Harvey P. Dale, Oct 01 2013 *)
  • PARI
    a(n)=bitor(3*n-3,1) \\ Charles R Greathouse IV, Sep 28 2013
    
  • Python
    for n in range(1,10**5):print(3*n-2-((n+1)%2)) # Soumil Mandal, Apr 14 2016

Formula

From Paul Barry, Sep 04 2003: (Start)
O.g.f.: (1 + 2*x + 3*x^2)/((1 + x)*(1 - x)^2) = (1 + 2*x + 3*x^2)/((1 - x)*(1 - x^2)).
E.g.f.: (6*x + 1)*exp(x)/2 + exp(-x)/2;
a(n) = 3*n - 5/2 - (-1)^n/2. (End)
a(n) = 2*floor((n-1)/2) + 2*n - 1. - Gary Detlefs, Mar 18 2010
a(n) = 6*n - a(n-1) - 8 with n > 1, a(1)=1. - Vincenzo Librandi, Aug 05 2010
a(n) = 3*n - 2 - ((n+1) mod 2). - Wesley Ivan Hurt, Jun 29 2013
a(1)=1, a(2)=3, a(3)=7; for n>3, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Oct 01 2013
From Benedict W. J. Irwin, Apr 13 2016: (Start)
A005408(a(n)+1) = A016813(A001651(n)),
A007310(a(n)) = A005408(A087444(n)-1),
A007310(A005408(a(n)+1)) = A017533(A001651(n)). (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)) + log(3)/4. - Amiram Eldar, Dec 11 2021

Extensions

Formula corrected by Bruno Berselli, Jun 24 2010

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

A047255 Numbers that are congruent to {1, 2, 3, 5} mod 6.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 9, 11, 13, 14, 15, 17, 19, 20, 21, 23, 25, 26, 27, 29, 31, 32, 33, 35, 37, 38, 39, 41, 43, 44, 45, 47, 49, 50, 51, 53, 55, 56, 57, 59, 61, 62, 63, 65, 67, 68, 69, 71, 73, 74, 75, 77, 79, 80, 81, 83, 85, 86, 87, 89, 91, 92, 93, 95, 97, 98, 99, 101, 103, 104
Offset: 1

Views

Author

Keywords

Comments

Each element is coprime to preceding two elements. - Amarnath Murthy, Jun 12 2001
The sequence is the interleaving of A047241 with A016789. - Guenther Schrack, Feb 16 2019

Examples

			After 21 and 23 the next term is 25 as 24 has a common divisor with 21.
		

Crossrefs

Programs

  • Haskell
    a047255 n = a047255_list !! (n-1)
    a047255_list = 1 : 2 : 3 : 5 : map (+ 6) a047255_list
    -- Reinhard Zumkeller, Jan 17 2014
    
  • Magma
    [n : n in [0..100] | n mod 6 in [1, 2, 3, 5]]; // Wesley Ivan Hurt, May 21 2016
    
  • Maple
    A047255:=n->(6*n-4+I^(1-n)+I^(n-1))/4: seq(A047255(n), n=1..100); # Wesley Ivan Hurt, May 20 2016
  • Mathematica
    Select[Range[100], MemberQ[{1, 2, 3, 5}, Mod[#, 6]] &]
    LinearRecurrence[{2,-2,2,-1},{1,2,3,5},100] (* Harvey P. Dale, May 14 2020 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,2,-2,2]^(n-1)*[1;2;3;5])[1,1] \\ Charles R Greathouse IV, Feb 11 2017
    
  • Sage
    a=(x*(1+x^2+x^3)/((1+x^2)*(1-x)^2)).series(x, 80).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019

Formula

{k | k == 1, 2, 3, 5 (mod 6)}.
G.f.: x*(1 + x^2 + x^3) / ((1+x^2)*(1-x)^2). - R. J. Mathar, Oct 08 2011
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 - 4 + i^(1-n) + i^(n-1))/4, where i = sqrt(-1).
a(2*n) = A016789(n-1) for n>0, a(2*n-1) = A047241(n). (End)
E.g.f.: (2 + sin(x) + (3*x - 2)*exp(x))/2. - Ilya Gutkovskiy, May 21 2016
a(1-n) = - A047251(n). - Wesley Ivan Hurt, May 21 2016
From Guenther Schrack, Feb 16 2019: (Start)
a(n) = (6*n - 4 + (1 - (-1)^n)*(-1)^(n*(n-1)/2))/4.
a(n) = a(n-4) + 6, a(1)=1, a(2)=2, a(3)=3, a(4)=5, for n > 4.
a(n) = A047237(n) + 1. (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
a(n) = 2*n - 1 - floor(n/2) + floor(n/4) - floor((n+1)/4). - Ridouane Oudra, Feb 21 2023

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 15 2001

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

Original entry on oeis.org

2, 4, 5, 8, 10, 11, 14, 16, 17, 20, 22, 23, 26, 28, 29, 32, 34, 35, 38, 40, 41, 44, 46, 47, 50, 52, 53, 56, 58, 59, 62, 64, 65, 68, 70, 71, 74, 76, 77, 80, 82, 83, 86, 88, 89, 92, 94, 95, 98, 100, 101, 104, 106, 107, 110, 112, 113, 116, 118, 119, 122, 124
Offset: 1

Views

Author

Keywords

Comments

If B and C are terms in the sequence then 2*B*C is a term. B (resp. C) is a term iff B (resp. C) mod 6 = 2, 4 or 5. It follows that (2*B*C) mod 6 = (2*(B mod 6)*(C mod 6)) mod 6 = 2 or 4 and therefore 2*B*C is a term. Examples: for B=16 and C=29, 2*16*29 = 928 is a term: (2*B*C) mod 6 = (2*16*29) mod 6 = 4; (2*2*2) mod 6 = 2. - Jerzy R Borysowicz, May 24 2018

Crossrefs

Cf. A047242 (complement).

Programs

  • Haskell
    a047261 n = a047261_list !! n
    a047261_list = 2 : 4 : 5 : map (+ 6) a047261_list
    -- Reinhard Zumkeller, Feb 19 2013, Jul 06 2012
    
  • Magma
    [n : n in [0..150] | n mod 6 in [2, 4, 5]]; // Wesley Ivan Hurt, Jun 14 2016
  • Maple
    A047261:=n->(6*n-1-2*cos(2*n*Pi/3))/3: seq(A047261(n), n=1..100); # Wesley Ivan Hurt, Jun 14 2016
  • Mathematica
    CoefficientList[Series[(1 + x)*(x^2 + 2)/((1 + x + x^2)*(x - 1)^2), {x, 0, 50}], x] (* Wesley Ivan Hurt, Aug 16 2014 *)
    Select[ Range@ 125, MemberQ[{2, 4, 5}, Mod[#, 6]] &] (* or *)
    LinearRecurrence[{1, 0, 1, -1}, {2, 4, 5, 8}, 62] (* Robert G. Wilson v, Jun 13 2018 *)

Formula

G.f.: x*(1+x)*(x^2+2) / ((1+x+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 2011
A214090(a(n)) = 1. - Reinhard Zumkeller, Jul 06 2012
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = (6*n - 1 - 2*cos(2*n*Pi/3))/3.
a(3k) = 6k-1, a(3k-1) = 6k-2, a(3k-2) = 6k-4. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/6 - log(2+sqrt(3))/(2*sqrt(3)) + log(2)/3. - Amiram Eldar, Dec 16 2021
E.g.f.: (3 + exp(x)*(6*x - 1) - 2*exp(-x/2)*cos(sqrt(3)*x/2))/3. - Stefano Spezia, Jul 26 2024

Extensions

More terms from Wesley Ivan Hurt, Aug 16 2014

A096981 Number of partitions of n into parts congruent to {0, 1, 3, 5} mod 6.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 5, 6, 7, 10, 12, 15, 21, 25, 30, 39, 46, 56, 72, 85, 101, 125, 147, 175, 215, 252, 296, 356, 415, 487, 582, 676, 786, 927, 1072, 1244, 1460, 1682, 1939, 2255, 2588, 2976, 3446, 3942, 4510, 5189, 5916, 6751, 7739, 8797, 9999, 11406, 12927, 14657
Offset: 0

Views

Author

Noureddine Chair, Aug 19 2004

Keywords

Comments

Also, number of partitions of n in which the distinct parts are prime to 3 and the unrestricted parts are multiples of 3.
The inverted graded parafermionic partition function. This g.f. is a generalization of A003105, A006950 and A096938

Examples

			a(11) = 15 because we can write 11 = 10+1 = 8+2+1 = 7+4 = 5+4+2 (parts do not contain multiple of 3) = 9+2 = 8+3 = 7+3+1 = 6+5 = 6+4+1 = 6+3+2 = 5+3+3 = 5+3+2+1 = 4+3+3+1 = 3+3+3+2.
1 + x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 5*x^6 + 6*x^7 + 7*x^8 + 10*x^9 + ...
q^-5 + q^19 + q^43 + 2*q^67 + 2*q^91 + 3*q^115 + 5*q^139 + 6*q^163 + 7*q^187 + ...
		

References

  • T. M. Apostol, An Introduction to Analytic Number Theory, Springer-Verlag, NY, 1976

Crossrefs

Programs

  • Haskell
    a096981 = p $ tail a047273_list where
       p _  0         = 1
       p ks'@(k:ks) m = if k > m then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Feb 19 2013
  • Maple
    series(product(1/(1-x^k+x^(2*k)-x^(3*k)+x^(4*k)-x^(5*k)), k=1..150), x=0,100);
  • Mathematica
    CoefficientList[ Series[ Product[ 1/(1 - x^k + x^(2k) - x^(3k) + x^(4k) - x^(5k)), {k, 55}], {x, 0, 53}], x] (* Robert G. Wilson v, Aug 21 2004 *)
    nmax = 100; CoefficientList[Series[x^3*QPochhammer[-1/x^2, x^3] * QPochhammer[-1/x, x^3]/((1 + x)*(1 + x^2) * QPochhammer[x^3, x^3]), {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 31 2015 *)
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) / (eta(x + A) * eta(x^6 + A)), n))} /* Michael Somos, Jun 08 2012 */
    

Formula

Expansion of q^(5/24) * eta(q^2) / (eta(q) * eta(q^6)) in powers of q. - Michael Somos, Jun 08 2012
Euler transform of period 6 sequence [1, 0, 1, 0, 1, 1, ...]. - Vladeta Jovovic, Aug 20 2004
G.f.: 1/product_{k>=1}(1-x^k+x^(2*k)-x^(3*k)+x^(4*k)-x^(5*k)) = Product_{k>=1}(1+x^(3*k-1))(1+x^(3*k-2))/(1-x^(3*k)).
a(n) ~ exp(2*Pi*sqrt(n)/3) / (2*sqrt(6)*n). - Vaclav Kotesovec, Aug 31 2015

Extensions

Better definition from Vladeta Jovovic, Aug 20 2004
More terms from Robert G. Wilson v, Aug 21 2004
Incorrect b-file replaced by Vaclav Kotesovec, Aug 31 2015

A281026 a(n) = floor(3*n*(n+1)/4).

Original entry on oeis.org

0, 1, 4, 9, 15, 22, 31, 42, 54, 67, 82, 99, 117, 136, 157, 180, 204, 229, 256, 285, 315, 346, 379, 414, 450, 487, 526, 567, 609, 652, 697, 744, 792, 841, 892, 945, 999, 1054, 1111, 1170, 1230, 1291, 1354, 1419, 1485, 1552, 1621, 1692, 1764, 1837, 1912, 1989, 2067, 2146
Offset: 0

Views

Author

Bruno Berselli, Jan 13 2017

Keywords

Crossrefs

Subsequence of A214068.
Partial sums of A047273.
Cf. A011865, A045943, A274757 (subsequence).
Cf. sequences with formula floor(k*n*(n+1)/4): A011848 (k=1), A000217 (k=2), this sequence (k=3), A002378 (k=4).
Cf. sequences with formula floor(k*n*(n+1)/(k+1)): A000217 (k=1), A143978 (k=2), this sequence (k=3), A281151 (k=4), A194275 (k=5).

Programs

  • Magma
    [3*n*(n+1) div 4: n in [0..60]];
  • Maple
    A281026:=n->floor(3*n*(n+1)/4): seq(A281026(n), n=0..100); # Wesley Ivan Hurt, Jan 13 2017
  • Mathematica
    Table[Floor[3 n (n + 1)/4], {n, 0, 60}]
    LinearRecurrence[{3,-4,4,-3,1},{0,1,4,9,15},60] (* Harvey P. Dale, Jun 04 2023 *)
  • Maxima
    makelist(floor(3*n*(n+1)/4), n, 0, 60);
    
  • PARI
    vector(60, n, n--; floor(3*n*(n+1)/4))
    
  • Python
    [int(3*n*(n+1)/4) for n in range(60)]
    
  • Sage
    [floor(3*n*(n+1)/4) for n in range(60)]
    

Formula

O.g.f.: x*(1 + x + x^2)/((1 + x^2)*(1 - x)^3).
E.g.f.: -(1 - 6*x - 3*x^2)*exp(x)/4 - (1 + i)*(i - exp(2*i*x))*exp(-i*x)/8, where i=sqrt(-1).
a(n) = a(-n-1) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) = a(n-4) + 6*n - 9.
a(n) = 3*n*(n+1)/4 + (i^(n*(n+1)) - 1)/4. Therefore:
a(4*k+r) = 12*k^2 + 3*(2*r+1)*k + r^2, where 0 <= r <= 3.
a(n) = n^2 - floor((n-1)*(n-2)/4).
a(n) = A011865(3*n+2).

A093719 a(n) = (n mod 2)^(n mod 3).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 12 2004

Keywords

Comments

This is a periodic sequence with period 6. The repeating block is 1,1,0,1,0,1. - Michel Dekking, Sep 19 2020

Crossrefs

Programs

Formula

a(n) = A000035(n)^A010872(n).
a(A047273(n)) = 1, a(A047235(n)) = 0. [Reinhard Zumkeller, Oct 01 2008]
G.f.: -(x^5 + x^3 + x + 1)/(x^6 - 1). - Colin Barker, Apr 01 2013
E.g.f.: (2*cos(sqrt(3)*x/2)*cosh(x/2) + cosh(x))/3 + sinh(x). - Stefano Spezia, Jul 26 2024

A047262 Numbers that are congruent to {0, 2, 4, 5} mod 6.

Original entry on oeis.org

0, 2, 4, 5, 6, 8, 10, 11, 12, 14, 16, 17, 18, 20, 22, 23, 24, 26, 28, 29, 30, 32, 34, 35, 36, 38, 40, 41, 42, 44, 46, 47, 48, 50, 52, 53, 54, 56, 58, 59, 60, 62, 64, 65, 66, 68, 70, 71, 72, 74, 76, 77, 78, 80, 82, 83, 84, 86, 88, 89, 90, 92, 94, 95, 96, 98
Offset: 1

Views

Author

Keywords

Comments

The sequence is the interleaving of A047233 with A016789(n-1). - Guenther Schrack, Feb 14 2019

Crossrefs

Complement: A047241.

Programs

  • Magma
    [n : n in [0..100] | n mod 6 in [0, 2, 4, 5]]; // Wesley Ivan Hurt, May 21 2016
    
  • Maple
    A047262:=n->(6*n-4-I^(1-n)+I^(1+n))/4: seq(A047262(n), n=1..100); # Wesley Ivan Hurt, May 21 2016
  • Mathematica
    Select[Range[0,100], MemberQ[{0,2,4,5}, Mod[#,6]]&] (* or *) LinearRecurrence[{2,-2,2,-1}, {0,2,4,5}, 70] (* Harvey P. Dale, Dec 09 2015 *)
  • PARI
    my(x='x+O('x^70)); concat([0], Vec(x^2*(2+x^2)/((1+x^2)*(1-x)^2))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    a=(x^2*(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

From R. J. Mathar, Oct 08 2011: (Start)
G.f.: x^2*(2+x^2) / ( (1+x^2)*(1-x)^2 ).
a(n) = 3*n/2 - 1 - sin(Pi*n/2)/2. (End)
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 - 4 - i^(1-n) + i^(1+n))/4, where i = sqrt(-1).
a(2*n) = A016789(n-1) for n>0, a(2*n-1) = A047233(n).
a(2-n) = - A047237(n), a(n-1) = A047273(n) - 1 for n > 1. (End)
From Guenther Schrack, Feb 14 2019: (Start)
a(n) = (6*n - 4 - (1 - (-1)^n)*(-1)^(n*(n-1)/2))/4.
a(n) = a(n-4) + 6, a(1)=0, a(2)=2, a(3)=4, a(4)=5, for n > 4. (End)
Sum_{n>=2} (-1)^n/a(n) = log(3)/4 + log(2)/3 - sqrt(3)*Pi/36. - Amiram Eldar, Dec 17 2021

Extensions

More terms from Wesley Ivan Hurt, May 21 2016

A301729 a(0)=1; thereafter positive numbers that are congruent to {0, 1, 3, 5} mod 6.

Original entry on oeis.org

1, 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
Offset: 0

Views

Author

N. J. A. Sloane, Mar 30 2018

Keywords

Crossrefs

Essentially the same as A047273.

Programs

  • Maple
    f:= proc(n) if n=0 then 1
    elif (n mod 4) = 0 then (3*n)/2
    elif (n mod 4) = 1 then (3*n-1)/2
    elif (n mod 4) = 2 then (3*n)/2
    else (3*n+1)/2 fi;
    end;
    s1 := [seq(f(n),n=0..70)];
  • Mathematica
    Join[{1}, Select[Range[100], MemberQ[{0, 1, 3, 5}, Mod[#,6]] &]] (* Amiram Eldar, Dec 31 2021 *)

Formula

Sum_{n>=1} (-1)^(n+1)/a(n) = log(108)/6 = log(2)/3 + log(3)/2. - Amiram Eldar, Dec 31 2021
Showing 1-10 of 10 results.