Ruud H.G. van Tol on Sat, 26 Nov 2022 09:03:57 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: logint performance
- From: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Date: Sat, 26 Nov 2022 09:02:59 +0100
- Delivery-date: Sat, 26 Nov 2022 09:03:57 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=isolution.nl; s=soverin; t=1669449773; bh=SQwA6SeyiPIutFhC5+TYcO58tnHcuw/tKvrHsa5yd/s=; h=Date:To:From:Subject:From; b=gma9DhiQhEGuC1VoWigLflHgRtQslnRyeduYelRaLA/4uMbimUENJoD7Op3UAIK0d dHRUoqCzqUZRD/VvYeiCt3ydF0j5clqrjUcLQlFFNGbvDna8vOW4v5OB4lLJbovbWw zZnDZkn5hHm8Rhq49wXi/h6A7FErv54KLO6ksMgd2Mxoz8iL01qni8U1kniQaOuCwX 8Dc8/cSbMnOftNibfecYbZ0Cttfnrim/APafg8eD8DC/yooFAFylkneB7QkyNYFHAH vYmQX8z/S2IX6D/XvfSJZycPWbuXbmnmFJjChUtaeR/uIZgRqu599ClKfZgVQNu0Fa PxnLI4gl+jZeQ==
A071521_1(n)=my(t=1/3); sum(k=0, logint(n, 3), t*=3; logint(n/t, 2)+1)
A071521_2(n)=my(t=1/3); sum(k=0, logint(n, 3), t*=3; logint(n\t, 2)+1)
? A071521_1(10^600)
cpu time = 14 ms, real time = 14 ms.
%1733 = 1254865
? A071521_2(10^600)
cpu time = 3 ms, real time = 3 ms.
%1734 = 1254865
That appears to need some some assertive kind of integer casting.
Is that feasible?
-- Ruud