login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A318882 Total length of transient and terminal cycle if unitary-proper-divisor-sum function f(x) = A063919(x) is iterated and the initial value is n. Number of distinct terms in iteration list. 5
1, 2, 2, 2, 2, 1, 2, 2, 2, 3, 2, 3, 2, 4, 3, 2, 2, 4, 2, 4, 3, 5, 2, 4, 2, 3, 2, 4, 2, 3, 2, 2, 4, 5, 3, 5, 2, 6, 3, 5, 2, 3, 2, 3, 4, 4, 2, 5, 2, 5, 4, 5, 2, 3, 3, 3, 3, 3, 2, 1, 2, 6, 3, 2, 3, 3, 2, 6, 3, 7, 2, 5, 2, 6, 3, 5, 3, 2, 2, 6, 2, 4, 2, 6, 3, 5, 5, 5, 2, 1, 4, 5, 4, 6, 3, 6, 2, 6, 4, 4, 2, 3, 2, 6, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

This sequence implements the original definition given for A097032.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..87360

FORMULA

a(n) = A097031(n) + A318883(n).

a(n) = A097032(n) + A318880(n) - 1.

EXAMPLE

For n = 1, A063919(1) = 1, that is, we immediately end with a terminal cycle of length 1 without a preceding transient part, thus a(1) = 0+1 = 1.

For n = 2, A063919(2) = 1, and A063919(1) = 1, so we end with a terminal cycle of length 1, after a transient part of length 1, thus a(2) = 1+1 = 2.

For n = 30, A063919(30) = 42, A063919(42) = 54, A063919(54) = 30, thus a(30) = a(42) = a(54) = 0+3 = 3, as 30, 42 and 54 are all contained in their own terminal cycle of length 3, without a preceding transient part.

For n = 1506, the iteration-list is {1506, 1518, 1938, 2382, 2394, 2406, [2418, 2958, 3522, 3534, 4146, 4158, 3906, 3774, 4434, 4446, 3954, 3966, 3978, 3582, 2418, ..., ad infinitum]}. After a transient of length 6 the iteration ends in a cycle of length 14, thus a(1506) = 6+14 = 20.

PROG

(PARI)

A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460

A063919(n) = if(1==n, n, A034460(n));

A318882(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(j-1), mapput(visited, n, j)); n = A063919(n)); };

\\ Or by using lists:

pil(item, lista) = { for(i=1, #lista, if(lista[i]==item, return(i))); (0); };

A318882(n) = { my(visited = List([]), k); for(j=1, oo, if((k = pil(n, visited)) > 0, return(j-1)); listput(visited, n); n = A063919(n)); };

CROSSREFS

Cf. A063919, A097031, A097032, A318883.

Cf. A002827 (the positions of ones after the initial 1).

Sequence in context: A297031 A229895 A063982 * A055020 A052435 A094701

Adjacent sequences:  A318879 A318880 A318881 * A318883 A318884 A318885

KEYWORD

nonn

AUTHOR

Antti Karttunen, Sep 22 2018, after Labos Elemer's A097032

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 26 05:42 EDT 2019. Contains 326329 sequences. (Running on oeis4.)