login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079051 Recamán variation: a(0) = 0; for n >= 1, a(n) = a(n-1) - f(n) if that number is positive and not already in the sequence, otherwise a(n) = a(n-1) + f(n), where f(n) = floor(sqrt(n)) (A000196). 7
0, 1, 2, 3, 5, 7, 9, 11, 13, 10, 13, 16, 19, 22, 25, 28, 24, 20, 24, 28, 32, 36, 40, 44, 48, 43, 38, 33, 38, 43, 48, 53, 58, 63, 68, 73, 67, 61, 55, 49, 55, 61, 67, 73, 79, 85, 91, 97, 103, 96, 89, 82, 75, 82, 89, 96, 103, 110, 117, 124, 131, 138, 145, 152, 144, 136, 128, 120 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

REFERENCES

N. J. A. Sloane and Allan Wilks, On sequences of Recaman type, paper in preparation, 2006.

LINKS

Ivan Neretin, Table of n, a(n) for n = 0..10000

Nick Hobson, Python program for this sequence

FORMULA

Conjecture: for n>100, 1/2 < a(n)/(n*log(n)) < 1.

The conjecture is false. In fact, a(n) = n^(3/2)/6 + O(n). - N. J. A. Sloane, Apr 29 2006

MATHEMATICA

Fold[Append[#1, If[MemberQ[#1, (a = #1[[-1]]) - (r = Floor@Sqrt@#2)], a + r, a - r]] &, {0, 1}, Range[2, 70]] (* Ivan Neretin, Apr 22 2018 *)

PROG

(PARI) lista(nn) = {va = vector(nn+1); last = 0; for (n=1, nn, new = last - sqrtint(n); if ((new <= 0) || vecsearch(vecsort(va, , 8), new), new = last + sqrtint(n)); va[n+1] = new; last = new; ); va; } \\ Michel Marcus, Apr 23 2018

CROSSREFS

Cf. A000196, A005132. Numbers missed are in A117247.

Cf. A117248, A117516, A117518.

Sequence in context: A186290 A061979 A050748 * A226047 A066935 A042943

Adjacent sequences:  A079048 A079049 A079050 * A079052 A079053 A079054

KEYWORD

nonn

AUTHOR

Benoit Cloitre, Feb 02 2003

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 20 08:16 EST 2018. Contains 317385 sequences. (Running on oeis4.)