[seqfan] Re: Stacking binary blocks 100, 010, 001, 111

M. F. Hasler seqfan at hasler.fr
Mon Feb 18 13:02:11 CET 2019


Yes, that's obviously:
Numbers having digits {1,2,4 or 7} in base 8.
So yes, it is a subsequence of numbers congruent to these modulo 8.
To get the n-th term you can write n in base 4 and replace digits 0123 by
1247 and read the result in base 8

In PARI/GP :
is(n)=!#setminus(Set(digits(n,8)),[1,2,4,7])
a(n,D=[1,2,4,7],b=8)=fromdigits(apply(d->D[d+1], digits(n,#D)),b)

(This allows to produce the analog for any set of digits D and base b, by
supplying either of these optional additional arguments.)
--
Maximilian


On Mon, Feb 18, 2019, 06:55 Creigh wrote:

> Dear Seqfans,
>
> While ordering a large matrix of "binary blocks" (see below, and
> without going into technical details of why I was actually doing
> that), it appeared I'd stumbled on the sequence A047541 (Numbers that
> are congruent to {1, 2, 4, 7} mod 8) and I was happy to see the
> explicit formula. However, these are not the same- the first deviation
> appears on the 13th term. Any ideas for a formula? I assume proving
> the sequence is a subset of A047541 is straightforward.
>
> Given the 4 binary blocks 100, 010, 001, 111 (or strings) and reading
> backwards ignoring leading zeros, stack (concantenated with "_",
> below) any number of these and order from least to greatest:
>
> 100 <-> 1
> 010 <-> 2
> 001 <-> 4
> 111 <-> 7
> 100_100 <-> 9
> 010_100 <-> 10
> 001_100 <-> 12
> 111_100 <-> 15
> 100_010 <-> 17
> 010_010 <-> 18
> 001_010 <-> 20
> 111_010 <-> 23
> 100_001 <-> 33
> 010_001 <-> 34
> 001_001 <-> 36
> 111_001 <-> 39
> 100_111 <-> 57
> 010_111 <-> 58
> 001_111 <-> 60
> 111_111 <-> 63
> 100_100_100 <-> 73
> 010_100_100 <-> 74
> 001_100_100 <-> 76
> 111_100_100 <-> 79
> 100_010_100 <-> 81
> 010_010_100 <-> 82
> 001_010_100 <-> 84
> 111_010_100 <-> 87
> 100_001_100 <-> 97
> ...
>
> I'll wait for any replies and submit the sequence.
>
> Sincerely,
> Creigh
>
>



More information about the SeqFan mailing list