login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A349410 Length of cycle reached when iterating the mapping x-> n*A000005(x) on 1. 3
1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 5, 1, 2, 4, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 4, 1, 2, 1, 2, 1, 2, 3, 3, 2, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 4, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(A000040(n)) = 1.
EXAMPLE
For n = 9, 1 --> 9 --> 27 --> 36 --> 81 --> 45 --> 54 --> 72 --> 108 --> 108. The cycle reached has just one term: 108. Therefore, a(9) = 1.
MATHEMATICA
a[n_] := Module[{s = NestWhileList[n * DivisorSigma[0, #] &, 1, UnsameQ, All]}, Differences[Position[s, s[[-1]]]][[1, 1]]]; Array[a, 100] (* Amiram Eldar, Nov 17 2021 *)
PROG
(Python)
from sympy import divisor_count
terms = []
for n in range(1, 101):
s, t = [1], True
while t:
for i in range(2, len(s)):
if s[-i] == s[-1]:
t = False
terms.append(i - 1)
break
s.append(n*divisor_count(s[-1]))
print(terms) # Gleb Ivanov, Nov 17 2021
(PARI) f(n, x) = n*numdiv(x);
find(nm, v) = {forstep (n=#v-1, 1, -1, if (v[#v] == v[n], return(#v-n); ); ); }
a(n) = {my(list = List(), found=0, m=n); listput(list, m); while (! found, my(nm = f(n, m)); listput(list, nm); found = find(nm, list); m = nm; ); found; } \\ Michel Marcus, Nov 17 2021
CROSSREFS
Sequence in context: A338411 A366779 A326775 * A317240 A348444 A326620
KEYWORD
nonn
AUTHOR
Tejo Vrush, Nov 16 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 14:54 EDT 2024. Contains 371960 sequences. (Running on oeis4.)