A153013 Starting with input 0, find the binary value of the input. Then interpret resulting string of 1's and 0's as prime-based numbers, as follows: 0's are separators, uninterrupted strings of 1's are interpreted from right to left as exponents of the prime numbers. Output is returned as input for the next number in sequence.
0, 1, 2, 3, 4, 5, 6, 9, 10, 15, 16, 11, 12, 25, 50, 147, 220, 6125, 1968750, 89142864525, 84252896510182189218, 34892570216750728458698250328871491829901861750593684043
Offset: 0
Keywords
Examples
101 is interpreted as 3^1 * 2^1 = 6. 1110011 is interpreted as 5^3 * 2^2 = 500.
Links
- Yang Haoran, Table of n, a(n) for n = 0..23
Crossrefs
Programs
-
Mathematica
NestList[Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, #] &@ Flatten@ MapIndexed[If[Total@ #1 == 0, ConstantArray[0, Boole[First@ #2 == 1] + Length@ #1 - 1], Length@ #1] &, Reverse@ Split@ IntegerDigits[#, 2]] &, 0, 21] (* Michael De Vlieger, Oct 17 2016 *)
-
PARI
step(n)=my(t=1,v); forprime(p=2,, v=valuation(n+1,2); t*=p^v; n>>=v+1; if(!n, return(t))) t=0; concat(0,vector(20,n, t=step(t))) \\ Charles R Greathouse IV, Sep 01 2015
-
Scheme
;; With memoization-macro definec. (definec (A153013 n) (if (zero? n) n (A005940 (+ 1 (A153013 (- n 1)))))) ;; Antti Karttunen, Oct 15 2016
Formula
Extensions
a(20)-a(22) from Yang Haoran, Aug 31 2015
Comments