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!)
A126597 Triangle read by rows: Start with the row 1,2. To get the next row, do the following: if the sum of two adjacent terms is odd then insert this sum in between them, otherwise insert the absolute value of their difference; repeat the procedure. 0
1, 2, 1, 3, 2, 1, 2, 3, 5, 2, 1, 3, 2, 5, 3, 2, 5, 7, 2, 1, 2, 3, 5, 2, 7, 5, 2, 3, 5, 2, 7, 5, 2, 7, 9, 2, 1, 3, 2, 5, 3, 2, 5, 7, 2, 9, 7, 2, 5, 7, 2, 5, 3, 2, 5, 7, 2, 9, 7, 2, 5, 7, 2, 9, 7, 2, 9, 11, 2, 1, 2, 3, 5, 2, 7, 5, 2, 3, 5, 2, 7, 5, 2, 7, 9, 2, 11, 9, 2, 7, 9, 2, 7, 5, 2, 7, 9, 2, 7, 5, 2, 3, 5, 2, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
{s(i),s(i+1)} => {s(i),s(i)+s(i+1), s(i+1)}, if s(i)+s(i+1) is odd, otherwise {s(i),s(i+1)} => {s(i), abs(s(i)-s(i+1)), s(i+1)}.
EXAMPLE
Triangle begins:
1,2
1,3,2
1,2,3,5,2
1,3,2,5,3,2,5,7,2
1,2,3,5,2,7,5,2,3,5,2,7,5,2,7,9,2
1,3,2,5,3,2,5,7,2,9,7,2,5,7,2,5,3,2,5,7,2,9,7,2,5,7,2,9,7,2,9,11,2
MATHEMATICA
s={1, 2}; Do[t=s; ti=1; Do[If[OddQ[su=s[[i]]+s[[i+1]]], t=Insert[t, su, i+ti], t=Insert[t, Abs[s[[i]]-s[[i+1]]], i+ti]]; ti++, {i, Length[s]-1}]; Print[t]; s=t, {8}]
CROSSREFS
Sequence in context: A285731 A114905 A200651 * A261867 A076081 A304089
KEYWORD
nonn,tabf
AUTHOR
Zak Seidov, Mar 13 2007
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 16 16:13 EDT 2024. Contains 371749 sequences. (Running on oeis4.)