login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Parity of the n-th squarefree triangular number.
1

%I #16 Oct 09 2017 02:13:26

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

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

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

%N Parity of the n-th squarefree triangular number.

%C The sequence giving the parity of all triangular numbers is periodic with period 4 after the initial 0, A000217(n) mod 2 = A021913(n+1).

%H Robert Israel, <a href="/A281114/b281114.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A061304(n) mod 2.

%e The eighth squarefree triangular number is 66, which is even, so a(8) = 0.

%p map(t -> `if`(t-1 mod 4 <= 1, 1, 0), select(t -> numtheory:-issqrfree(t*(t+1)/2),[$1..1000])); # _Robert Israel_, Oct 09 2017

%t Boole@ OddQ@ # & /@ Select[PolygonalNumber@ Range@ 210, SquareFreeQ] (* _Michael De Vlieger_, Oct 06 2017 *)

%Y Cf. A000217, A061304, A021913.

%K nonn

%O 1

%A _Rick L. Shepherd_, Jan 14 2017