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.

A257477 Multiplicative with a(2) = 0, a(4) = -1, a(2^e) = 0 if e>2, a(3) = -1, a(3^e) = 0^e if e>1, a(p^e) = 1 if p == 1, 3 (mod 8), a(p^e) = (-1)^e if p == 5, 7 (mod 8).

This page as a plain text file.
%I A257477 #16 Jan 29 2024 01:22:17
%S A257477 1,0,-1,-1,-1,0,-1,0,0,0,1,1,-1,0,1,0,1,0,1,1,1,0,-1,0,1,0,0,1,-1,0,
%T A257477 -1,0,-1,0,1,0,-1,0,1,0,1,0,1,-1,0,0,-1,0,1,0,-1,1,-1,0,-1,0,-1,0,1,
%U A257477 -1,-1,0,0,0,1,0,1,-1,1,0,-1,0,1,0,-1,-1,-1,0,-1
%N A257477 Multiplicative with a(2) = 0, a(4) = -1, a(2^e) = 0 if e>2, a(3) = -1, a(3^e) = 0^e if e>1, a(p^e) = 1 if p == 1, 3 (mod 8), a(p^e) = (-1)^e if p == 5, 7 (mod 8).
%H A257477 G. C. Greubel, <a href="/A257477/b257477.txt">Table of n, a(n) for n = 1..2500</a>
%F A257477 G.f.: f(x) - 2*f(x^3) - f(x^4) + f(x^9) + 2*f(x^12) - f(x^36) where f(x) = (x + x^3) / (1 + x^4) is the g.f. for A188510.
%F A257477 abs(a(2*n + 1)) = A168182(n+5).
%F A257477 a(4*n + 2) = a(8*n) = a(9*n) = 0.
%F A257477 a(n) = -a(-n) = a(n + 288) for all n in Z.
%F A257477 Moebius transform of A257403.
%F A257477 Sum_{k=1..n} abs(a(k)) ~ 5*n/9. - _Amiram Eldar_, Jan 29 2024
%e A257477 G.f. = x - x^3 - x^4 - x^5 - x^7 + x^11 + x^12 - x^13 + x^15 + x^17 + ...
%t A257477 a[ n_] := Sign[n] If[ Abs[n] < 2, 1, Times @@ (Which[ # < 5, -Boole[# + #2 == 4], Mod[#, 8] < 4, 1, True, (-1)^#2] & @@@ FactorInteger[Abs@n])];
%t A257477 f[x_] := (x + x^3)/(1 + x^4); CoefficientList[Series[f[x] - 2*f[x^3] - f[x^4] + f[x^9] + 2*f[x^12] - f[x^36], {x,0,50}], x] (* _G. C. Greubel_, Aug 03 2018 *)
%o A257477 (PARI) {a(n) = my(A, p, e); if( n==0, 0, A = factor(abs(n)); sign(n) * prod( k=1, matsize(A)[1], [p, e] = A[k,]; if( p<5, -(p+e==4), if( p%8 < 4, 1, (-1)^e))))};
%Y A257477 Cf. A168182, A188510, A257403.
%K A257477 sign,mult
%O A257477 1,1
%A A257477 _Michael Somos_, Apr 25 2015
%E A257477 Definition corrected by _Georg Fischer_, Jul 23 2022