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!)
A284447 Permutation of the positive integers: a(n) = A258996(A092569(n)) = A092569(A258996(n)). 3
1, 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 8, 9, 10, 11, 20, 21, 22, 23, 16, 17, 18, 19, 28, 29, 30, 31, 24, 25, 26, 27, 52, 53, 54, 55, 48, 49, 50, 51, 60, 61, 62, 63, 56, 57, 58, 59, 36, 37, 38, 39, 32, 33, 34, 35, 44, 45, 46, 47, 40, 41, 42, 43 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The permutation is self-inverse. Except for fixed points 1, 2, 3, 4, 5, 6, 7 it consists completely of 2-cycles: (8,12), (9,13), (10,14), (11,15), (16,20), (17,21), (18,22), (19,23), (24,28), (25,29), (26,30), (27,31), (32,52), (33,53), (34,54), (35,55), (36,48), (37,49), (38,50), (39,51), (40,60), ...

{A000027, A258996, A092569, a = A258996(A092569)} form a Klein 4-group.

LINKS

Yosu Yurramendi, Table of n, a(n) for n = 1..32767

PROG

(R)

maxrow <- 8 # by choice

a <- 1:3

for(m in 1:maxrow) for(k in 0:(2^m-1)){

if(m%%2 == 1){a[2^(m+1)+    k] <- a[2^m+k] + 2^m

              a[2^(m+1)+2^m+k] <- a[2^m+k] + 2^(m+1)}

else         {a[2^(m+1)+    k] <- a[2^m+k] + 2^(m+1)

              a[2^(m+1)+2^m+k] <- a[2^m+k] + 2^m}

}

a

# Yosu Yurramendi, Apr 06 2017

(R) # Given n, compute a(n) by taking into account the binary representation of n

maxblock <- 7 # by choice

a <- 1:7

for(n in 8:2^maxblock){

  ones <- which(as.integer(intToBits(n)) == 1)

  nbit <- as.integer(intToBits(n))[1:tail(ones, n = 1)]

  anbit <- nbit

  anbit[seq(3, length(anbit) - 1, 2)] <- 1 - anbit[seq(3, length(anbit) - 1, 2)]

  a <- c(a, sum(anbit*2^(0:(length(anbit) - 1))))

}

a

# Yosu Yurramendi, Mar 30 2021

CROSSREFS

Analogous to A284120. Similar R-programs: A258996, A332769.

Sequence in context: A356253 A222259 A243575 * A032985 A032869 A032342

Adjacent sequences:  A284444 A284445 A284446 * A284448 A284449 A284450

KEYWORD

nonn

AUTHOR

Yosu Yurramendi, Apr 06 2017

STATUS

approved

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 August 19 18:30 EDT 2022. Contains 356229 sequences. (Running on oeis4.)