login
Parity of the iterated triangular numbers, using "2" as a seed.
7

%I #12 Aug 22 2013 02:59:40

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

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

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

%N Parity of the iterated triangular numbers, using "2" as a seed.

%C Suggested by D. R. Hofstadter.

%C a(n) = A007501(n) mod 2.

%H Charles R Greathouse IV, <a href="/A117872/b117872.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = mod(T^(n)(2), 2)

%e a(1) = mod(T(2),2) = mod(3, 2) = 1.

%e a(4) = mod(T(T(T(T(2)))),2) = mod(231,2) = 1.

%o (Haskell)

%o a117872 = flip mod 2 . a007501 -- _Reinhard Zumkeller_, Aug 15 2013

%o (PARI) list(n)=my(t=Mod(2,2*2^n)); concat(0, vector(n,i, t*=t+1; t=Mod(lift(t)/2, t.mod/2); lift(Mod(t,2)))) \\ _Charles R Greathouse IV_, Aug 22 2013

%Y Cf. A007501, A126768

%K easy,nonn

%O 0,1

%A _Greg Huber_, May 13 2006, Feb 16 2007

%E More terms from _Greg Huber_, Feb 16 2007

%E a(38) and on corrected by _Greg Huber_, Aug 21 2013