A067338 Divide the natural numbers in sets of consecutive numbers, starting with {1,2}, each set with number of elements equal to the sum of elements of the preceding set. The number of elements in the n-th set gives a(n).
2, 3, 12, 138, 11937, 73102188, 2672848933402062, 3572060905817696883164853272313, 6379809557435582128907282471156933713351634534272773703460187
Offset: 1
Crossrefs
Cf. A067339 (partial sums).
Programs
-
Magma
I:=[2,3]; [n le 2 select I[n] else Self(n-1)*(2*Self(n-1) + Self(n-2)*Self(n-1) + Self(n-2)^2)/(2*Self(n-2)): n in [1..10]]; // Vincenzo Librandi, Jan 23 2015
-
Maple
# Return [start,number,sum] of n-th group A067338aux := proc(n) local StrNumSu,Strt,Num,Su ; option remember; if n = 1 then return [1,2,3] ; else strNumSu := procname(n-1) ; Strt := strNumSu[1]+strNumSu[2] ; Num := strNumSu[3] ; Su := Num*(Num+2*Strt-1)/2 ; return [Strt,Num,Su] ; end if; end proc: A067338 := proc(n) A067338aux(n)[2] ; end proc: seq(A067338(n),n=1..10) ; # R. J. Mathar, Jan 21 2015
-
Mathematica
RecurrenceTable[{a[n] == a[n-1]*(2*a[n-1] + a[n-2]*a[n-1] + a[n-2]^2)/(2*a[n-2]), a[1]==2, a[2]==3}, a, {n, 1, 10}] (* Vaclav Kotesovec, Dec 09 2015 *)
-
PARI
print1(a=n=2);for(i=2,9,print1(","n=n*(a+a-n+1)/2);a+=n) \\ M. F. Hasler, Jan 21 2015
Formula
a(n)= a(n-1) *( 1 +2*[a(1)+a(2)+...+a(n-2)] +a(n-1) )/2. - Corrected by R. J. Mathar, Jan 22 2015
a(n) = a(n-1)*(2*a(n-1) + a(n-2)*a(n-1) + a(n-2)^2)/(2*a(n-2)). - David W. Wilson, Jan 22 2015
a(n+1) = a(n)*(2*A067339(n)-a(n)+1)/2. - M. F. Hasler, Jan 23 2015
a(n) ~ 2 * c^(2^n), where c = 1.312718001584962838462131787518361199185077166417566246117... . - Vaclav Kotesovec, Dec 09 2015
Extensions
Corrected and extended by Harvey P. Dale and M. F. Hasler, Jan 21 2015
Comments