cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A307165 #33 Aug 18 2019 17:55:15
%S A307165 0,1,4,16,22,340
%N 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.
%C A307165 Zeros of A307087.
%C A307165 The next term, if it exists, is bigger than 1.5*10^7.
%C A307165 Abmod sequences are defined as follows: see A307087.
%C A307165 Abmod(x,y,0) = x;
%C A307165 Abmod(x,y,1) = y;
%C A307165 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).
%C A307165 a(7) > 10^9 if it exists. - _Bert Dobbelaere_, Aug 18 2019
%e A307165 Abmod(4,4) is [4,4,7,4,4,7,4,4,7,...].
%t A307165 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 *)
%Y A307165 Cf. A307087.
%K A307165 nonn,more,hard
%O A307165 1,3
%A A307165 _Alex Costea_, Mar 27 2019