login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A160357 Sign of first differences of Recamán's sequence A005132. 10
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

T. D. Noe, Table of n, a(n) for n = 0..10000

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

Cf. A005132, A119632.

Sequence in context: A212157 A131554 A153881 * A186039 A332433 A057077

Adjacent sequences:  A160354 A160355 A160356 * A160358 A160359 A160360

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 25 14:40 EST 2021. Contains 341609 sequences. (Running on oeis4.)