login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A130172 Let f(i) = prime( f(i - 1) (modulo 10^n) ) with f(0) = 1; a(n) is the term where the period of the sequence f(i) begins to repeat. 0

%I #11 Oct 02 2019 20:47:48

%S 2,4,2,62,221,301,1062,860,21189,35835,116119,317168,3000313

%N Let f(i) = prime( f(i - 1) (modulo 10^n) ) with f(0) = 1; a(n) is the term where the period of the sequence f(i) begins to repeat.

%e For a(1), the sequence is 1, 2, 3, 5, 11, 2, 3, 5, 11, 2, 3,

%e 5, 11, ... The sequence has period {2, 3, 5, 11} so a(1) = 2.

%e For a(2) see the A112279: 1, 2, 3, 5, 11, 31, 127, 103, 5,

%e 11, 31, 127, 103, 5, 11, ..., . This sequence has a cyclic length of 5,

%e the terms {5, 11, 31, 127, 103} and the first term 5 first appears at

%e the fourth term.

%t f[n_] := Block[{k = 1, a}, a[0] = 1; a[i_] := a[i] = Prime[Mod[a[i - 1], 10^n]]; While[t = Table[a[i], {i, 0, k - 1}]; MemberQ[t, a[k]] == False, k++ ]; Flatten[ Position[t, a[k]]][[1]]]; Array[ f, 8]

%Y Cf. A128867.

%K nonn,more

%O 1,1

%A _Robert G. Wilson v_, May 13 2007

%E a(9)-a(11) from _Chai Wah Wu_, Sep 26 2019

%E a(12)-a(13) from _Chai Wah Wu_, Oct 02 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 04:04 EDT 2024. Contains 371782 sequences. (Running on oeis4.)