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!)
A145341 Convert 2n-1 to binary. Reverse its digits. Convert back to decimal to get a(n). 4
1, 3, 5, 7, 9, 13, 11, 15, 17, 25, 21, 29, 19, 27, 23, 31, 33, 49, 41, 57, 37, 53, 45, 61, 35, 51, 43, 59, 39, 55, 47, 63, 65, 97, 81, 113, 73, 105, 89, 121, 69, 101, 85, 117, 77, 109, 93, 125, 67, 99, 83, 115, 75, 107, 91, 123, 71, 103, 87, 119, 79, 111, 95, 127, 129, 193 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This sequence is a permutation of the odd positive integers.
From Yosu Yurramendi, Feb 05 2019: (Start)
If the terms (n > 0) are written as an array (left-aligned fashion) with rows of length 2^m, m = 0,1,2,3,...
1,
3, 5,
7, 9, 13, 11,
15, 17, 25, 21, 29, 19, 27, 23,
31, 33, 49, 41, 57, 37, 53, 45, 61, 35, 51, 43, 59, 39, 55, 47,
63, 65, 97, 81, 113, 73, 105, 89, 121, 69, 101, 85, 117, 77, 109, 93, 125, ...
for m > 0, a(2^(m+1)) = 2*a(2^m) + 1; a(2^m + 1) = a(2^m) + 2; a(2^(m+1) + 2^m) = 2*a(2^(m+1)) - 1,
for m > 0, 0 < k < 2^m, a(2^(m+1) + k) = 2*a(2^m + k) - 1, a(2^(m+1) + 2^m + k) = a(2^(m+1) + k) + 2.
This relationship is enough to reproduce the sequence.
If the terms (n > 0) are written as an array (right-aligned fashion):
1,
3, 5,
7, 9, 13, 11,
15, 17, 25, 21, 29, 19, 27, 23,
31, 33, 49, 41, 57, 37, 53, 45, 61, 35, 51, 43, 59, 39, 55, 47,
... 93, 125, 67, 99, 83, 115, 75, 107, 91, 123, 71, 103, 87, 119, 79, 111, 95,
...
for m >= 0, a(2^(m+1)+2^m) = 4*a(2^m) + 1.
for m >= 0, 0 <= k < 2^m-1, a(2^(m+2)-1-k) = 2*a(2^(m+1)-1-k) + 1.
(End)
LINKS
FORMULA
a(n) = A030101(2n-1).
a(n) = A145342(n)*2 - 1.
MATHEMATICA
Table[FromDigits[Reverse[IntegerDigits[2*n - 1, 2]], 2], {n, 1, 100}] (* Stefan Steinerberger, Oct 11 2008 *)
PROG
(R)
nmax <- 10^3 # by choice
a <- vector()
for (o in seq(1, nmax, 2)){
w <- which(as.numeric(intToBits(o))==1)
a <- c(a, sum(2^(max(w)-w)))
}
a[1:66]
# Yosu Yurramendi, Feb 04 2019
(PARI) a(n) = fromdigits(Vecrev(binary(2*n-1)), 2); \\ Michel Marcus, Feb 04 2019
CROSSREFS
Sequence in context: A362133 A100432 A261033 * A121388 A161700 A245212
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Oct 08 2008
EXTENSIONS
More terms from R. J. Mathar, Ray Chandler and Stefan Steinerberger, Oct 10 2008
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 April 25 12:15 EDT 2024. Contains 371969 sequences. (Running on oeis4.)