login
A116534
Start with 1 and 2; if number is even concatenate with last number and divide by 2, if it is odd add 1 and divide by 2.
1
1, 2, 6, 13, 7, 4, 37, 19, 10, 955, 478, 477739, 238870, 238869619435, 119434809718, 119434809717559717404859, 59717404858779858702430, 5971740485877985870242979858702429389929351215
OFFSET
0,2
COMMENTS
Rapidly growing: for n=10,20,30,40,50 the terms have 3, 138, 914, 3649, 248128 digits respectively (cf. A131059). - Hieronymus Fischer, Jun 12 2007
FORMULA
a(n) = ceiling(a(n-1)/2)+(1+(-1)^a(n-1))*10^floor(log_10(a(n-1))+1)*a(n-2)/4, n>=2. - Hieronymus Fischer, Jun 12 2007
EXAMPLE
a(1) = 2 is even, so concatenate a(0) and a(1), divide by 2: a(2) = 12/2 = 6.
a(2) = 6 is even, so concatenate a(1) and a(2), divide by 2: a(3) = 26/2 = 13.
a(3) = 13 is odd, so add 1, divide by 2: a(4) = 14/2 = 7.
MATHEMATICA
a[0]=1; a[1]=2; a[n_]:=If[EvenQ[a[n-1]], FromDigits[Join[IntegerDigits[a[n-2]], IntegerDigits[a[n-1]]]]/2, (a[n-1]+1)/2]; Table[a[n], {n, 0, 17}] (* James C. McMahon, Aug 22 2024 *)
CROSSREFS
Cf. A131059.
Sequence in context: A181063 A161324 A226603 * A130533 A231384 A082722
KEYWORD
nonn,base
AUTHOR
Rodolfo Kurchan, Mar 26 2006
EXTENSIONS
More terms from Hieronymus Fischer, Jun 12 2007
STATUS
approved