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.

A259042 Period 8 sequence [0, 1, 1, 1, 2, 1, 1, 1, ...].

This page as a plain text file.
%I A259042 #29 Dec 12 2023 07:46:46
%S A259042 0,1,1,1,2,1,1,1,0,1,1,1,2,1,1,1,0,1,1,1,2,1,1,1,0,1,1,1,2,1,1,1,0,1,
%T A259042 1,1,2,1,1,1,0,1,1,1,2,1,1,1,0,1,1,1,2,1,1,1,0,1,1,1,2,1,1,1,0,1,1,1,
%U A259042 2,1,1,1,0,1,1,1,2,1,1,1,0,1,1,1,2,1,1,1,0,1,1,1,2,1,1,1,0,1,1,1,2,1,1,1,0,1
%N A259042 Period 8 sequence [0, 1, 1, 1, 2, 1, 1, 1, ...].
%H A259042 Antti Karttunen, <a href="/A259042/b259042.txt">Table of n, a(n) for n = 0..65537</a>
%H A259042 Michael Somos, <a href="http://grail.eecs.csuohio.edu/~somos/rfmc.html">Rational Function Multiplicative Coefficients</a>
%H A259042 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,-1,1).
%F A259042 Euler transform of length 8 sequence [1, 0, 1, -1, 0, -1, 0, 1].
%F A259042 Moebius transform is length 8 sequence [1, 0, 0, 1, 0, 0, 0, -2].
%F A259042 a(n) is multiplicative with a(2) = 1, a(4) = 2, a(2^e) = 0 if e > 2, a(p^e) = 1 if p > 2.
%F A259042 G.f.: x * (1 + x^3)/((1-x)*(1 + x^4)).
%F A259042 G.f.: x * (1 - x^4)*(1 - x^6)/((1-x)*(1 - x^3)*(1 - x^8)).
%F A259042 G.f.: 1/(1-x) - 1/(1 + x^4).
%F A259042 a(n) = a(-n) = a(n+8) for all n in Z.
%F A259042 a(2*n + 1) = a(4*n + 2) = 1.  a(8*n) = 0. a(8*n + 4) = 2.
%F A259042 a(n) = A257179(n+4) unless n = -4.
%F A259042 Dirichlet g.f.: zeta(s) * (1 + 4^(-s) - 2 * 8^(-s)). - _Álvar Ibeas_, Mar 18 2021
%e A259042 G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + x^7 + x^9 + x^10 + x^11 + ...
%t A259042 a[ n_] := {1, 1, 1, 2, 1, 1, 1, 0}[[Mod[n, 8, 1]]];
%t A259042 a[ n_] := SeriesCoefficient[ 1 / (1 - x) - 1 / (1 + x^4), {x, 0, Abs@n}];
%o A259042 (PARI) {a(n) = 1 + (n%4 == 0) - 2*(n%8 == 0)};
%o A259042 (PARI) {a(n) = [ 0, 1, 1, 1, 2, 1, 1, 1][n%8 + 1]};
%o A259042 (PARI) {a(n) = polcoeff( 1 / (1 - x) - 1 / (1 + x^4) + x * O(x^abs(n)), abs(n))};
%Y A259042 Cf. A010877, A257179.
%K A259042 nonn,mult,easy
%O A259042 0,5
%A A259042 _Michael Somos_, Jun 17 2015
%E A259042 More terms from _Antti Karttunen_, Jul 29 2018