[seqfan] Re: Numbers that are the sum of x nonzero y-th powers

David Corneth davidacorneth at gmail.com
Thu Aug 13 12:57:16 CEST 2020


Thanks, I'll try those code samples. I'd prefer the sprintf over strprintf
for backwards compatibility though I wouldn't change a thing at all and
just keep 'Strprintf'. I used a comparison function to order the sequences
but just typing 2 is much easier, thanks.
 I have no more edits for A003332 but I thought I leave it in editing as I
didn't start editing there and I don't have the last edit. But then again
maybe my 'the editing is done' is a bit fast, it's that I have no more
edits. But I thought there was some global editing perhaps?

On Thu, Aug 13, 2020 at 12:38 PM M. F. Hasler <oeis at hasler.fr> wrote:

> 3On Thu, Aug 13, 2020 at 10:21 AM David Corneth <davidacorneth at gmail.com>
> wrote:
>
>> As far as I can see the editing of these sequences is done. Thanks for
>> the help!
>>
>
> I just got a message
>
> *OEIS Server*: This sequence has not been edited or commented on for a week yet is not proposed for review. If it is ready for review, please visit https://oeis.org/draft/A003332 and click the button that reads "These changes are ready for review by an OEIS Editor." Thanks. - The OEIS Server
>
> And that draft still has the lengthy (20+ lines) partially "buggy" list of
> crossrefs (and idem for the "adjacent" sequences).
> Now that we have an index page I think we could replace this list by s
> shorter "navigational aid"
> (e.g., "Ax .. Ay (analog for k=2..12); Az..Aw (analog for m=2..12)" plus a
> link to the index page, do others agree ?)
>
> Also, I wonder whether it's useful to replace the earlier 1K b-file by a
> 10K b-file when all integers > 471 are in the sequence.
>
>
>> Thanks for the code above Maximilian! I didn't know things like printf
>> work here.
>>
>
> Yes, printf() has been there for quite some time and is a good choice, I
> think.
>
> Very unfortunately, it has been decided very recently that Strprintf() is
> scheduled to be removed in favour of strprintf().
> I think that's a very regrettable choice. (If it were up to me, I'd have
> chosen the well known name "sprintf()" as alias for the already established
> Strprintf(), preserving backward compatibility at least until sprintf would
> have replaced Strprintf in common use...)
>
>
>> It must be me but I tried using
>> fmt(r)=strprintf("%s A%06d (%d, %d)",
>> if(r[1]>404,",","Cf."),r[1],r[2],r[3])
>> ref=concat([ fmr(r)  | r <- v ])
>>
>
> Oops! in the second line, "fmt" is misspelled as "fmr"! (now
> corrected above.)
>
> What should r be? Like the list I put?
>>
>
> The syntax "... | r <- v "  means " for r in v ", i.e., r runs over all
> elements of the vector v.
> The vector v should be your list of  (  [n,k,m]  )  as given in your post
> from  Aug 4, 2020 at 5:13 AM:
>
> v = [ [404, 2, 2], [3325, 2, 3] /*,...: see your post from Aug 4 */ ]
> fmt(r)=Strprintf("%s A%06d (%d, %d)",
> if(r[1]>404,",","Cf."),r[1],r[2],r[3])
> ref=concat([ fmt(r)  | r <- v ])  /* fmt(r), not fmr ! */
>
> NB: In the above I put the older "Strprintf" (instead of "strprintf" as
> suggested in the latest version).
>
>
>> I tried changing fmr to fmt but that didn't help.
>>
>
> It should have worked, then.... I suspect that the problem ("*not a
> function in function call*"?) is due to strprintf instead of Strprintf.
> Sorry for that. If the change is so recent that it's only in the latest
> development version, maybe I can convince the PARI/GP developers to keep
> Strprintf and introduce sprintf as an alias...
>
> PS: the list can be sorted by k or m using "v=vecsort(v,2)"  (to sort by
> 2nd component, 3 for 3rd component).
>
> Best wishes,
> Maximilian
>



More information about the SeqFan mailing list