[go: up one dir, main page]

login
Characteristic function of quarter squares, cf. A002620.
14

%I #15 Oct 08 2021 07:42:17

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

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

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

%N Characteristic function of quarter squares, cf. A002620.

%H Reinhard Zumkeller, <a href="/A240025/b240025.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F a(n) = Max_{A005369(n), A010052(n)}.

%F a(A002620(n)) = 1; a(A049068(n)) = 0.

%F a(n) = A010052(n) + A005369(n), for n>0. - _Ridouane Oudra_, Jun 08 2020

%t Join[{1}, Table[Floor[Sqrt[4n+1]], {n, 0, 100}] // Differences] (* _Jean-François Alcover_, Oct 06 2021 *)

%o (Haskell)

%o a240025 n = max (a005369 n) (a010052 n)

%Y Cf. A000267 (partial sums), A002620, A005369, A010052, A049068.

%K nonn

%O 0

%A _Reinhard Zumkeller_, Jul 05 2014