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.

A288036 Numbers x such that the trajectory of x under the map x -> A090086(x) does not enter the cycle {14, 15}.

Original entry on oeis.org

38, 39, 40, 220, 248, 508, 623, 662, 688, 723, 740, 742, 875, 898, 922, 950, 1078, 1103, 1130, 1179, 1208, 1262, 1312, 1390, 1598, 1600, 1635, 1652, 1678, 1780, 1787, 2027, 2198, 2319, 2378, 2380, 2495, 2547, 2560, 2588, 2770, 2775, 2900, 2950, 2963, 3003
Offset: 1

Views

Author

Felix Fröhlich, Jun 04 2017

Keywords

Examples

			The trajectory of 220 enters the cycle {38, 39} after one step, so 220 is a term of the sequence.
		

Crossrefs

Cf. A090086.

Programs

  • Mathematica
    Select[Range@ 3000, Function[k, ! MemberQ[NestWhileList[Function[n, Block[{j = 1}, While[GCD[n, j] > 1 || PrimeQ@ j || PowerMod[n, j - 1, j] != 1,i = j++]; j]], k, # != 15 &, 1, 100], 15]]] (* Michael De Vlieger, Jun 06 2017, after Robert G. Wilson v at A090086 *)
  • PARI
    a090086(n) = forcomposite(c=1, , if(Mod(n, c)^(c-1)==1, return(c)))
    trajectory(n, terms) = my(v=[n]); while(#v < terms, v=concat(v, a090086(v[#v]))); v
    is(n) = my(len=2, t=trajectory(n, len), k=#t); while(1, k--; if(t[k]==t[#t], if(t[#t]!=14 && t[#t]!=15, return(1), return(0))); if(k==1, len++; t=trajectory(n, len); k=#t))