login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A254873 Recamán [divide, -, +, *]-sequence with seed 14 and step 2. 1

%I #36 Feb 24 2015 15:37:52

%S 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,

%T 25,23,21,19,17,34,36,38,40,20

%N Recamán [divide, -, +, *]-sequence with seed 14 and step 2.

%C 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.

%C Less chaotic sequences are obtained if division is not included (see for example A254868).

%C These sequences were first explored by Brian Kehrig, a 15-year-old student at Renert School, Calgary, Canada.

%C They are exceptionally good sequences to introduce to the elementary school math classroom.

%C Like many Recamán sequences, this is worth listening to.

%e 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.

%t 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 *)

%Y Cf. A254868, A005132.

%K easy,hear,nonn,fini,full

%O 1,1

%A _Gordon Hamilton_, Feb 09 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 19 05:24 EDT 2024. Contains 376004 sequences. (Running on oeis4.)