|
|
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).
|
|
3
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The sets begin {1,2}, {3,4,5}, {6,7,8,...,17}, ...
Starting with {1}, one would get {1}, {2}, {3,4}, {5,6,7, 8,9,10, 11} ... with sums (1,2,7,56, 2212 ...) = A002658. - M. F. Hasler, Jan 21 2015
|
|
LINKS
|
|
|
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) ~ 2 * c^(2^n), where c = 1.312718001584962838462131787518361199185077166417566246117... . - Vaclav Kotesovec, Dec 09 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:
A067338aux(n)[2] ;
end proc:
|
|
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 *)
|
|
PROG
|
(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
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|