1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 7, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1
Offset: 1
A036563
a(n) = 2^n - 3.
Original entry on oeis.org
-2, -1, 1, 5, 13, 29, 61, 125, 253, 509, 1021, 2045, 4093, 8189, 16381, 32765, 65533, 131069, 262141, 524285, 1048573, 2097149, 4194301, 8388605, 16777213, 33554429, 67108861, 134217725, 268435453, 536870909, 1073741821, 2147483645
Offset: 0
a(2) = 1;
a(3) = 2 + 1 + 2 = 5;
a(4) = 4 + 2 + 1 + 2 + 4 = 13;
a(5) = 8 + 4 + 2 + 1 + 2 + 4 + 8 = 29; etc. - _Philippe Deléham_, Feb 24 2014
- Vincenzo Librandi, Table of n, a(n) for n = 0..500
- Paul Barry, Conjectures and results on some generalized Rueppel sequences, arXiv:2107.00442 [math.CO], 2021.
- Yael Berstein and Shmuel Onn, The Graver complexity of integer programming, Annals of Combinatorics, Vol. 13, No. 3 (2009), pp. 289-296; arXiv preprint, arXiv:0709.1500 [math.CO], 2007.
- L' Education Mathématique, Problème 8907, 49e Annee, No 14, 15 Avril 1947, p. 113
- Irving Kaplansky and John Riordan, The problem of the rooks and its applications, in Combinatorics, Duke Mathematical Journal, 13.2 (1946): 259-268. [Annotated scanned copy]
- Irving Kaplansky and John Riordan, The problem of the rooks and its applications, Duke Mathematical Journal 13.2 (1946): 259-268. Sequence is on page 267.
- Index entries for linear recurrences with constant coefficients, signature (3,-2).
-
List([0..40], n-> 2^n -3); # G. C. Greubel, Nov 18 2019
-
[2^n-3: n in [0..40]]; // Vincenzo Librandi, May 09 2011
-
A036563:=n->2^n-3; seq(A036563(n), n=0..40); # Wesley Ivan Hurt, Jun 26 2014
-
Table[2^n - 3, {n, 0, 40}] (* Wesley Ivan Hurt, Jun 26 2014 *)
LinearRecurrence[{3,-2},{-2,-1},40] (* Harvey P. Dale, Sep 26 2018 *)
-
a(n)= 2^n-3 \\ Charles R Greathouse IV, Dec 22 2011
-
def A036563(n): return (1<Chai Wah Wu, Sep 27 2024
-
[gaussian_binomial(n,1,2)-2 for n in range(0,40)] # Zerinvary Lajos, May 31 2009
A182187
a(n) is the least m >= n such that the Hamming distance D(n,m) = 2.
Original entry on oeis.org
3, 2, 4, 5, 7, 6, 10, 11, 11, 10, 12, 13, 15, 14, 22, 23, 19, 18, 20, 21, 23, 22, 26, 27, 27, 26, 28, 29, 31, 30, 46, 47, 35, 34, 36, 37, 39, 38, 42, 43, 43, 42, 44, 45, 47, 46, 54, 55, 51, 50, 52, 53, 55, 54, 58, 59, 59, 58, 60, 61, 63, 62, 94, 95, 67, 66, 68
Offset: 0
Cf.
A209544 (primes which are not terms),
A209554 (and also not n<+>3).
-
HD:= (i, j)-> add(h, h=Bits[Split](Bits[Xor](i, j))):
a:= proc(n) local c;
for c from n do if HD(n, c)=2 then return c fi od
end:
seq(a(n), n=0..100); # Alois P. Heinz, Apr 17 2012
-
t={}; Do[i=n+1; While[Count[IntegerDigits[BitXor[n,i],2],1]!=2,i++]; AppendTo[t,i],{n,0,66}]; t (* Jayanta Basu, May 26 2013 *)
-
a(n) = bitxor(n, 3<>1+1,2)); \\ Kevin Ryde, Jul 09 2021
-
def a(n):
m = n + 1
while bin(n^m).count('1') != 2: m += 1
return m
print([a(n) for n in range(67)]) # Michael S. Branicky, Mar 02 2021
-
def A182187(n):
S = n.bits(); T = S; c = n; L = len(S)
while true:
H = sum(a != b for a, b in zip(S, T))
if H == 2: return c
c += 1; T = c.bits()
if len(T) > L: L += 1; S.append(0)
[A182187(n) for n in (0..66)] # Peter Luschny, May 26 2013
Comments