|
|
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).
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
It seems that a(2*k) = 2^k*7, a(4*k - 1) = 2^(k - 1)*19, a(4*k + 1) = 2^(k - 1)*37, k >= 1.
|
|
LINKS
|
|
|
FORMULA
|
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)
|
|
EXAMPLE
|
|
|
PROG
|
(Magma) fb:=func<n|(Multiplicity(Intseq(n, 2), 1)) eq 3>; 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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|