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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

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

Table of n, a(n) for n=2..90.

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

Cf. A086763, A000265.

Sequence in context: A022950 A293343 A131626 * A296305 A076045 A101618

Adjacent sequences:  A086759 A086760 A086761 * A086763 A086764 A086765

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 23 19:45 EST 2020. Contains 331175 sequences. (Running on oeis4.)