|
|
A307165
|
|
Numbers k such that the sequence f(0)=f(1)=k, f(x)=(a*b) mod (a+b+1), where a=f(x-1) and b=f(x-2) is a cycle.
|
|
0
|
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
The next term, if it exists, is bigger than 1.5*10^7.
Abmod sequences are defined as follows: see A307087.
Abmod(x,y,0) = x;
Abmod(x,y,1) = y;
Abmod(x,y,n) = (a*b) mod (a+b+1), where a and b are the 2 previous terms: Abmod(x,y,n-2) and Abmod(x,y,n-1).
|
|
LINKS
|
|
|
EXAMPLE
|
Abmod(4,4) is [4,4,7,4,4,7,4,4,7,...].
|
|
MATHEMATICA
|
cyclePos[s_] := Module[{sp = SequencePosition[s[[1 ;; -3]], s[[-2 ;; -1]]]}, If[Length[sp] == 0, 0, sp[[1, 1]]]]; a[n_] := Module[{f, g}, g[a_, b_] := Mod[a*b, a + b + 1]; f[0] = f[1] = n; f[k_] := f[k] = g[f[k - 1], f[k - 2]]; s = {}; m = 0; While[Length[s] < 4 || cyclePos[s] == 0, AppendTo[s, f[m]]; m++]; cyclePos[s] - 1]; seq = {}; Do[If[a[j] == 0, AppendTo[seq, j]], {j, 0, 340}]; seq (* Amiram Eldar, Jul 06 2019 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more,hard
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|