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.
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, 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, 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
Offset: 0
Examples
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...
Links
- Reed Kelly, Collatz-Pascal Triangle
- Reed Kelly, Collatz-Pascal Triangle, Oct 12 2006 [Local copy]
Programs
-
Mathematica
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]]
Formula
Define a(n, m) for integers m, n: a(0, 0)=4, a(n, m) := 0 for m<0 and n
A151749 a(0) = 1, a(1) = 3; a(n+2) = (a(n+1) + a(n))/2 if 2 divides (a(n+1) + a(n)), a(n+2) = a(n+1) + a(n) otherwise.
1, 3, 2, 5, 7, 6, 13, 19, 16, 35, 51, 43, 47, 45, 46, 91, 137, 114, 251, 365, 308, 673, 981, 827, 904, 1731, 2635, 2183, 2409, 2296, 4705, 7001, 5853, 6427, 6140, 12567, 18707, 15637, 17172, 32809, 49981, 41395, 45688, 87083, 132771, 109927, 121349, 115638
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- A. M. Amleh et al., On Some Difference Equations with Eventually Periodic Solutions, J. Math. Anal. Appl., 223 (1998), 196-215.
- J. Greene, The Unboundedness of a Family of Difference Equations Over the Integers, Fib. Q., 46/47 (2008/2009), 146-152.
Crossrefs
Cf. A069202.
Programs
-
Maple
A151749 := proc(n) option remember; if n <= 1 then 1+2*n; else prev := procname(n-1)+procname(n-2) ; if prev mod 2 = 0 then prev/2 ; else prev; fi; fi; end: seq(A151749(n),n=0..80) ; # R. J. Mathar, Jun 18 2009
-
Mathematica
f[{a_,b_}]:=Module[{c=a+b},If[EvenQ[c],c/2,c]]; Transpose[NestList[ {Last[#],f[#]}&,{1,3},50]][[1]] (* Harvey P. Dale, Oct 12 2011 *)
Extensions
More terms from R. J. Mathar, Jun 18 2009
A120424 Having specified two initial terms, the "Half-Fibonacci" sequence proceeds like the Fibonacci sequence, except that the terms are halved before being added if they are even.
1, 3, 4, 5, 7, 12, 13, 19, 32, 35, 51, 86, 94, 90, 92, 91, 137, 228, 251, 365, 616, 673, 981, 1654, 1808, 1731, 2635, 4366, 4818, 4592, 4705, 7001, 11706, 12854, 12280, 12567, 18707, 31274, 34344, 32809, 49981, 82790, 91376, 87083, 132771, 219854
Offset: 0
Comments
For sequences that are infinitely increasing, the following are possible conjectures. Half of the terms are even in the limit. There are infinitely many consecutive pairs that differ by 1.
This is essentially a variant of the Collatz - Fibonacci mixture described in A069202. Instead of conditionally dividing the result by 2, this sequence conditionally divides the two previous terms by 2. The initial two terms of A069202 are 1,2, which corresponds to the initial terms 1,4 for this sequence.
Examples
Given a(21)=100 and a(22)=117, then a(23)=50+117=167. Given a(13)=64 and a(14)=68, then a(15)=32+34=66.
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
Crossrefs
Cf. A069202.
Programs
-
Mathematica
HalfFib[a_, b_, n_] := Module[{HF, i}, HF = {a, b}; For [i = 3, i < n, i++, HF = Append[HF, HF[[i - 2]]/(2 - Mod[HF[[i - 2]], 2]) + HF[[i - 1]]/(2 - Mod[HF[[i - 1]], 2])]]; HF] HalfFib[1,3,100] nxt[{a_,b_}]:={b,If[EvenQ[a],a/2,a]+If[EvenQ[b],b/2,b]}; NestList[nxt,{1,3},50][[All,1]] (* Harvey P. Dale, Nov 19 2019 *)
Formula
a(n) = (a(n-1) if a(n-1) is odd, else a(n-1)/2) + (a(n-2) if a(n-2) is odd, else a(n-2)/2).
A333301 a(1) = 1, a(2) = 2. For n>2, if a(n-1) is odd, a(n) = a(n-1) + a(n-2), and otherwise a(n) is the smallest missing number.
1, 2, 3, 5, 8, 4, 6, 7, 13, 20, 9, 29, 38, 10, 11, 21, 32, 12, 14, 15, 29, 44, 16, 17, 33, 50, 18, 19, 37, 56, 22, 23, 45, 68, 24, 25, 49, 74, 26, 27, 53, 80, 28, 30, 31, 61, 92, 34, 35, 69, 104, 36, 39, 75, 114, 40, 41, 81, 122, 42, 43, 85, 128, 46, 47, 93, 140, 48, 51, 99, 150, 52, 54, 55, 109, 164
Offset: 1
Comments
How many times does each number appear?
Examples
a(10) is even, so a(11) is the least number yet to appear, which is 9.
Comments