login
Concatenation of S[1], S[2], S[3], ..., where S[k] = 0 followed by m 1's, where m = (v+1)^2, v = exponent of highest power of 2 dividing k.
23

%I #20 Nov 02 2018 16:00:40

%S 0,1,0,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,0,1,0,1,1,1,1,1,

%T 1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,

%U 1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1

%N Concatenation of S[1], S[2], S[3], ..., where S[k] = 0 followed by m 1's, where m = (v+1)^2, v = exponent of highest power of 2 dividing k.

%C A word that is morphic and recurrent, but neither pure morphic, uniform morphic, primitive morphic, nor uniformly recurrent.

%H Jack W Grahl, <a href="/A316343/b316343.txt">Table of n, a(n) for n = 0..999</a>

%H Jean-Paul Allouche, Julien Cassaigne, Jeffrey Shallit, Luca Q. Zamboni, <a href="https://arxiv.org/abs/1711.10807">A Taxonomy of Morphic Sequences</a>, arXiv preprint arXiv:1711.10807 [cs.FL], Nov 29 2017.

%e S[4] = 0,1,1,1,1,1,1,1,1,1.

%t S[k_] := Join[{0}, Table[1, {(IntegerExponent[k, 2] + 1)^2}]];

%t Array[S, 20] // Flatten (* _Jean-François Alcover_, Nov 02 2018 *)

%o (Haskell)

%o a316343_count :: Integer -> Int

%o a316343_count n = fromIntegral ((v + 1) ^ 2) where

%o v

%o | n `mod` 2 == 1 = 0

%o | otherwise = 1 + (n `div` 2)

%o a316343_S :: Integer -> [Integer]

%o a316343_S n = 0 : (replicate (a316343_count n) 1)

%o a316343 :: [Integer]

%o a316343 = concatMap a316343_S [1..]

%o -- _Jack W Grahl_, Jul 23 2018

%Y Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.

%K nonn

%O 0

%A _N. J. A. Sloane_, Jul 14 2018

%E More terms from _Jack W Grahl_, Jul 23 2018