|
|
A232014
|
|
Number of iterations of A032445 ("position of n in Pi") until a value is reached for the second time, when starting with n, or -1 if no value is repeated.
|
|
3
|
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Some loops: (5), (271070), (9292071), (40, 71), (2, 7, 14), (296, 1060, 13737, 133453, 646539, 294342, 141273). - Hans Havermann, Jul 26 2014
See Hans Havermann table (in links) for primary unknown-length evolutions. - Hans Havermann, Aug 06 2014
|
|
LINKS
|
|
|
EXAMPLE
|
a(1)=4 since A032445(1)=2 (the first "1" occurs after the initial "3" as second digit in Pi), A032445(2)=7 (the first "2" occurs as 7th digit of Pi's decimal expansion), A032445(7)=14, A032445(14)=2, which "closes the loop" after 4 iterations. (The initial value does not need to be part of the loop.)
|
|
PROG
|
(PARI) A232014(n)={my(u=0); for(i=1, 9e9, u+=1<<n; bittest(u, n=A032445(n))&&return(i))}
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|