login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A248218 Period in residues modulo n in iteration of x^2 + 1 starting at 0. 13
1, 2, 1, 2, 3, 2, 1, 2, 3, 6, 2, 2, 4, 2, 3, 2, 6, 6, 1, 6, 1, 2, 2, 2, 3, 4, 3, 2, 2, 6, 1, 2, 2, 6, 3, 6, 1, 2, 4, 6, 7, 2, 1, 2, 3, 2, 4, 2, 6, 6, 6, 4, 2, 6, 6, 2, 1, 2, 3, 6, 10, 2, 3, 2, 12, 2, 2, 6, 2, 6, 11, 6, 6, 2, 3, 2, 2, 4, 4, 6, 9, 14, 5, 2, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n) is a period in the sequence A003095 modulo n.

For n <= 10000 is the maximal period a(7921) = 1232.

For n <= 100000 is the maximal period a(73205) = 7260.

For n <= 500000 is the maximal period a(357911) = 54670.

LINKS

Vaclav Kotesovec, Table of n, a(n) for n = 1..100000

EXAMPLE

n=5, residues are 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, ... , period is 3, a(5)=3.

n=7, residues are 1, 2, 5, 5, 5, 5, 5, ... , final period is 1, therefore a(7)=1.

n=10, residues are 1, 2, 5, 6, 7, 0, 1, 2, 5, 6, 7, 0, 1, 2, ... , a(10)=6.

n=43, residues are 1, 2, 5, 26, 32, 36, 7, 7, 7, 7, ... , a(43) = 1.

n=229, residues are 1, 2, 5, 26, 219, 101, 126, 76, 52, 186, 18, 96, 57, 44, 105, 34, 12, 145, 187, 162, 139, 86, 69, 182, 149, 218, 122, 0, 1, 2, 5, 26, 219, 101, 126, 76, 52, 186, 18, 96, 57, 44, 105, 34, 12, 145, 187, 162, 139, 86, 69, 182, 149, 218, 122, 0, 1, 2, 5, 26, ... , period is 28, a(229)=28.

This program is for experiments (n<100): Rest[NestList[Mod[#^2+1, n] &, 0, 100]]

MATHEMATICA

Table[m=Rest[NestList[Mod[#^2+1, n]&, 0, 1000]]; period=0; j=1; While[j<=Length[m] && period==0, If[m[[Length[m]-j]]==m[[Length[m]]], period=j]; j++]; period, {n, 1, 1000}]

PROG

(PARI) A248218(m, t=0, u=[t])=until(#Set(u=concat(u, t=(t^2+1)%m))<#u, ); for(i=1, #u, t==u[#u-i]&&return(i)) \\ M. F. Hasler, Mar 25 2015

CROSSREFS

Cf. A248219, A256342 - A256349, A003095, A247981, A001175.

Sequence in context: A008342 A277214 A278603 * A182110 A175328 A198325

Adjacent sequences:  A248215 A248216 A248217 * A248219 A248220 A248221

KEYWORD

nonn

AUTHOR

Vaclav Kotesovec, Oct 04 2014

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 July 20 14:23 EDT 2019. Contains 325185 sequences. (Running on oeis4.)