A033052
a(1) = 1, a(2n) = 16a(n), a(2n+1) = a(2n)+1.
Original entry on oeis.org
0, 1, 16, 17, 256, 257, 272, 273, 4096, 4097, 4112, 4113, 4352, 4353, 4368, 4369, 65536, 65537, 65552, 65553, 65792, 65793, 65808, 65809, 69632, 69633, 69648, 69649, 69888, 69889, 69904, 69905, 1048576, 1048577, 1048592, 1048593, 1048832
Offset: 0
-
int a_next(int a_n) { return (a_n + 0xeeeeeeef) & 0x11111111; } /* Falk Hüffner, Jan 24 2022 */
-
[n: n in [1..1050000] | Set(IntegerToSequence(n, 16)) subset {0, 1}]; // Vincenzo Librandi, May 04 2012
-
FromDigits[#,16]&/@Tuples[{0,1},5] (* Vincenzo Librandi, Jun 04 2012 *)
-
a(n)=n=Vecrev(binary(n));sum(i=1,#n,n[i]<<(4*i))>>4 \\ Charles R Greathouse IV, Sep 23 2012
-
a(n)=fromdigits(binary(n),16); \\ Alan Michael Gómez Calderón, Mar 23 2025
A104257
Square array T(a,n) read by antidiagonals: replace 2^i with a^i in binary representation of n, where a,n >= 2.
Original entry on oeis.org
2, 3, 3, 4, 4, 4, 5, 5, 9, 5, 6, 6, 16, 10, 6, 7, 7, 25, 17, 12, 7, 8, 8, 36, 26, 20, 13, 8, 9, 9, 49, 37, 30, 21, 27, 9, 10, 10, 64, 50, 42, 31, 64, 28, 10, 11, 11, 81, 65, 56, 43, 125, 65, 30, 11, 12, 12, 100, 82, 72, 57, 216, 126, 68, 31, 12, 13, 13, 121, 101, 90, 73, 343
Offset: 2
Array begins:
2, 3, 4, 5, 6, 7, 8, 9, ...
3, 4, 9, 10, 12, 13, 27, 28, ...
4, 5, 16, 17, 20, 21, 64, 65, ...
5, 6, 25, 26, 30, 31, 125, 126, ...
6, 7, 36, 37, 42, 43, 216, 217, ...
7, 8, 49, 50, 56, 57, 343, 344, ...
8, 9, 64, 65, 72, 73, 512, 513, ...
9, 10, 81, 82, 90, 91, 729, 730, ...
...
Rows include (essentially)
A005836,
A000695,
A033042,
A033043,
A033044,
A033045,
A033046,
A033047,
A033048,
A033049,
A033050,
A033051,
A033052.
-
T[, 0] = 0; T[2, n] := n; T[a_, 2] := a;
T[a_, n_] := T[a, n] = If[EvenQ[n], a T[a, n/2], a T[a, (n-1)/2]+1];
Table[T[a-n+2, n], {a, 2, 13}, {n, 2, a}] // Flatten (* Jean-François Alcover, Feb 09 2021 *)
-
T(a, n) = fromdigits(binary(n), a); \\ Michel Marcus, Aug 19 2022
-
def T(a, n): return n if n < 2 else (max(a, n) if min(a, n) == 2 else a*T(a, n//2) + n%2)
print([T(a-n+2, n) for a in range(2, 14) for n in range(2, a+1)]) # Michael S. Branicky, Aug 02 2022
A063012
Sum of distinct powers of 20; i.e., numbers with digits in {0,1} base 20; i.e., write n in base 2 and read as if written in base 20.
Original entry on oeis.org
0, 1, 20, 21, 400, 401, 420, 421, 8000, 8001, 8020, 8021, 8400, 8401, 8420, 8421, 160000, 160001, 160020, 160021, 160400, 160401, 160420, 160421, 168000, 168001, 168020, 168021, 168400, 168401, 168420, 168421, 3200000, 3200001, 3200020, 3200021, 3200400, 3200401
Offset: 0
a(5) = 401 since 5 written in base 2 is 101 so a(5) = 1*20^2 + 0*20^1 + 1*20^0 = 400 + 0 + 1 = 401.
A001477,
A005836,
A000695,
A033042,
A033043,
A033044,
A033045,
A033046,
A007088,
A033047,
A033048,
A033049,
A033050,
A033051,
A033052 are similar sequences for 2-16.
A063013 is similar in a different way.
-
a:= proc(n) `if`(n<2, n, irem(n, 2, 'r')+20*a(r)) end:
seq(a(n), n=0..37); # Alois P. Heinz, Apr 04 2025
-
Table[FromDigits[IntegerDigits[n,2],20],{n,0,40}] (* Harvey P. Dale, Jul 21 2014 *)
-
baseE(x, b)= { local(d, e, f); e=0; f=1; while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); return(e) }
baseI(x, b)= { local(d, e, f); e=0; f=1; while (x>0, d=x-10*(x\10); x\=10; e+=d*f; f*=b); return(e) }
{ for (n=0, 1000, write("b063012.txt", n, " ", baseI(baseE(n, 2), 20)) ) } \\ Harry J. Smith, Aug 15 2009
-
def A063012(n): return int(bin(n)[2:],20) # Chai Wah Wu, Apr 04 2025
A097261
Numbers whose set of base 15 digits is {0,E}, where E base 15 = 14 base 10.
Original entry on oeis.org
0, 14, 210, 224, 3150, 3164, 3360, 3374, 47250, 47264, 47460, 47474, 50400, 50414, 50610, 50624, 708750, 708764, 708960, 708974, 711900, 711914, 712110, 712124, 756000, 756014, 756210, 756224, 759150, 759164, 759360, 759374, 10631250
Offset: 0
-
[n: n in [0..4500000] | Set(IntegerToSequence(n, 15)) subset {0, 14}]; // Vincenzo Librandi, Jun 05 2012
-
f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 14}, 15]; Array[f, 33, 0] (* or *)
FromDigits[#, 15] & /@ Tuples[{0, 14}, 6] (* Harvey P. Dale, Sep 22 2011 *) (* or much slower *)
fQ[n_] := Union@ Join[{0, 14}, IntegerDigits[n, 15]] == {0, 14}; Select[ Range[0, 10634414 ], fQ] (* Robert G. Wilson v, May 12 2012 *)
Showing 1-4 of 4 results.
Comments