Code for OEIS A342101 Middle Deletes

OEIS sequence A342101 by Matthew Malone is based on successively replicating a vector with the middle term deleted, and then A343453 counts the excess of 3s over 2s in the sequence

A342101 = 1,2,3, 1,3, 1,2,1,3, ...
A343453 = 0,-1,0, 0,1, 1,0,0,1, ...

The PARI/GP code here is a mixture of code and description leading up to isolated terms of each by bit-twiddling, the record highs in the latter, and briefly touching on r satisfying r + count10(r) = n-2. is free software (free as in freedom), published under the terms of the GNU General Public License (v3 or higher). Download version June 2021,

The sig file is a Gnu PG ascii armoured signature generated from my key.

Maybe more ideas to come. Might become an upload in the sequences eventually (either instead or as well as here).

See also my bits of A334820 for a related replication and code.

This page Copyright 2021 Kevin Ryde.

(Back to the sitemap.)