%I #26 Jan 25 2021 10:27:15
%S 6,28,34,120,126,148,154,496,502,524,530,616,622,644,650,672,678,700,
%T 706,792,798,820,826,1168,1174,1196,1202,1288,1294,1316,1322,8128,
%U 8134,8156,8162,8248,8254,8276,8282,8624,8630,8652,8658,8744,8750,8772,8778
%N Sums of (one or more distinct) k-perfect numbers.
%C Each k-perfect number (A007691\{1}) appears once, and may also appear at most once in each sum of k-perfect numbers to create other terms in the sequence. [_Harvey P. Dale_, Feb 07 2012]
%H Robert Israel, <a href="/A083865/b083865.txt">Table of n, a(n) for n = 1..10000</a>
%F Empirical observation: a(n) = 2*n + Sum_{k >= 1} 4^k*floor(2*n/2^k) for 1 <= n <= 15 and 32 <= n <= 47; a(n) = 2*n - 1344 + Sum_{k >= 1} 4^k*floor(2*n/2^k) for 16 <= n <= 31. Note 1344 = 4^3 + 4^4 + 4^5. Cf. A000695. - _Peter Bala_, Nov 29 2016
%F If b(n) = 2*n + Sum_{k >= 1} 4^k*floor(2*n/2^k) - a(n), we also have b(n) = 1344 for 48 <= n <= 63, then 2400 for 64 <= n <= 79, 3744 for 80 <= n <= 95, 8008 for 96 <= n <= 111, etc. The first case where b(n) is not constant on an interval 16*k <= n <= 16*k+15 is k=57214, where b(915431)=2747770287196 but b(915432)=2747770287312. - _Robert Israel_, Nov 29 2016
%e a(3) = 34 because it is the sum of 6 + 28 both of which are perfect numbers.
%p N:= 10000: # to get all terms <= N
%p Kperf:= select(t -> numtheory:-sigma(t) mod t = 0, [$2..N]):
%p S:= {0}:
%p for k in Kperf do S:= S union (k +~ S) od:
%p sort(convert(S minus {0}, list)); # _Robert Israel_, Nov 29 2016
%t With[{perf=Select[Range[10000],DivisorSigma[1,#]==2#&]},Rest[Union[Total/@ Subsets[perf]]]] (* _Harvey P. Dale_, Feb 07 2012 *)
%o (PARI) a=[];n=1;until(50<#a=concat(a,vector(#a+1,i,n+if(i>1,a[i-1]))),while(sigma(n++)%n,));a \\ _M. F. Hasler_, Feb 09 2012
%Y Cf. A065997, A000695.
%K easy,nonn
%O 1,1
%A Torsten Klar (klar(AT)radbruch.jura.uni-mainz.de), Jun 18 2003
%E Corrected by _M. F. Hasler_ and others, Feb 07 2012
|