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-4 of 4 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)

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

A120325 Period 6: repeat [0, 0, 1, 0, 1, 0].

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Dirichlet series for the principal character mod 6: L(s,chi) = Sum_{n>=1} a(n+3)/n^s = (1 + 1/6^s - 1/2^s - 1/3^s) Riemann-zeta(s), e.g., L(2,chi) = A100044, L(4,chi) = 5*Pi^4/486, L(6,chi) = 91*Pi^6/87480. See Jolley eq (313) and arXiv:1008.2547 L(m=6,r=1,s). - R. J. Mathar, Jul 31 2010

Examples

			a(0) = (1/3)*(sin(0) + sin(0))^2 = 0.
a(1) = (1/3)*(sin(Pi/6) + sin(7*Pi/6))^2 = (1/3)*(1/2 - 1/2)^2 = 0.
a(2) = (1/3)*(sin(Pi/3) + sin(7*Pi/3))^2 = (1/3)*((sqrt(3))/2 + (sqrt(3))/2)^2 = 1.
a(3) = (1/3)*(sin(Pi/2) + sin(7*Pi/2))^2 = (1/3)*(1 - 1)^2 = 0.
a(4) = (1/3)*(sin(2*Pi/3) + sin(14*Pi/3))^2 = (1/3)*((sqrt(3))/2 + (sqrt(3))/2)^2 = 1.
a(5) = (1/3)*(sin(5*Pi/6) + sin(35*Pi/6))^2 = (1/3)*(1/2 - 1/2)^2 = 0.
		

References

  • L. B. W. Jolley, Summation of Series, Dover (1961).

Crossrefs

Characteristic function of A047235. One's complement of A093719.

Programs

  • Magma
    [(n+3)^2 mod (2+((n+1) mod 2)) : n in [0..100]]; // Wesley Ivan Hurt, Oct 31 2014
    
  • Maple
    P:=proc(n)local i,j; for i from 0 by 1 to n do j:=1/3*(sin(i*Pi/6)+sin(7*i*Pi/6))^2; print(j); od; end: P(20);
    seq(abs(numtheory[jacobi](n,6)),n=3..150) ; # R. J. Mathar, Jul 31 2010
  • Mathematica
    Table[Mod[(n + 3)^2, (5 + (-1)^n)/2], {n, 0, 100}] (* Wesley Ivan Hurt, Oct 31 2014 *)
    PadRight[{},120,{0,0,1,0,1,0}] (* Harvey P. Dale, Oct 05 2016 *)
  • PARI
    A120325(n) = ((n%3)&&!(n%2)); \\ Antti Karttunen, Dec 03 2022
  • Python
    def A120325(n): return int(not (n+3) % 6 & 3 ^ 1) # Chai Wah Wu, May 25 2022
    

Formula

a(n) = (1/3)*(sin(n*Pi/6) + sin(7*n*Pi/6))^2.
From R. J. Mathar, Nov 22 2008: (Start)
G.f.: x^2*(1+x^2)/((1+x)*(1-x)*(1+x+x^2)*(1-x+x^2)).
a(n+6) = a(n). (End)
a(n) = ((n+3)*Fibonacci(n+3)) mod 2. - Gary Detlefs, Dec 13 2010
a(n) = 0 if n mod 6 = 0, otherwise a(n) = n mod 2 + (-1)^n. - Gary Detlefs, Dec 13 2010
a(n) = (n+3)^2 mod (5+(-1)^n)/2. - Wesley Ivan Hurt, Oct 31 2014
a(n) = sin(n*Pi/3)^2*(2-4*cos(n*Pi/3))/3. - Wesley Ivan Hurt, Jun 19 2016
E.g.f.: 2*(cosh(x) - cos(sqrt(3)*x/2)*cosh(x/2))/3. - Ilya Gutkovskiy, Jun 20 2016
a(n) = sign((n-3) mod 2) * sign((n-3) mod 3). - Wesley Ivan Hurt, Feb 04 2022
From Antti Karttunen, Dec 03 2022: (Start)
a(n) = 1 - A093719(n).
a(n) = [A276086(n) == 3 (mod 6)], where [ ] is the Iverson bracket.
a(n) = A059841(n) - A358841(n) - A358842(n).
For n >= 1, a(n) = A059841(n) - A358754(n) - A358755(n).
(End)

Extensions

Data section extended up to a(120) by Antti Karttunen, Dec 03 2022

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

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 12 2004

Keywords

Comments

Period 6: repeat [1, 1, 1, 0, 1, 2]. - Joerg Arndt, Jun 09 2013

Crossrefs

Programs

Formula

a(n) = A010872(n)^A000035(n).
G.f.: ( -1-x^2-2*x^4+x^3 ) / ( (x-1)*(1-x+x^2)*(1+x+x^2) ). - R. J. Mathar, Jun 09 2013
a(n) = (n + 3) mod (2 + n mod 2) - Wesley Ivan Hurt, Aug 16 2014
From Wesley Ivan Hurt, Jun 23 2016: (Start)
a(n) = cos(n*Pi/6) * (6*cos(n*Pi/6)-3*cos(n*Pi/2)-sqrt(3)*sin(n*Pi/2))/3.
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5).
a(n) = a(n-6) for n>5. (End)
E.g.f.: cosh(x) - cosh(x/2)*sin(sqrt(3)*x/2)/sqrt(3) + cos(sqrt(3)*x/2)*sinh(x/2) + sinh(x). - Stefano Spezia, Jul 26 2024
Showing 1-4 of 4 results.