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!)
A076125 Define r(k) as follows: r(1)=n, r(k+1) = r(k) +(-1)^k*sign(r(k)-k)*k; then abs(r(k)) = n for at least one k>1 (there could be 2 values for k > 1). Sequence gives the smallest value of k > 1 such that abs(r(k)) = n. 0
2, 4, 9, 8, 8, 25, 12, 12, 29, 16, 16, 37, 20, 20, 61, 24, 24, 57, 28, 28, 65, 32, 32, 129, 36, 36, 85, 40, 40, 93, 44, 44, 129, 48, 48, 113, 52, 52, 121, 56, 56, 165, 60, 60, 141, 64, 64, 149, 68, 68, 265, 72, 72, 169, 76, 76, 177, 80, 80, 233, 84, 84, 197, 88, 88, 205 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

If n=3k+1 or 3k+2, abs(r(x))=n for x=4k+4 and x=8k+1 (first solution only is in the sequence). This was inspired by Recamán's sequence (A005132).

LINKS

Table of n, a(n) for n=1..66.

FORMULA

For k >= 1, a(3k+1) = a(3k+2) = 4k+4;

for m >= 2, k >= 1, a(3^m*k) = 3^(m-2)*28*k+1.

For a(3^m*k+a) it is more complicated to give a general formula, as examples: a(9k+3) = 28k+9; a(9k+6) = 36k+25; a(27k+3) = 84k+9; a(27k+6) = 104k+25; a(27k+9) = 84k+29; a(27k+12) = 84k+37; a(27k+24) = 136k+129.

Sum_{k=1..n} a(k) is asymptotic to n^2.

EXAMPLE

If r(1)=5: r(8)=5, hence a(5)=8.

CROSSREFS

Cf. A005132.

Sequence in context: A141389 A133757 A348059 * A011033 A179219 A033149

Adjacent sequences:  A076122 A076123 A076124 * A076126 A076127 A076128

KEYWORD

nonn

AUTHOR

Benoit Cloitre, Oct 31 2002

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 August 18 21:11 EDT 2022. Contains 356215 sequences. (Running on oeis4.)