[seqfan] Re: A168237 startup and offset

M. F. Hasler oeis at hasler.fr
Wed Feb 3 21:43:44 CET 2021


There are already many sequences of the form
R(f,g) = repeat f(n) g(n) times, for n=0,1,2,3...
with constant g or identity g or g(n) = 2^n (and also g(0)=infinity).
(Search for "name:repeat".)

Yes, it could certainly be useful to compile a systematic index of all
these sequences (maybe less useful to add more of them, unless there's a
real motivation to do so for one or the other).

But what one may call "clever" (formula) is rather subjective, so that part
isn't really a specific criterion:
The (-1)^n to get every other value decreased/increased w.r.t the mean
growth is frequently used on OEIS. For the purpose at hand (repeat each
value twice) one could as well use, e.g., a(n) = f(floor(n/2)).
I do understand why one may consider ±m*(-1)^n nicer or clever but it's
really only a matter of taste, factually speaking it is 100% equivalent to
the use of floor because
(-1)^n = 2 floor(n/2)-n+1
 = 1 – 2(n % 2)
 = 1 – 2(n & 1) ,
where % and & are the mod and bitwise AND operation.

I think many (esp. computers) would consider the last expression(s) the
simplest of all these and (-1)^n could arguably be considered as the most
complicated of all these — just to say that these notions are rather (if
not totally) subjective.

Similar considerations will apply for other choices of "g", e.g. g=3 or
g(n)=n, where the standard indexing sequences A2262=(0, 0,1, 0,1,2,
0,1,2,3, ...) and oeis.org/A25581=(0, 1,0, 2,1,0, 3,2,1,0, ...),
also used to convert 2D sequences (aka square arrays) to 1D ones and
conversely,
will be useful.

- Maximilian

On Wed, 3 Feb 2021, 06:33 Ali Sada via SeqFan, <seqfan at list.seqfan.eu>
wrote:

>  Would it be useful to define sequences like A168237 using a function
> R(f1(m),f2(m)) where f1(m) is repeated f2(m) times? Both f1(m) and f2(m)
> can be a constant or a polynomial. f1(m) can even be a sequence itself.
> For example,  the new version of A168237 would become R(3m,2), starting at
> m = 0.
> A(002024) would become R(m,m), starting at m = 1.
>
> We can continue with finding the partial sum of R(f1(m),f2(m)) or by
> applying basic arithmetic operations between different R's. It could be
> really interesting to find clever formulas to represent such combinations.
>
> Best,
> Ali
>
>     On Tuesday, February 2, 2021, 11:15:28 PM EST, Allan Wechsler <
> acwacw at gmail.com> wrote:
>
>  Glad to update the b-file; I will try to do that tonight. Somebody still
> needs to edit the programs, though.
>
> On Tue, Feb 2, 2021, 12:23 PM Neil Sloane <njasloane at gmail.com> wrote:
>
> > Allan, excellent suggestion. I added a(0)=0. Can you upload a new b-file?
> > Best regards
> > Neil
> >
> > Neil J. A. Sloane, President, OEIS Foundation.
> > 11 South Adelaide Avenue, Highland Park, NJ 08904, USA.
> > Also Visiting Scientist, Math. Dept., Rutgers University, Piscataway, NJ.
> > Phone: 732 828 6098; home page: http://NeilSloane.com
> > Email: njasloane at gmail.com
> >
> >
> >
> > On Tue, Feb 2, 2021 at 12:32 AM Allan Wechsler <acwacw at gmail.com> wrote:
> >
> > > A168237 is the sequence 0,3,3,6,6,9,9,...
> > >
> > > Its offset is 1.
> > >
> > > It has a clever formula as definition, which boils down the multiples
> of
> > 3
> > > repeated, except for 0 which is only stated once.
> > >
> > > Can anybody think of a good reason *not* to enhance it by adding A(0) =
> > 0,
> > > and changing the offset to 0? The clever formula still works, and I
> think
> > > all the comments are still true. (I am slightly unsure of the E.g.f.)
> The
> > > programs would have to be altered slightly, by somebody who knows
> > > Mathematica and Magma, but surely the modification would be trivial.
> > >
> > > All old searches would still match. And I think the resulting sequence
> > > would be strictly simpler than what's there now. So that's why I'm
> asking
> > > if I'm missing something.
> > >
> > > --
> > > Seqfan Mailing list - http://list.seqfan.eu/
> > >
> >
> > --
> > Seqfan Mailing list - http://list.seqfan.eu/
> >
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list