Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A123402
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
%I A123402
%S A123402 4,2,2,1,2,1,1,3,3,1,1,2,3,2,1,1,3,5,5,3,1,1,2,4,5,4,2,1,1,3,3,9,9,3,3,
%T A123402 1,1,2,3,6,9,6,3,2,1,1,3,5,9,15,15,9,5,3,1,1,2,4,7,12,15,12,7,4,2,1,1,
               3,
%U A123402 3,11,19,27,27,19,11,3,3,1,1,2,3,7,15,23,27,23,15,7,3,2,1,1,3,5,5,11,19
%N A123402 Combining the conditional divide-by-two concept from Collatz sequences 
               with Pascal's triangle, one can construct a new kind of triangle. 
               Start with an initial row of just 4. To compute subsequent rows, 
               start by appending a zero to the beginning and end of the previous 
               row. Like Pascal's triangle, add adjacent terms of the previous row 
               to create each of the subsequent terms. The only change is that each 
               new term is divided by two if it is even.
%H A123402 R. Kelly, <a href="http://www.keldesign.com/math/CollatzPascal.pdf">Collatz-Pascal 
               Triangle</a>
%F A123402 Define a(n, m) for integers m, n: a(0, 0)=4, a(n, m) := 0 for m<0 and 
               n<m, set x(n+1, m) = a(n, m)+a(n, m-1), if ( x(n+1, m) is even ), 
               then a(n+1, m) = x(n+1, m)/2, otherwise a(n+1, m) = x(n+1, m).
%e A123402 For the row starting with (1,2,4,5,8,...) the subsequent row is computed 
               as follows: 0+1->1, 1+2->3, (2+4)/2->3, 4+5->9, 5+8->13...
%t A123402 CollatzPascalTriangle[init_, n_] := Module[{CPT, ROWA, ROWB, a, i, j}, 
               If[ListQ[init], ROWA = init, ROWA = {4}]; CPT = {ROWA}; ROWA = Flatten[{0, 
               ROWA, 0}]; For[i = 1, i < n, i++, ROWB = {0}; For[j = 1, j < Length[ROWA], 
               j++, a = ROWA[[j]] + ROWA[[j + 1]]; a = a/(2 - Mod[a, 2]); ROWB = 
               Append[ROWB, a];]; CPT = Append[CPT, Rest[ROWB]]; ROWA = Append[ROWB, 
               0]]; CPT] Flatten[ CollatzPascalTriangle[{4},20]]
%Y A123402 Cf. A007318, A069202.
%Y A123402 Sequence in context: A136737 A004551 A016511 this_sequence A088570 A102888 
               A071558
%Y A123402 Adjacent sequences: A123399 A123400 A123401 this_sequence A123403 A123404 
               A123405
%K A123402 easy,nonn,tabl
%O A123402 0,1
%A A123402 Reed Kelly (math(AT)keldesign.com), Oct 14 2006

    
page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research