login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A026177 For n >= 2, let h=floor(n/2), L=n-h, R=n+h; then a(R)=n if n odd or a(L) already defined, otherwise a(L)=n. 9

%I #38 Mar 12 2020 00:24:42

%S 1,4,2,3,10,12,5,16,6,7,22,8,9,28,30,11,34,36,13,40,14,15,46,48,17,52,

%T 18,19,58,20,21,64,66,23,70,24,25,76,26,27,82,84,29,88,90,31,94,32,33,

%U 100,102,35,106,108,37,112,38,39,118,120,41

%N For n >= 2, let h=floor(n/2), L=n-h, R=n+h; then a(R)=n if n odd or a(L) already defined, otherwise a(L)=n.

%C Also a(n) = (1/5)*s(n), where s(n) is the n-th multiple of 5 in A026142.

%C Inverse is A026178.

%C From _Kevin Ryde_, Feb 06 2020: (Start)

%C Dekking's cases III and IV can be combined as ceiling(2n/3). Theorem 8 determines the case for n by discarding low ternary 0 digits until reaching the lowest ternary non-0 digit of n, LNZ(n) = A060236(n), and hence the formula below for when the bigger a(n) = 2n or smaller a(n) = ceiling(2n/3).

%C For c odd and LNZ(c)=1, so c = (6j+1)*3^k, this sequence has a self-similarity in that taking the values which are multiples of c, and dividing them by c, gives the full sequence again. (Multiples of 3 divided by 3 this way had been the definition of A026216.) Using the inverse A026178, a(n)=c*m is located at n = A026178(c*m) = c*A026178(m) + (floor(c/2) if m odd) since c*m goes to the same bigger or smaller case in A026178 as m does. Then floor(c/2) < c so values c*m are in the same order as all values m.

%C For c even and LNZ(c)=1, so c = (6j+4)*3^k = A026180 except initial 1, this sequence has an inverse self-similarity in that taking the values which are multiples of c, and dividing them by c, gives the inverse sequence A026178. c*m is located here at A026178(c*m) and conversely m in A026178 is located at a(m). These locations are related by an identity 4*A026178(c*m) = 3*c*a(m) - (c if m==1 (mod 3)) since c*m is even so goes to the big or small cases in A026178 according to LNZ, the same as here. The cases here and there differ by factor 3/4. So values c*m here are in the same order as all values m in A026178.

%C For c even and LNZ(c)=2, so c = (6j+2)*3^k = 2*A026225, taking the values which are multiples of c, and dividing them by c, gives A026214. A026214 is defined as the multiples of 2 divided by 2, i.e., c=2, and other c of this form are the same. The locations of c*m and 2*m here are A026178(c*m) = (c/2)*A026178(2*m) since c*m has the same effect as 2*m on the big or small cases in A026178, and so values c*m here are in the same order as values 2*m.

%C For c odd and LNZ(c)=2, so c = (6j+5)*3^k, taking the values which are multiples of c, and dividing them by c, gives A026215. (Multiples of 5 divided by 5 this way had been the definition of A026220.) Using the formulas in their respective inverses, the location of c*m here and m in A026215 are related by A026178(c*m) = c*A026214(m) - (ceiling(c/2) if m odd). This is since LNZ(c)=2 in c*m flips the sense of the LNZ test in A026178 so it corresponds to A026214. Then ceiling(c/2) < c so values c*m here are in the same order as all values of A026215.

%C (End)

%H Andrew Howroyd, <a href="/A026177/b026177.txt">Table of n, a(n) for n = 1..10000</a>

%H F. M. Dekking, <a href="https://arxiv.org/abs/2001.08915">Permutations of N generated by left-right filling algorithms</a>, arXiv:2001.08915 [math.CO], 2020.

%F From _Kevin Ryde_, Feb 06 2020: (Start)

%F a(n) = ceiling(2n/3) if A060236(n)=1, otherwise a(n) = 2n, where A060236(n) is the lowest non-0 ternary digit of n.

%F a(n) = ceiling(2n / 3^A137893(n)).

%F a(3n) = 3*a(n) - (1 if n==1 (mod 3)).

%F (End)

%t Array[If[Mod[#/3^IntegerExponent[#, 3], 3] == 1, Ceiling[2 #/3], 2 #] &, 61] (* _Michael De Vlieger_, Feb 08 2020 *)

%o (PARI) seq(n)={my(a=vector(n)); a[1]=1; for(i=2, 2*n, my(h=i\2); if(i%2==0&&!a[i-h], a[i-h]=i, if(i+h<=n, a[i+h]=i))); a} \\ _Andrew Howroyd_, Oct 15 2019

%o (PARI) a(n) = if((n/3^valuation(n,3))%3==1, ceil(2*n/3), 2*n); \\ _Kevin Ryde_, Feb 06 2020

%Y Cf. A026178 (inverse), A026179 (indices of new highs), A026180 (values of new highs), A026136, A026142.

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Edited by _N. J. A. Sloane_, Feb 05 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 12:27 EDT 2024. Contains 371912 sequences. (Running on oeis4.)