login

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”).

A138019
Period 5: repeat [1, 1, 0, -1, -1].
3
1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1
OFFSET
0,1
FORMULA
Inverse binomial transform of A138003.
O.g.f.: (1+x)(x^2+x+1)/(1+x+x^2+x^3+x^4). - R. J. Mathar, Jun 28 2008
Euler transform of length 5 sequence [ 1, -1, -1, 0, 1]. - Michael Somos, Jun 17 2015
G.f.: (1 - x^2 ) * (1 - x^3) / ((1 - x) * (1 - x^5)). - Michael Somos, Jun 17 2015
a(n) = -a(-1-n) = a(n+5) for all n in Z. - Michael Somos, Jun 17 2015
EXAMPLE
G.f. = 1 + x - x^3 - x^4 + x^5 + x^6 - x^8 - x^9 + x^10 + x^11 - x^13 + ...
MAPLE
A138019 := proc(n)
op( 1+modp(n, 5), [1, 1, 0, -1, -1]) ;
end proc:
seq(A138019(n), n=0..30) ; # R. J. Mathar, Feb 12 2021
MATHEMATICA
a[ n_] := Sign[2 - Mod[n, 5]]; (* Michael Somos, Jun 17 2015 *)
PadRight[{}, 120, {1, 1, 0, -1, -1}] (* Harvey P. Dale, Oct 06 2023 *)
PROG
(PARI) a(n)=sign(2-n%5) /* Jaume Oliver Lafont, Aug 28 2009 */
CROSSREFS
Sequence in context: A305387 A085241 A105368 * A179850 A267919 A097343
KEYWORD
easy,sign
AUTHOR
Paul Curtz, May 01 2008
STATUS
approved