A248131 Start with a(0) = 1, then a(n) = three times the n-th digit of the sequence.
1, 3, 9, 27, 6, 21, 18, 6, 3, 3, 24, 18, 9, 9, 6, 12, 3, 24, 27, 27, 18, 3, 6, 9, 6, 12, 6, 21, 6, 21, 3, 24, 9, 18, 27, 18, 3, 6, 18, 6, 3, 18, 6, 3, 9, 6, 12, 27, 3, 24, 6, 21, 3, 24, 9, 18, 3, 24, 18, 9, 3, 24, 18, 9, 27, 18, 3, 6, 6, 21, 9, 6, 12, 18, 6, 3, 9, 6, 12, 27
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Programs
-
Haskell
a248131 n = a248131_list !! n a248131_list = 1 : (map (* 3) $ concatMap (map (read . return) . show) a248131_list) -- Reinhard Zumkeller, Oct 02 2014
-
PARI
a(n,s=1,d=[])={for(i=1,n,print1(s",");d=concat(d,if(s,digits(s)));s=3*d[1];d=vecextract(d,"^1"));s}
Comments