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

A065173 Site swap sequence that rises infinitely after t=0. The associated delta sequence p(t)-t for the permutation of Z: A065171.

Original entry on oeis.org

0, 1, 2, 2, 1, 3, 6, 4, 2, 5, 10, 6, 3, 7, 14, 8, 4, 9, 18, 10, 5, 11, 22, 12, 6, 13, 26, 14, 7, 15, 30, 16, 8, 17, 34, 18, 9, 19, 38, 20, 10, 21, 42, 22, 11, 23, 46, 24, 12, 25, 50, 26, 13, 27, 54, 28, 14, 29, 58, 30, 15, 31, 62, 32, 16, 33, 66, 34, 17, 35, 70, 36, 18, 37, 74, 38
Offset: 1

Views

Author

Antti Karttunen, Oct 19 2001

Keywords

Comments

Here the site swap pattern ..., 5, 18, 4, 14, 3, 10, 2, 6, 1, 2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... that spans over the Z (zero throw is at t=0) has been folded to N by picking values at t=0, t=1, t=-1, t=2, t=-2, t=3, t=-3, etc. successively.

Examples

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

Crossrefs

The other bisection gives A000027.

Programs

  • Maple
    [seq((InfRisingSS(N2Z(n))-N2Z(n)), n=1..120)]; N2Z := n -> ((-1)^n)*floor(n/2); Z2N := z -> 2*abs(z)+`if`((z < 1),1,0);
  • PARI
    concat(0, Vec(x^2*(2*x^5+x^4+x^3+2*x^2+2*x+1)/((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100))) \\ Colin Barker, Oct 29 2016
    
  • PARI
    {a(n) = if( n%2==0, n/2, n%4==1, n\4, n-1)}; /* Michael Somos, Nov 06 2016 */

Formula

a(2*k+2) = k+1, a(4*k+1) = k, a(4*k+3) = 4*k+2. - Ralf Stephan, Jun 10 2005
G.f.: x^2*(2*x^5+x^4+x^3+2*x^2+2*x+1) / ((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) = (9*n-5-(n-5)*(-1)^n-3*(n-1)*(1-(-1)^n)*(-1)^((2*n-1+(-1)^n)/4))/16. - Luce ETIENNE, Oct 29 2016

A065172 Inverse permutation to A065171.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 19 2001

Keywords

Programs

  • Maple
    [seq(Z2N(InfRisingSSInv(N2Z(n))), n=1..120)]; InfRisingSSInv := z -> `if`((z > 0),`if`((0 = (z mod 2)), z/2,-z),2*z);
    N2Z := n -> ((-1)^n)*floor(n/2); Z2N := z -> 2*abs(z)+`if`((z < 1),1,0);

Formula

a(2n+1) = 4n+1, a(4n+2) = 4n+3, a(4n+4) = 2n+2. - Ralf Stephan, Jun 10 2005
Empirical g.f.: x*(3*x^6+x^5+7*x^4+2*x^3+5*x^2+3*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, Feb 18 2013
From Luce ETIENNE, Nov 11 2016: (Start)
a(n) = (11*n-2-(5*n-6)*(-1)^n-(n+2)*((-1)^((2*n+1-(-1)^n)/4)+(-1)^((2*n-1+(-1)^n)/4)))/8.
a(n) = (11*n-2-(5*n-6)*cos(n*Pi)-2*(n+2)*cos(n*Pi/2))/8.
a(n) = (11*n-2-(5*n-6)*(-1)^n-(n+2)*(1+(-1)^n)*i^n)/8 where i = sqrt(-1). (End)

A065167 Table T(n,k) read by antidiagonals, where the k-th row gives the permutation t->t+k of Z, folded to N (k >= 0, n >= 1).

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 4, 1, 6, 6, 5, 6, 2, 8, 8, 6, 3, 8, 4, 10, 10, 7, 8, 1, 10, 6, 12, 12, 8, 5, 10, 2, 12, 8, 14, 14, 9, 10, 3, 12, 4, 14, 10, 16, 16, 10, 7, 12, 1, 14, 6, 16, 12, 18, 18, 11, 12, 5, 14, 2, 16, 8, 18, 14, 20, 20, 12, 9, 14, 3, 16, 4, 18, 10, 20, 16, 22, 22, 13, 14, 7, 16, 1
Offset: 0

Views

Author

Antti Karttunen, Oct 19 2001

Keywords

Comments

Simple periodic site swap permutations of natural numbers.
Row n of the table (starting from n=0) gives a permutation of natural numbers corresponding to the simple, infinite, periodic site swap pattern ...nnnnn...

Examples

			Table begins:
1 2 3 4 5 6 7 ...
2 4 1 6 3 8 5 ...
4 6 2 8 1 10 3 ...
6 8 4 10 2 12 1 ...
		

Crossrefs

Successive rows and associated site swap sequences, starting from the zeroth row: (A000027, A000004), (A065164, A000012), (A065165, A007395), (A065166, A010701). Cf. also A065171, A065174, A065177. trinv given at A054425.

Programs

  • Maple
    PerSS_table := (n) -> PerSS((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1, (n-((trinv(n)*(trinv(n)-1))/2))); PerSS := (n,c) -> Z2N(N2Z(n)+c);
    N2Z := n -> ((-1)^n)*floor(n/2); Z2N := z -> 2*abs(z)+`if`((z < 1),1,0);
    [seq(PerSS_table(j),j=0..119)];

Formula

Let f: Z -> N be given by f(z) = 2z if z>0 else 2|z|+1, with inverse g(z) = z/2 if z even else (1-z)/2. Then the n-th term of the k-th row is f(g(n)+k).

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

A065174 Permutation of Z, folded to N, corresponding to the site swap pattern ...242824202428242... (A065176).

Original entry on oeis.org

1, 6, 2, 12, 4, 10, 3, 24, 8, 14, 7, 20, 5, 18, 11, 48, 16, 22, 15, 28, 13, 26, 19, 40, 9, 30, 23, 36, 21, 34, 27, 96, 32, 38, 31, 44, 29, 42, 35, 56, 25, 46, 39, 52, 37, 50, 43, 80, 17, 54, 47, 60, 45, 58, 51, 72, 41, 62, 55, 68, 53, 66, 59, 192, 64, 70, 63, 76, 61, 74, 67, 88
Offset: 1

Views

Author

Antti Karttunen, Oct 19 2001

Keywords

Comments

This permutation corresponds to the site swap pattern shown in the figure 7 of Buhler and Graham paper and consists of one fixed point (at 0, mapped here to 1) and infinite number of infinite cycles.

Crossrefs

Inverse permutation: A065175. A065176 gives the deltas p(t)-t, i.e. the associated site swap sequence. Cf. also A065167, A065171.

Programs

  • Maple
    [seq(Z2N(N2Z(n)+TZ2(abs(N2Z(n)))), n=1..120)]; TZ2 := proc(xx) local x,s; s := 1; x := xx; if(0 = x) then RETURN(0); fi; while(0 = (x mod 2)) do x := floor(x/2); s := s+1; od; RETURN(2^s); end;
    N2Z := n -> ((-1)^n)*floor(n/2); Z2N := z -> 2*abs(z)+`if`((z < 1),1,0);
Showing 1-5 of 5 results.