

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 15yearold 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

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


EXAMPLE

a(1) = 14. a(2) = 14/2 = 7. a(3) = 72 = 5. a(4) = 52 = 3. a(5) = 32 = 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

Cf. A254868, A005132.
Sequence in context: A033334 A161914 A162774 * A004479 A135638 A040185
Adjacent sequences: A254870 A254871 A254872 * A254874 A254875 A254876


KEYWORD

easy,hear,nonn,fini,full


AUTHOR

Gordon Hamilton, Feb 09 2015


STATUS

approved



