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.

A065262 The nonpositive side (-1, -2, -3, ...) of the site swap sequence A065261. The bisection of odd terms of A065261.

Original entry on oeis.org

1, 1, 5, 2, 9, 3, 13, 4, 17, 5, 21, 6, 25, 7, 29, 8, 33, 9, 37, 10, 41, 11, 45, 12, 49, 13, 53, 14, 57, 15, 61, 16, 65, 17, 69, 18, 73, 19, 77, 20, 81, 21, 85, 22, 89, 23, 93, 24, 97, 25, 101, 26, 105, 27, 109, 28, 113, 29, 117, 30, 121, 31, 125, 32, 129, 33, 133, 34, 137, 35
Offset: 1

Views

Author

Antti Karttunen, Oct 28 2001

Keywords

Crossrefs

Cf. A065261.

Programs

  • Magma
    I:=[1, 1, 5, 2]; [n le 4 select I[n] else 2*Self(n-2)-Self(n-4) : n in [1..100]]; // Wesley Ivan Hurt, Dec 06 2015
  • Maple
    a:=proc(n) option remember; if n=1 then 1 elif n=2 then 1 elif n=3 then 5 elif n=4 then 2 else 2*a(n-2)-a(n-4); fi; end:  seq(a(n), n=1..100); # Wesley Ivan Hurt, Dec 06 2015
  • Mathematica
    CoefficientList[Series[(3*x^2 + x + 1)/(x^2 - 1)^2, {x, 0, 100}], x] (* or *) LinearRecurrence[{0, 2, 0, -1}, {1, 1, 5, 2}, 100] (* Wesley Ivan Hurt, Dec 06 2015 *)
  • PARI
    Vec(x*(3*x^2+x+1) / ((x-1)^2*(x+1)^2) + O(x^100)) \\ Michel Marcus, Dec 06 2015
    
  • PARI
    vector(100, n, n - sum(i=1, n, ceil((-1)^i*(2*n-3+i)/2 ))) \\ Altug Alkan, Dec 06 2015
    

Formula

G.f.: x*(3*x^2+x+1) / ((x-1)^2*(x+1)^2). [Colin Barker, Feb 18 2013]
From Wesley Ivan Hurt, Dec 06 2015: (Start)
a(n) = 2*a(n-2)-a(n-4) for n>4.
a(n) = n - Sum_{i=1..n} ceiling( (-1)^i*(2*n-3+i)/2 ). (End)

A065260 A057115 conjugated with A059893, inverse of A065259.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 28 2001

Keywords

Comments

This permutation of N induces also such permutation of Z, that p(i)-i >= 0 for all i.

Examples

			G.f. = 2*x + 4*x^2 + x^3 + 8*x^4 + 6*x^5 + 12*x^6 + 3*x^7 + 16*x^8 + ...
		

Crossrefs

Cf. also A065171. The siteswap sequence (deltas) is A065261.

Programs

  • PARI
    Vec(x*(2+4*x+x^2+8*x^3+2*x^4+4*x^5+x^6)/((1-x)^2*(1+x)^2*(1+x^2)^2) + O(x^100)) \\ Colin Barker, Oct 29 2016
    
  • PARI
    {a(n) = if( n%2==0, n*2, n%4==1, n+1, n\2)}; /* Michael Somos, Nov 06 2016 */

Formula

a(n) = A059893(A057115(A059893(n))).
a(2*k+2) = 4*k+4, a(4*k+1) = 4*k+2, a(4*k+3) = 2*k+1. - Ralf Stephan, Jun 10 2005
G.f.: x*(x^6+4*x^5+2*x^4+8*x^3+x^2+4*x+2) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, Feb 18 2013
a(n) = 2*a(n-4) - a(n-8) for n>8. - Colin Barker, Oct 29 2016
a(n) = (11*n+1+(5*n-1)*(-1)^n-(n+3)*(1-(-1)^n)*(-1)^((2*n+3+(-1)^n)/4))/8. - Luce ETIENNE, Oct 20 2016
Showing 1-2 of 2 results.