login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A160357 Sign of first differences of Recamán's sequence A005132. 11
1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) = sign(A005132(n)-A005132(n-1)) = sign(A160356(n)) = (-1)^A160351(n) = -(-1)^A076213(n-1).
a(n) = (A005132(n)-A005132(n-1))/n. - N. J. A. Sloane, Jul 15 2011
A160357 = chi_A057165 - chi_A057166, where chi_A denotes the characteristic function of (the set of values of) A.
MAPLE
A160357 := proc(n)
sign( A005132(n)-A005132(n-1)) ;
end proc: # R. J. Mathar, Apr 01 2012
MATHEMATICA
f[s_List] := Module[{a = s[[-1]], n = Length[s]}, Append[s, If[a > n && FreeQ[s, a - n], a - n, a + n]]];
Nest[f, {0}, 100] // Differences // Sign (* Jean-François Alcover, Apr 19 2020, using Robert G. Wilson v's code for A005132 *)
CROSSREFS
Sequence in context: A212157 A131554 A153881 * A186039 A332433 A057077
KEYWORD
sign
AUTHOR
M. F. Hasler, Jun 03 2009
EXTENSIONS
a(0)=1 added by N. J. A. Sloane, May 01 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 07:04 EDT 2024. Contains 370953 sequences. (Running on oeis4.)