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!)
A358055 a(n) is the least m such that A358052(m,k) = n for some k. 0
1, 2, 5, 8, 14, 20, 32, 38, 59, 59, 63, 116, 122, 158, 158, 218, 278, 278, 402, 548, 642, 642, 642, 642, 642, 1062, 1062, 1668, 2474, 2690, 2690, 2690, 2690, 2690, 3170, 3170, 3170, 3170, 3170, 3170, 3170, 9260, 9260, 9260, 9788, 9788, 11772, 11942, 11942, 11942, 11942, 11942 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) is the least m such that iteration of the map x -> floor(m/x) + (m mod x), starting at some k in [1,m], produces n distinct values before repeating.
LINKS
EXAMPLE
a(4) = 8 because A358052(8,6) = 4 and this is the first appearance of 4 in A358052.
Thus the map x -> floor(8/x) + (8 mod x) starting at 6 produces 4 distinct values before repeating: 6 -> 3 -> 4 -> 2 -> 4.
MAPLE
f:= proc(n, k) local x, S, count;
S:= {k};
x:= k;
for count from 1 do
x:= iquo(n, x) + irem(n, x);
if member(x, S) then return count fi;
S:= S union {x};
od
end proc:
V:= Vector(50): count:= 0:
for n from 1 while count < 50 do
for k from 1 to n do
v:= f(n, k);
if v <= 50 and V[v] = 0 then
V[v]:= n; count:= count+1;
fi
od od:
convert(V, list);
MATHEMATICA
f[n_, k_] := Module[{x, S, count}, S = {k}; x = k; For[count = 1, True, count++, x = Quotient[n, x] + Mod[n, x]; If[MemberQ[S, x], Return@count]; S = S~Union~{x}]];
V = Table[0, {vmax = 40}]; count = 0;
For[n = 1, count < vmax, n++, For[k = 1, k <= n, k++, v = f[n, k]; If[v <= vmax && V[[v]] == 0, Print[n]; V[[v]] = n; count++]]];
V (* Jean-François Alcover, Mar 12 2024, after Maple code *)
CROSSREFS
Sequence in context: A006918 A274523 A165189 * A011842 A000094 A182377
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Oct 27 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 April 28 03:10 EDT 2024. Contains 372020 sequences. (Running on oeis4.)