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-2 of 2 results.

A047481 Numbers that are congruent to {0, 2, 5, 7} mod 8.

Original entry on oeis.org

0, 2, 5, 7, 8, 10, 13, 15, 16, 18, 21, 23, 24, 26, 29, 31, 32, 34, 37, 39, 40, 42, 45, 47, 48, 50, 53, 55, 56, 58, 61, 63, 64, 66, 69, 71, 72, 74, 77, 79, 80, 82, 85, 87, 88, 90, 93, 95, 96, 98, 101, 103, 104, 106, 109, 111, 112, 114, 117, 119, 120, 122, 125
Offset: 1

Views

Author

Keywords

Comments

Complement of A047415.

Crossrefs

Programs

  • Magma
    I:=[0, 2, 5, 7, 8]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // Vincenzo Librandi, May 16 2012
    
  • Maple
    A047481:=n->(-1*((-1)^((n-1)/2-(-1)^n/4-1/4)))/2+2*(n-1)+1/2: seq(A047481(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
  • Mathematica
    Select[Range[0,300], MemberQ[{0,2,5,7}, Mod[#,8]]&] (* Vincenzo Librandi, May 16 2012 *)
    LinearRecurrence[{2,-2,2,-1},{0,2,5,7},70] (* Harvey P. Dale, May 28 2017 *)
  • PARI
    a(n)=[-1,0,2,5][n%4]+n\4*8 \\ Charles R Greathouse IV, Mar 05 2014
    
  • PARI
    x='x+O('x^100); concat(0, Vec(x^2*(2+x+x^2)/((1-x)^2*(1+x^2)))) \\ Altug Alkan, Dec 24 2015

Formula

From Colin Barker, May 14 2012: (Start)
a(n) = (1/4+i/4)*((-3+3*i)-i*(-i)^n+i^n+(4-4*i)*n) where i=sqrt(-1).
G.f.: x^2*(2+x+x^2)/((1-x)^2*(1+x^2)). (End)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4. - Vincenzo Librandi, May 16 2012
a(n) = (-1*((-1)^((n-1)/2-(-1)^n/4-1/4)))/2+2*(n-1)+1/2.
a(n) = cos(n*Pi/2)-1/2*cos((n-1)*Pi/2)-1/2*cos(n*Pi/2)+2*(n-1)+1/2. - Cédric Christian Bernard Gagneux, Mar 05 2014
a(2k) = A047524, a(2k-1) = A047615(k). - Wesley Ivan Hurt, Jun 01 2016
E.g.f.: (2 - sin(x) + cos(x) + (4*x - 3)*exp(x))/2. - Ilya Gutkovskiy, Jun 02 2016
Sum_{n>=2} (-1)^n/a(n) = (3-sqrt(2))*log(2)/8 + sqrt(2)*log(2+sqrt(2))/4 - Pi/16. - Amiram Eldar, Dec 21 2021

A189887 Dimension of homogeneous component of degree n in x in the Malcev-Poisson superalgebra S^tilde(M).

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 11, 12, 14, 17, 19, 20, 22, 25, 27, 28, 30, 33, 35, 36, 38, 41, 43, 44, 46, 49, 51, 52, 54, 57, 59, 60, 62, 65, 67, 68, 70, 73, 75, 76, 78, 81, 83, 84, 86, 89, 91, 92, 94, 97, 99, 100, 102, 105, 107, 108, 110, 113, 115, 116, 118, 121, 123, 124, 126, 129, 131, 132, 134, 137, 139, 140, 142, 145, 147, 148, 150, 153, 155
Offset: 1

Views

Author

N. J. A. Sloane, Apr 29 2011

Keywords

Crossrefs

Apart from initial terms, same as A047415.

Programs

  • Maple
    f:=proc(n) local k,r;
    if n <= 2 then 1 elif n=3 then 2
    else k:=floor(n/4); r:=n-4*k;
    if r=0 then 8*k-5 elif r=1 then 8*k-4 elif r=2 then 8*k-2 else 8*k+1; fi;
    fi;
    end;
  • Mathematica
    LinearRecurrence[{2, -2, 2, -1}, {1, 1, 2, 3, 4, 6, 9}, 100] (* Paolo Xausa, Jun 26 2024 *)

Formula

See Maple code.
a(n) = (1/4+i/4)*((-11+11*i)-i*(-i)^n+i^n)+2*n for n>3, where i=sqrt(-1). a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>7. G.f.: x*(x^6+x^5+x^4-x^3+2*x^2-x+1) / ((x-1)^2*(x^2+1)). - Colin Barker, Jul 24 2013
Showing 1-2 of 2 results.