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!)
A254873 Recamán [divide, -, +, *]-sequence with seed 14 and step 2. 1
14, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12, 24, 22, 11, 9, 18, 16, 32, 30, 15, 13, 26, 28, 56, 54, 27, 25, 23, 21, 19, 17, 34, 36, 38, 40, 20 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Starting at the seed number (14) the sequence continues by dividing, subtracting, adding or multiplying by the step number (2). Division gets precedence over subtraction which gets precedence over addition which gets precedence over multiplication. The new number must be a positive integer and not previously listed. The sequence terminates if this is impossible.
Less chaotic sequences are obtained if division is not included (see for example A254868).
These sequences were first explored by Brian Kehrig, a 15-year-old student at Renert School, Calgary, Canada.
They are exceptionally good sequences to introduce to the elementary school math classroom.
Like many Recamán sequences, this is worth listening to.
LINKS
EXAMPLE
a(1) = 14. a(2) = 14/2 = 7. a(3) = 7-2 = 5. a(4) = 5-2 = 3. a(5) = 3-2 = 1. a(6) = 1*2 = 2. a(7) = 2+2 = 4. a(8) = 4+2 = 6.
MATHEMATICA
f[lst_List] := Block[{k = lst[[-1]]}, If[ Mod[k, 2] == 0 && !MemberQ[lst, k/2], k /= 2, If[k > 2 && !MemberQ[lst, k - 2], k -= 2, If[ !MemberQ[lst, k + 2], k += 2, k *= 2]]]; Append[lst, k]]; lst = {14}; Nest[f, lst, 70] (* Robert G. Wilson v, Feb 20 2015 *)
CROSSREFS
Sequence in context: A033334 A161914 A162774 * A004479 A135638 A040185
KEYWORD
easy,hear,nonn,fini,full
AUTHOR
Gordon Hamilton, Feb 09 2015
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 April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)