mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > sweety439

Reply
 
Thread Tools
Old 2022-07-14, 09:28   #1
 
sweety439's Avatar
 
"99(4^34019)99 palind"
Nov 2016
(P^81993)SZ base 36

25·5·23 Posts
Default Try this PARI/GP program for the length of Aliquot sequence!!!

Code:
a(n)=if(n==0 || sigma(n)==2*n,0,a(sigma(n)-n)+1)
enter a(138), it can print 178 (which is the length of Aliquot sequence of 138) in < 1 second.

you can try a(276), but .... Warning!!! Please do not try a(220)

Last fiddled with by sweety439 on 2022-07-14 at 09:32
sweety439 is offline   Reply With Quote
Old 2022-07-18, 16:52   #2
 
sweety439's Avatar
 
"99(4^34019)99 palind"
Nov 2016
(P^81993)SZ base 36

25×5×23 Posts
Default

This PARI/GP program can print terms of https://oeis.org/A115350, and thus we may not write its b-file by hand:

Code:
a(n)=if(isprime(n) || sigma(n)==2*n || n==220 || n==1184 || n==2620 || n==5020 || n==6232 || n==10744 || n==12285 || n==17296 || n==63020 || n==66928 || n==67095 || n==69615 || n==79750 || n==12496 || n==14316, n, if(n>10^70, 0, a(sigma(n)-n)))
(given by terms of https://oeis.org/A002025 and https://oeis.org/A003416, this program is sufficient up to n=10^5)

Last fiddled with by sweety439 on 2022-07-18 at 16:56
sweety439 is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Aliquot sequence reservations schickel Aliquot Sequences 3729 2023-01-02 12:58
Useful aliquot-sequence links 10metreh Aliquot Sequences 4 2021-10-28 22:17
Gaussian Aliquot Sequences? How to run in Pari/GP? Stargate38 Aliquot Sequences 40 2019-11-30 11:14
Porting pari/gp routines into a C program?? EdH Programming 17 2012-10-30 03:41
Another Aliquot Sequence site schickel Aliquot Sequences 67 2012-01-20 17:53

All times are UTC. The time now is 09:51.


Tue Jan 3 09:51:20 UTC 2023 up 138 days, 7:19, 0 users, load averages: 0.79, 0.72, 0.77

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔