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.

Showing 1-3 of 3 results.

A256342 Moduli n for which A248218(n) = 2 (length of the terminating cycle of 0 under x -> x^2+1 modulo n).

Original entry on oeis.org

2, 4, 6, 8, 11, 12, 14, 16, 22, 23, 24, 28, 29, 32, 33, 38, 42, 44, 46, 48, 53, 56, 58, 62, 64, 66, 67, 69, 74, 76, 77, 84, 86, 87, 88, 92, 96, 106, 107, 109, 112, 114, 116, 124, 127, 128, 132, 134, 138, 148, 152, 154, 159, 161, 163, 168, 172, 174, 176, 184, 186, 192
Offset: 1

Views

Author

M. F. Hasler, Mar 25 2015

Keywords

Comments

If x is a member and y is a member of this sequence or A248219, then LCM(x,y) is a member. - Robert Israel, Mar 09 2021

Examples

			In Z/mZ with m = 2, the iteration of x -> x^2+1 starting at x = 0 yields (0, 1, 0, ...), and m = 2 is the least positive number for which there is such a cycle of length 2, here [0, 1], therefore a(1) = 2.
For m = 3, the iteration yields (0, 1, 2, 2, ...), i.e., a cycle [2] of length 1, therefore 3 is not in this sequence.
For m = 4, the iterations yield (0, 1, 2, 1, ...), and since there is again a cycle [1, 2] of length 2, a(2)=4.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local x, k, R,p;
      x:= 0; R[0]:= 0;
      for k from 1 do
        x:= x^2+1 mod n;
        if assigned(R[x]) then return evalb(k-R[x] = 2)
        else R[x]:= k
        fi
      od;
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Mar 09 2021
  • Mathematica
    filterQ[n_] := Module[{x, k, R}, x = 0; R[0] = 0; For[k = 1, True, k++, x = Mod[x^2 + 1, n]; If[IntegerQ[R[x]], Return[k - R[x] == 2], R[x] = k]]];
    Select[Range[1000], filterQ] (* Jean-François Alcover, Feb 01 2023, after Robert Israel *)
  • PARI
    for(i=1,200,A248218(i)==2&&print1(i","))

A256349 Moduli n for which A248218(n) = 9.

Original entry on oeis.org

81, 101, 271, 303, 361, 405, 505, 509, 567, 653, 707, 743, 813, 839, 909, 1033, 1083, 1187, 1355, 1447, 1515, 1527, 1539, 1753, 1805, 1897, 1919, 1959, 2025, 2121, 2229, 2381, 2439, 2511, 2517, 2525, 2527, 2545, 2579, 2687, 2727, 2749, 2753, 2777, 2803, 2835
Offset: 1

Views

Author

M. F. Hasler, Mar 25 2015

Keywords

Comments

If x is a member of this sequence, and y is a member of this sequence or A248219 or A256343, then LCM(x,y) is a member of this sequence. - Robert Israel, Mar 09 2021

Examples

			In Z/81Z, the iteration of x -> x^2+1 starting at x = 0 yields (0, 1, 2, 5, 26, 29, 32, 53, 56, 59, 80, 2, ...), and m = 81 is the least positive number for which there is such a cycle of length 9, here [2, 5, 26, 29, 32, 53, 56, 59, 80], therefore a(1) = 81.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local x, k, R,p;
      x:= 0; R[0]:= 0;
      for k from 1 do
        x:= x^2+1 mod n;
        if assigned(R[x]) then return evalb(k-R[x] = 9)
        else R[x]:= k
        fi
      od;
    end proc:
    select(filter, [$1..10000]); # Robert Israel, Mar 09 2021
  • Mathematica
    filterQ[n_] := Module[{x, k, R}, x = 0; R[0] = 0; For[k = 1, True, k++, x = Mod[x^2 + 1, n]; If[IntegerQ[R[x]], Return[k - R[x] == 9], R[x] = k]]];
    Select[Range[10000], filterQ] (* Jean-François Alcover, Feb 01 2023, after Robert Israel *)
  • PARI
    for(i=1,3000,A248218(i)==9&&print1(i","))

A256346 Moduli n for which A248218(n) = 6.

Original entry on oeis.org

10, 17, 18, 20, 30, 34, 36, 40, 49, 50, 51, 54, 55, 60, 68, 70, 72, 73, 80, 85, 90, 98, 99, 100, 102, 108, 110, 115, 118, 119, 120, 126, 136, 140, 144, 145, 146, 147, 150, 153, 160, 165, 170, 180, 187, 190, 194, 196, 198, 199, 200, 204, 207, 210, 211, 216, 219, 220, 230, 236, 238, 240, 245, 250
Offset: 1

Views

Author

M. F. Hasler, Mar 25 2015

Keywords

Comments

If x is a member of this sequence, and y is a member of this sequence or A248219 or A256342 or A256343, then LCM(x,y) is a member of this sequence. - Robert Israel, Mar 09 2021

Crossrefs

Programs

  • Maple
    filter:= proc(n) local x, k, R,p;
      x:= 0; R[0]:= 0;
      for k from 1 do
        x:= x^2+1 mod n;
        if assigned(R[x]) then return evalb(k-R[x] = 6)
        else R[x]:= k
        fi
      od;
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Mar 09 2021
  • PARI
    for(i=1,250,A248218(i)==6&&print1(i","))
Showing 1-3 of 3 results.