Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Apr 07 2023 17:15:44
%S 1,8,80,640,6560,52480,524800,4198400,43046720,344373760,3443737600,
%T 27549900800,282386483200,2259091865600,22590918656000,
%U 180727349248000,1853020188851840,14824161510814720,148241615108147200
%N Inverse modulo 2 modulo transform of 9^n.
%C 9^n may be retrieved as 9^n = Sum_{k=0..n} (binomial(n,k) mod 2)*a(k).
%H G. C. Greubel, <a href="/A100472/b100472.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = Sum_{k=0..n} (-1)^A010060(n-k) * (binomial(n, k) mod 2) * 9^k.
%F a(n) = Sum_{k=0..n} A106400(n-k) * (binomial(n, k) mod 2) * 9^k. - _G. C. Greubel_, Apr 06 2023
%t A100472[n_]:= A100472[n]= Sum[(-1)^ThueMorse[n-j]*Mod[Binomial[n, j], 2]*9^j, {j,0,n}];
%t Table[A100472[n], {n,0,30}] (* _G. C. Greubel_, Apr 06 2023 *)
%o (Magma)
%o A106400:= func< n | 1 - 2*(&+Intseq(n, 2) mod(2)) >;
%o A100472:= func< n | (&+[A106400(n-j)*(Binomial(n,j) mod 2)*9^j: j in [0..n]]) >;
%o [A100472(n): n in [0..30]]; // _G. C. Greubel_, Apr 06 2023
%o (SageMath)
%o @CachedFunction
%o def A010060(n): return (bin(n).count('1')%2)
%o def A100472(n): return sum((-1)^A010060(n-k)*(binomial(n, k)%2)*9^k for k in range(n+1))
%o [A100472(n) for n in range(31)] # _G. C. Greubel_, Apr 06 2023
%Y Cf. A001019, A010060, A047999, A106400.
%K easy,nonn
%O 0,2
%A _Paul Barry_, Dec 06 2004