A340162 a(1) = 7; thereafter a(n) is the smallest number k with exactly three 1-bits, not already in the sequence, for which k*a(n - 1) has exactly three 1-bits (A014311).
7, 14, 19, 28, 37, 56, 38, 112, 74, 224, 76, 448, 148, 896, 152, 1792, 296, 3584, 304, 7168, 592, 14336, 608, 28672, 1184, 57344, 1216, 114688, 2368, 229376, 2432, 458752, 4736, 917504, 4864, 1835008, 9472, 3670016, 9728, 7340032, 18944, 14680064, 19456, 29360128
Offset: 1
Examples
a(1) * a(2) = 7 * 14 = A014311(1) * A014311(4) = A014311(32). a(2) * a(3) = 14 * 19 = A014311(4) * A014311(5) = A014311(61). a(3) * a(4) = 19 * 28 = A014311(5) * A014311(10) = A014311(93).
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..1000
Programs
-
Magma
fb:=func
; a:=[7]; for n in [2..44] do k:=7; while k in a or (not fb(k) or not fb(a[n-1]*k)) do k:=k+1; end while; Append(~a,k); end for; a; -
PARI
isokd(n) = hammingweight(n) == 3; \\ A014311 nexth(n) = my(u=bitand(n, -n), v=u+n); (bitxor(v, n)/u)>>2+v; \\ A057168 nextk(va, n) = {my(ok = 0, k = 7); while (! (isokd(k*va[n-1]) && !#select(x->(x==k), va)), k = nexth(k)); k;} lista(nn) = {my(va = vector(nn)); va[1] = 7; for (n=2, nn, my(k = nextk(va, n)); va[n] = k;); va; } \\ Michel Marcus, Jan 14 2021
Formula
Conjectures from Chai Wah Wu, Jan 27 2021: (Start)
a(n) = 2*a(n-2) + 2*a(n-4) - 4*a(n-6) for n > 7.
G.f.: x*(-46*x^6 - 28*x^5 - 15*x^4 + 5*x^2 + 14*x + 7)/((2*x^2 - 1)*(2*x^4 - 1)). (End)
Comments