login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256342 Moduli n for which A248218(n) = 2 (length of the terminating cycle of 0 under x -> x^2+1 modulo n). 9
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

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

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

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.

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

PROG

(PARI) for(i=1, 200, A248218(i)==2&&print1(i", "))

CROSSREFS

Cf. A248218, A248219, A256343 - A256349, A003095, A247981.

Sequence in context: A195873 A337854 A073140 * A171820 A193879 A226722

Adjacent sequences:  A256339 A256340 A256341 * A256343 A256344 A256345

KEYWORD

nonn

AUTHOR

M. F. Hasler, Mar 25 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 12 08:13 EDT 2021. Contains 344943 sequences. (Running on oeis4.)