The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A353312 Size of the finite cycle eventually reached by iterating A353313, or -1 if no finite cycle is ever reached. 4
1, 4, 103, 4, 4, 103, 103, 3, 103, 4, 103, 3, 4, 103, 3, 103, 6, 103, 103, 103, 3, 3, 103, 3, 103, 3, 103, 4, 3, 6, 103, 103, 103, 3, 103, 3, 4, 3, 103, 103, 3, 3, 3, 3, 3, 103, 3, 103, 6, 3, 6, 103, 6, 103, 103, 103, 6, 103, 3, 103, 3, 103, 3, 3, 3, 103, 103, 103, 6, 3, 3, 3, 103, 103, 3, 3, 3, 103, 103, 3, 103 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = A353311(n) - A353310(n).
EXAMPLE
Starting from n=2 and iterating A353313, we obtain the following 104 terms [2, 5, 10, 19, 34, 59, 100, 169, 284, 475, 794, 1325, 2210, 3685, 6144, 2048, 3415, 5694, 1898, 3165, 1055, 1760, 2935, 4894, 8159, 13600, 22669, 37784, 62975, 104960, 174935, 291560, 485935, 809894, 1349825, 2249710, 3749519, 6249200, 10415335, 17358894, 5786298, 1928766, 642922, 1071539, 1785900, 595300, 992169, 330723, 110241, 36747, 12249, 4083, 1361, 2270, 3785, 6310, 10519, 17534, 29225, 48710, 81185, 135310, 225519, 75173, 125290, 208819, 348034, 580059, 193353, 64451, 107420, 179035, 298394, 497325, 165775, 276294, 92098, 153499, 255834, 85278, 28426, 47379, 15793, 26324, 43875, 14625, 4875, 1625, 2710, 4519, 7534, 12559, 20934, 6978, 2326, 3879, 1293, 431, 720, 240, 80, 135, 45, 15] before the iteration returns to 5 again, in other words, forming a finite cycle of length 103, therefore a(2) = 103.
PROG
(PARI)
A353313(n) = { my(r=(n%3)); if(!r, n/3, ((5*((n-r)/3)) + r + 3)); };
A353312(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(j-mapget(visited, n)), mapput(visited, n, j)); n = A353313(n)); };
CROSSREFS
Sequence in context: A211047 A326087 A091330 * A024056 A353311 A300976
KEYWORD
nonn
AUTHOR
_Antti Karttunen_, Apr 13 2022
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 June 9 02:17 EDT 2024. Contains 373227 sequences. (Running on oeis4.)