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!)
A086762 A piecewise recurrence relation with a(2)=7 and for n>=2: if a(n) is prime, not 31, a(n+1) = A000265(3*a(n)+1); if a(n) is odd composite, not 1, a(n+1) = A000265(a(n)+1); if a(n) is even, a(n+1) = A000265(a(n)); if a(n) is 1 or 31, find the number S(n) of occurrences of 1 and 31 among a(2),a(3),...,a(n) and compute a(n+1) by the above rules as if a(n) were 2+S(n), unless 2+S(n)=31, in which case a(n+1)=47. 1
7, 11, 17, 13, 5, 1, 5, 1, 1, 1, 3, 5, 1, 11, 17, 13, 5, 1, 1, 5, 1, 5, 1, 17, 13, 5, 1, 3, 5, 1, 5, 1, 7, 11, 17, 13, 5, 1, 1, 1, 13, 5, 1, 9, 5, 1, 29, 11, 17, 13, 5, 1, 5, 1, 11, 17, 13, 5, 1, 11, 17, 13, 5, 1, 35, 9, 5, 1, 3, 5, 1, 13, 5, 1, 13, 5, 1, 7, 11, 17, 13, 5, 1, 7, 11, 17, 13, 5, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
Note that if we treated 31 like the other primes, we would enter the infinite loop 31, 47, 71, 107, 161, 81, 41, 31. Are there any remaining infinite loops?
LINKS
PROG
(PARI) pxp1(m) = { for(x=2, m, n=x; while(n > 1, if(isprime(n), n=n*3+1, if(n%2<>0, n++)); while(n%2==0, n/=2); print1(n", "); if(n==1 || n==31, break); ) ) }
CROSSREFS
Sequence in context: A334456 A293343 A131626 * A296305 A349997 A076045
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Aug 02 2003
EXTENSIONS
Edited by Sam Alexander, Jan 05 2005
STATUS
approved

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 May 10 13:53 EDT 2024. Contains 372387 sequences. (Running on oeis4.)