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.
%I A132971 #26 Nov 16 2019 02:59:32 %S A132971 1,-1,-1,0,-1,1,0,0,-1,1,1,0,0,0,0,0,-1,1,1,0,1,-1,0,0,0,0,0,0,0,0,0, %T A132971 0,-1,1,1,0,1,-1,0,0,1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, %U A132971 0,-1,1,1,0,1,-1,0,0,1,-1,-1,0,0,0,0,0,1,-1 %N A132971 a(2*n) = a(n), a(4*n+1) = -a(n), a(4*n+3) = 0, with a(0) = 1. %C A132971 If binary(n) has adjacent 1 bits then a(n) = 0 else a(n) = (-1)^A000120(n). %C A132971 Fibbinary numbers (A003714) gives the numbers n for which a(n) = A106400(n). - _Antti Karttunen_, May 30 2017 %H A132971 Antti Karttunen, <a href="/A132971/b132971.txt">Table of n, a(n) for n = 0..10922</a> %H A132971 Paul Tarau, <a href="https://doi.org/10.1007/978-3-642-23283-1_15">Emulating Primality with Multiset Representations of Natural Numbers</a>, in Theoretical Aspects of Computing, ICTAC 2011, Lecture Notes in Computer Science, 2011, Volume 6916/2011, 218-238, DOI: 10.1007/978-3-642-23283-1_15. %H A132971 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A132971 A024490(n) = number of solutions to 2^n <= k < 2^(n+1) and a(k) = 1. %F A132971 A005252(n) = number of solutions to 2^n <= k < 2^(n+1) and a(k) = -1. %F A132971 A027935(n-1) = number of solutions to 2^n <= k < 2^(n+1) and a(k) = 0. %F A132971 G.f. A(x) satisfies A(x) = A(x^2) - x * A(x^4). %F A132971 G.f. B(x) of A000621 satisfies B(x) = x * A(x^2) / A(x). %F A132971 a(n) = A008683(A005940(1+n)). [Analogous to Moebius mu] - _Antti Karttunen_, May 30 2017 %e A132971 G.f. = 1 - x - x^2 - x^4 + x^5 - x^8 + x^9 + x^10 - x^16 + x^17 + x^18 + ... %t A132971 m = 100; A[_] = 1; %t A132971 Do[A[x_] = A[x^2] - x A[x^4] + O[x]^m // Normal, {m}]; %t A132971 CoefficientList[A[x], x] (* _Jean-François Alcover_, Nov 16 2019 *) %o A132971 (PARI) {a(n) = if( n<1, n==0, if( n%2, if( n%4 > 1, 0, -a((n-1)/4) ), a(n/2) ) )}; %o A132971 (PARI) {a(n) = my(A, m); if( n<0, 0, m = 1; A = 1 + O(x); while( m<=n, m *= 2; A = subst(A, x, x^2) - x * subst(A, x, x^4) ); polcoeff(A, n)) }; %o A132971 (Scheme) (define (A132971 n) (cond ((zero? n) 1) ((even? n) (A132971 (/ n 2))) ((= 1 (modulo n 4)) (- (A132971 (/ (- n 1) 4)))) (else 0))) ;; _Antti Karttunen_, May 30 2017 %o A132971 (Python) %o A132971 from sympy import mobius, prime, log %o A132971 import math %o A132971 def A(n): return n - 2**int(math.floor(log(n, 2))) %o A132971 def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n)) %o A132971 def a(n): return mobius(b(n)) # _Indranil Ghosh_, May 30 2017 %Y A132971 Cf. A000120, A000621, A003714, A005252, A005940, A008683, A024490, A027935, A106400. %Y A132971 Cf. A085357 (gives the absolute values: -1 -> 1), A286576 (when reduced modulo 3: -1 -> 2). %K A132971 sign %O A132971 0,1 %A A132971 _Michael Somos_, Sep 17 2007, Sep 19 2007