cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A130722 The twice repeated nonnegative integers at even indices, the non-repeated nonnegative integers at odd indices.

This page as a plain text file.
%I A130722 #26 Oct 07 2018 11:19:02
%S A130722 0,0,0,1,1,2,1,3,2,4,2,5,3,6,3,7,4,8,4,9,5,10,5,11,6,12,6,13,7,14,7,
%T A130722 15,8,16,8,17,9,18,9,19,10,20,10,21,11,22,11,23,12,24,12,25,13,26,13,
%U A130722 27,14,28,14,29,15,30,15,31,16,32,16,33,17,34,17,35,18,36,18,37,19,38,19,39
%N A130722 The twice repeated nonnegative integers at even indices, the non-repeated nonnegative integers at odd indices.
%F A130722 a(2*n) = A004526(n) = floor(n/2). a(2*n+1) = A001477(n) = n.
%F A130722 O.g.f.: (x^2+x+1)*x^3/((x-1)^2*(1+x)^2*(1+x^2)). - _R. J. Mathar_, Jul 07 2008
%F A130722 a(n) = A005044(n+2) - A005044(n-7). - _Johannes W. Meijer_, Oct 08 2013
%F A130722 a(n) = Sum_{i=1..floor(n/2)} sign((n-2i) mod 4). - _Wesley Ivan Hurt_, Apr 10 2018
%F A130722 a(n) = A106466(n-3) for n>=3. - _Georg Fischer_, Oct 07 2018
%p A130722 a := n -> A005044(n+2) - A005044(n-7): A005044 := n -> floor((1/48)*(n^2 + 3*n + 21 + (-1)^(n-1)*3*n)): seq(a(n), n=0..79); # _Johannes W. Meijer_, Oct 08 2013
%t A130722 Table[Sum[Sign[Mod[n - 2 i, 4]], {i, Floor[n/2]}], {n, 0, 100}] (* _Wesley Ivan Hurt_, Apr 10 2018 *)
%o A130722 (PARI) a(n) = if(n%2, n\2, n\4); \\ _Altug Alkan_, Apr 16 2018
%Y A130722 Cf. A001477, A004526, A005044.
%K A130722 nonn,easy
%O A130722 0,6
%A A130722 _Paul Curtz_, Aug 16 2007
%E A130722 Edited by _R. J. Mathar_, Jul 07 2008