OFFSET
1,3
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..2000
FORMULA
EXAMPLE
a(3) = 2 since the sum of all previous terms is 2 and the sum of prime factors of 2 with multiplicity is 2.
a(4) = 4 since the sum of all previous terms is 4 = 2 * 2; the sum of these factors is 4.
a(5) = 6 since the sum of all previous terms is 8 = 2 * 2 * 2; the sum of these factors is 6.
a(6) = 9 since the sum of all previous terms is 14 = 2 * 7. The sum of these factors is 9.
a(7) = 23 since the sum of all previous terms is the prime 23, etc.
MAPLE
A268868 := proc(n)
option remember;
if n <= 2 then
1;
else
A001414(add(procname(i), i=1..n-1)) ;
end if;
end proc: # R. J. Mathar, May 06 2016
MATHEMATICA
a = {1, 1}; Do[AppendTo[a, Total@ Flatten@ Apply[Table[#1, {#2}] &, FactorInteger@ Total@ a, {1}]], {53}]; a (* Michael De Vlieger, Feb 15 2016 *)
Nest[Append[#, Total@ Flatten@ (ConstantArray@@@ FactorInteger@ Total@ #)] &, {1, 1}, 53] (* Michael De Vlieger, Mar 14 2018 *)
PROG
(PARI) lista(nn) = {va = vector(nn); print1(va[1] = 1, ", "); print1(va[2] = 1, ", "); sp = vecsum(va); for (k=3, nn, f = factor(sp); va[k] = sum(j=1, #f~, f[j, 1]*f[j, 2]); print1(va[k], ", "); sp += va[k]; ); } \\ Michel Marcus, Feb 15 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Feb 15 2016
EXTENSIONS
Name edited and more terms from Michel Marcus, Feb 15 2016
STATUS
approved