hermann on Wed, 09 Jul 2025 22:00:23 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Implementation of functions for "Integer partitions detect the primes" paper
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: Implementation of functions for "Integer partitions detect the primes" paper
- From: hermann@stamm-wilbrandt.de
- Date: Wed, 09 Jul 2025 22:00:15 +0200
- Authentication-results: secure-mailgate.com; auth=pass smtp.auth=93.90.177.40@web103.dogado.net
- Delivery-date: Wed, 09 Jul 2025 22:00:24 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stamm-wilbrandt.de; s=cloudpit; t=1752091215; bh=bUgHF+6/AVt1t0iKNkQewUMMCO9Mnq5MqQDfd/Pwo4s=; h=Date:From:To:Subject:In-Reply-To:References:From; b=UqMkHcoZuRfFVLndRF+EcF6pq0OW4kj+jVBra/Xuo9Ajpucm+473TUmymYWixtT6/ VCuDGSfME/Fd3lBErO5hgH890PCUxnrh2+pI62fS1Z9NJMTvUZpIcXau3+dLWyNsp2 NyszC4kW87oDW8HEomhoPjYqv+QP+0DSFF28TaA8=
- In-reply-to: <aG16_dPMbQ3PewcO@seventeen>
- References: <0e8da5d2c65f10fb56ad0e7e5d20f15f@stamm-wilbrandt.de> <aG16_dPMbQ3PewcO@seventeen>
- User-agent: Roundcube Webmail/1.4.13
On 2025-07-08 22:09, Bill Allombert wrote:
You should do
M1(n)=my(s=0);fordiv(n,d,s+=d);s;
But this function is just sigma(n)
Ok.
?
M2(n)=s=0;for(m=1,n,forpart(v=m,if(v[1]<v[2],for(d=1,n\v[1],r=n-d*v[1];if(r%v[2]==0,s+=d*(r\v[2])))),[1,m],[2,2]));s;
As I understand this function is
(sigma(n,3)-(2*n-1)*sigma(n))/8
which is much faster to compute.
That does not work:
? M1(n)=sigma(n);
? M2(n)=(sigma(n,3)-(2*n-1)*sigma(n))/8;
? T1(n)=(n^2 - 3^n + 2)*M1(n) - 8*M2(n);
? T1(3)
-72
?
Regards,
Hermann.