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.

A106524 Interleave A038573(n+1) and 2*A038573(n+1).

This page as a plain text file.
%I A106524 #15 Sep 08 2022 08:45:18
%S A106524 1,2,1,2,3,6,1,2,3,6,3,6,7,14,1,2,3,6,3,6,7,14,3,6,7,14,7,14,15,30,1,
%T A106524 2,3,6,3,6,7,14,3,6,7,14,7,14,15,30,3,6,7,14,7,14,15,30,7,14,15,30,15,
%U A106524 30,31,62,1,2,3,6,3,6,7,14,3,6,7,14,7,14,15,30,3,6,7,14,7,14,15,30,7,14,15
%N A106524 Interleave A038573(n+1) and 2*A038573(n+1).
%C A106524 Row sums of number the number triangle (A106522 mod 2).
%H A106524 G. C. Greubel, <a href="/A106524/b106524.txt">Table of n, a(n) for n = 0..1000</a>
%F A106524 a(n) = (Sum_{k=0..n+2} binomial(n+2, k)) mod 2 - (3 - (-1)^n)/2.
%F A106524 a(n) = ( (Sum_{k=0..(n/2+1)} binomial(n/2+1, k)) mod 2 - 1 )*(1 + (-1)^n)/2 + ( (Sum_{k=0..(n+1)/2} binomial((n+1)/2, k)) mod 2 - 1)*(1 - (-1)^n)/2.
%F A106524 a(n) = A001316(n+2) - A000034(n).
%t A106524 a[n_]:= (2^DigitCount[Floor[(n+2)/2], 2, 1] - 1)*(3 - (-1)^n)/2;
%t A106524 Table[a[n], {n, 0, 100}] (* _G. C. Greubel_, Aug 11 2021 *)
%o A106524 (Magma)
%o A106524 A106524:= func< n | 2^Multiplicity(Intseq(n+2, 2), 1) - 2^(n mod 2) >;
%o A106524 [A106524(n): n in [0..100]]; // _G. C. Greubel_, Aug 12 2021
%o A106524 (Sage)
%o A106524 def A000120(n): return sum(n.digits(2))
%o A106524 def A106524(n): return 2^A000120(n+2) - 2^(n%2)
%o A106524 [A106524(n) for n in (0..100)] # _G. C. Greubel_, Aug 11 2021
%o A106524 (PARI) a(n) = bitneg(n%2, hammingweight(n+2)); \\ _Kevin Ryde_, Aug 25 2021
%Y A106524 Cf. A000034, A001316, A038573, A106522.
%K A106524 easy,nonn
%O A106524 0,2
%A A106524 _Paul Barry_, May 06 2005