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

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A182458 a(0)=1, a(1)=2, a(n) = (a(n-2)*a(n-1)+1) mod n. 4

%I

%S 1,2,1,0,1,1,2,3,7,4,9,4,1,5,6,1,7,8,3,6,19,10,15,13,4,3,13,13,2,27,

%T 25,25,18,22,23,17,32,27,29,4,37,26,39,26,3,34,11,46,27,18,37,4,45,22,

%U 19,34,31,29,30,45,31,54,1,55,56,26,5,64,49,32,29,6

%N a(0)=1, a(1)=2, a(n) = (a(n-2)*a(n-1)+1) mod n.

%C Indices of zeros: 3, 284, 295, 1042, 1478, 36382, 52328, 63463, 1564027, 19758967, 152380267, 503372464, 9766438965, 119068745443, 220054053597, 234739914603, 881852361961, 3491882402381, 3681101616539, 5880347601791, 7363426715439, 10328374852578.

%C Conjecture: a(n) contains infinitely many zeros.

%C a(A182472(n)) = n and a(m) <> n for m < A182472(n). [_Reinhard Zumkeller_, May 01 2012]

%H Reinhard Zumkeller, <a href="/A182458/b182458.txt">Table of n, a(n) for n = 0..10000</a>

%t nxt[{n_,a_,b_}]:={n+1,b,Mod[a b+1,n+1]}; Join[{1},Rest[NestList[nxt,{1,2,2},80][[All,2]]]] (* _Harvey P. Dale_, Feb 14 2019 *)

%o (Python)

%o prpr = 1

%o prev = 2

%o for n in range(2,77):

%o current = ( prev*prpr + 1 ) % n

%o print(prpr, end=',')

%o prpr = prev

%o prev = current

%o a182458 n = a182458_list !! n

%o a182458_list = 1 : 2 : zipWith mod

%o (map (+ 1) \$ zipWith (*) a182458_list (tail a182458_list)) [2..]

%o -- _Reinhard Zumkeller_, May 01 2012

%Y Cf. A182457.

%K nonn,easy

%O 0,2

%A _Alex Ratushnyak_, Apr 30 2012

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.

Last modified December 5 03:59 EST 2021. Contains 349530 sequences. (Running on oeis4.)