

A026177


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


8



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, 18, 19, 58, 20, 21, 64, 66, 23, 70, 24, 25, 76, 26, 27, 82, 84, 29, 88, 90, 31, 94, 32, 33, 100, 102, 35, 106, 108, 37, 112, 38, 39, 118, 120, 41
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS

Andrew Howroyd, Table of n, a(n) for n = 1..10000


PROG

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


CROSSREFS

Cf. A026136, A026216.
Sequence in context: A102629 A082361 A082363 * A026196 A026216 A292411
Adjacent sequences: A026174 A026175 A026176 * A026178 A026179 A026180


KEYWORD

nonn


AUTHOR

Clark Kimberling


STATUS

approved



