#Python, 90 bytes (SAFE)
Python, 90 bytes (SAFE)
Kinda long, but I enjoyed putting this together.
Code:
??(((())))+++++++,1111111111111111111111:;;<<<<======>>>>>[[]]ehiilnnnnnnnnnnpppprrrsstttw
The ?
s represent two newlines.
Output:
6167185029251277541387741632208161040852042602130139041952976
Output is followed by a newline. Works in Python 2 or 3.
Solution:
n=11111+1111+111+1;p=str() while n>1111:n=[(n<<1)+n+1,n>>1][n>>1<<1==n];p+=str(n) print(p)
Calculates several iterations of the 3n+1 function starting at 12334 and continuing until the value dips below 1111, concatenating the results together. For obfuscation, uses only 1's and bitwise operators to calculate the function (which would more straightforwardly ben/2 if n%2==0 else 3*n+1
).