A388038
a(n) is the number of steps to reach 1 when the Sisyphus sequence (A350877) begins with n, or -1 if 1 is never reached.
0
0, 1, 5, 2, 979, 6, 8, 3, 13, 980, 6, 7, 209, 9, 980, 4, 8, 14, 9, 981, 10, 7, 14, 8, 980, 210, 7, 10, 20, 981, 210, 5, 14, 9, 981, 15, 13, 10, 9, 982, 210, 11, 10, 8, 806, 15, 11, 9, 9, 981, 15, 211, 980, 8, 981, 11, 11, 21, 8, 982, 16, 211, 21, 6, 981, 15, 211
OFFSET
1,3
COMMENTS
Rules of the Sisyphus sequence (A350877): if the last term, s(m), is even, s(m+1) = s(m)/2; otherwise, s(m+1) = s(m) + the smallest prime not yet added.
Beginning the Sisyphus sequence with the seed 1008973 runs more than 2^30 terms without reaching 1 (A388141). Michael S. Branicky found that A388141(3584971546) = 1. - Michael De Vlieger, Sep 14 2025
LINKS
James C. McMahon, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Scatterplot of first 65536 terms.
Michael De Vlieger, The Sisyphus Sequence, 2022.
EXAMPLE
For n = 1, a(n) = 0, no steps are required to reach 1.
For n = 3, a(n) = 5.
Step 1: 3 is odd, the next term is 3 + 2 (first prime) = 5.
Step 2: 5 is odd, the next term is 5 + 3 (next prime) = 8.
Step 3: 8 is even, the next term is 8/2 = 4.
Step 4: 4 is even, the next term is 4/2 = 2.
Step 5: 2 is even, the next term is 2/2 = 1.
MATHEMATICA
a[n_]:=Module[{s={n}, p=2, c=1}, While[s[[-1]]!=1, If[OddQ[s[[-1]]], AppendTo[s, s[[-1]]+p]; p=NextPrime[p], AppendTo[s, s[[-1]]/2]]; c++]; c-1]; Array[a, 67]
PROG
(Python)
from sympy import nextprime
def sisyphus(start): # generator of Sisyphus sequence beginning at start
an, p = start, 1
while True: yield an; an = an+(p:=nextprime(p)) if an&1 else an>>1
def a(n): return next(k for k, t in enumerate(sisyphus(n)) if t == 1)
print([a(n) for n in range(1, 68)]) # Michael S. Branicky, Sep 16 2025
CROSSREFS
KEYWORD
AUTHOR
James C. McMahon, Sep 13 2025
STATUS
approved
Important Links: https://vincico.com/seq/a350877.html
Scatterplot of terms:
Why do terms cluster near certain values (see horizontal bands in below diagram):
No comments:
Post a Comment