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.

A246416 A permutation of essentially the duplicate nonnegative numbers: a(4n) = n + 1/2 - (-1)^n/2, a(2n+1) = a(4n+2) = 2n+1.

Original entry on oeis.org

0, 1, 1, 3, 2, 5, 3, 7, 2, 9, 5, 11, 4, 13, 7, 15, 4, 17, 9, 19, 6, 21, 11, 23, 6, 25, 13, 27, 8, 29, 15, 31, 8, 33, 17, 35, 10, 37, 19, 39, 10, 41, 21, 43, 12, 45, 23, 47, 12, 49, 25, 51, 14, 53, 27, 55, 14, 57, 29, 59, 16, 61, 31, 63, 16
Offset: 0

Views

Author

Paul Curtz, Sep 14 2014

Keywords

Comments

A permutation of A004526 (n > 0).
0 is at its own place. Distance between the two (2*k+1)'s: 2*k+1 terms. 0 is in position 0, the first 1 in position 1, the second 1 in position 2, the first 2 in position 4, the second 2 in position 8. Hence, r(n) = 0, 1, 2, 4, 8, 3, 6, 12, 16, 5, 10, 20, 24, ..., a permutation of A001477. See A225055. The recurrence r(n) = r(n-4) + r(n-8) - r(n-12) is the same as for a(n).
A061037(n+3) is divisible by a(n+5) (= 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 3, ...). Hence a link, via A212831 and A214282, between the Catalan numbers A000108 and the Balmer series.

Crossrefs

Programs

  • Magma
    I:=[0,1,1,3,2,5,3,7,2,9,5,11,4,13,7,15,4,17,9,19,6,21,11,23]; [n le 24 select I[n] else 3*Self(n-8)-3*Self(n-16)+Self(n-24): n in [1..80]]; // Vincenzo Librandi, Oct 15 2014
  • Maple
    A246416:=n->n*(1+floor((2-n)/4)+floor((n-2)/4))/2+n*(1+floor((1-n)/2)+floor((n-1)/2))+(-n-2+2*(-1)^(n/4))*(ceil(n/4)-floor(n/4)-1)/4: seq(A246416(n), n=0..50); # Wesley Ivan Hurt, Sep 14 2014
  • Mathematica
    Table[n (1 + Floor[(2 - n)/4] + Floor[(n - 2)/4])/2 + n (1 + Floor[(1 - n)/2] + Floor[(n - 1)/2]) + (-n - 2 + 2 (-1)^(n/4)) (Ceiling[n/4] - Floor[n/4] - 1)/4, {n, 0, 50}] (* Wesley Ivan Hurt, Sep 14 2014 *)
    a[n_] := Switch[Mod[n, 4], 0, n/4-(-1)^(n/4)/2+1/2, 1|3, n, 2, n/2]; Table[a[n], {n, 0, 64}] (* Jean-François Alcover, Oct 09 2014 *)
    LinearRecurrence[{0,0,0,1,0,0,0,1,0,0,0,-1},{0,1,1,3,2,5,3,7,2,9,5,11},70] (* Harvey P. Dale, Mar 23 2015 *)
  • PARI
    a(n)=if(n%4,n/(2-n%2),if(n%8,1,0)+n/4) \\ Charles R Greathouse IV, Sep 14 2014
    

Formula

a(n) = 3*a(n-8) - 3*a(n-16) + a(n-24).
a(n+4) = a(n) + period 8: repeat [2, 4, 2, 4, 0, 4, 2, 4].
a(n+8) = a(n) + period 4: repeat [2, 8, 4, 8] (= 2 * A176895).
a(2n) = A212831(n).
a(n) = n*(1+floor((2-n)/4)+floor((n-2)/4))/2+n*(1+floor((1-n)/2)+floor((n-1)/2))+(-n-2+2*(-1)^(n/4))*(ceiling(n/4)-floor(n/4)-1)/4. - Wesley Ivan Hurt, Sep 14 2014
a(n) = a(n-4) + a(n-8) - a(n-12). - Charles R Greathouse IV, Sep 14 2014
G.f.: x*(x^10+x^9+3*x^8+4*x^6+2*x^5+4*x^4+2*x^3+3*x^2+x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2*(x^4+1)). - Colin Barker, Sep 15 2014

A247555 A permutation of the nonnegative numbers: a(4n) = 8n, a(4n+1) = 2n + 1, a(4n+2) = 4n + 2, a(4n+3) = 8n + 4.

Original entry on oeis.org

0, 1, 2, 4, 8, 3, 6, 12, 16, 5, 10, 20, 24, 7, 14, 28, 32, 9, 18, 36, 40, 11, 22, 44, 48, 13, 26, 52, 56, 15, 30, 60, 64, 17, 34, 68, 72, 19, 38, 76, 80, 21, 42, 84, 88, 23, 46, 92, 96, 25, 50, 100, 104, 27, 54, 108, 112, 29, 58, 116, 120
Offset: 0

Views

Author

Paul Curtz, Sep 19 2014

Keywords

Comments

A permutation of the nonnegative integers.

Crossrefs

Programs

  • Magma
    &cat[[4*(i-1),i,2*i,4*i]: i in [1..50 by 2]]; // Bruno Berselli, Sep 19 2014
  • Mathematica
    a[n_]:=Switch[Mod[n,4],0,2 n,1,(n+1)/2,2,n,3,2 n-2]; Table[a[n],{n,0,60}] (* Jean-François Alcover, Oct 09 2014 *)
    LinearRecurrence[{0,0,0,2,0,0,0,-1}, {0,1,2,4,8,3,6,12}, 50] (* G. C. Greubel, May 01 2018 *)
  • PARI
    Vec(x*(4*x^6+2*x^5+x^4+8*x^3+4*x^2+2*x+1)/((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100)) \\ Colin Barker, Sep 19 2014
    

Formula

a(n) = a(n-4) + a(n-8) - a(n-12).
a(n) = 2*a(n-4) - a(n-8). - Colin Barker, Sep 19 2014
G.f.: x*(4*x^6 + 2*x^5 + x^4 + 8*x^3 + 4*x^2 + 2*x + 1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, Sep 19 2014
a(n) = (11*n-3+(n+3)*(-1)^n+(4*n-1+(-1)^n)*cos(n*Pi/2)+2*(9-3*n+4(-1)^n)* sin(n*Pi/2))/8. - Wesley Ivan Hurt, May 07 2021
Showing 1-2 of 2 results.