A330807 a(1) = 2; a(n+1) = Sum_{k=1..n} {S(a(k)): S(a(k)) = S(a(n))}, where S is sopfr (A001414).
2, 2, 4, 4, 8, 6, 5, 10, 7, 14, 9, 12, 21, 10, 28, 11, 22, 13, 26, 15, 8, 18, 16, 24, 18, 32, 20, 27, 36, 30, 40, 33, 14, 45, 44, 30, 50, 12, 35, 24, 54, 55, 16, 40, 66, 32, 60, 36, 70, 28, 77, 18, 48, 88, 17, 34, 19, 38, 21, 80, 39, 48, 99, 51, 20, 63, 52, 68, 42, 48, 110, 36, 90, 65, 54, 121, 22, 78, 72, 60, 72, 84, 42, 96
Offset: 1
Examples
a(2)=2 because it is the sopfr of a(1) and there are no prior terms which could contribute to the sum. a(3)=2+2=4 because 2 has occurred twice already as sopf of prior terms. a(7)=5 because a(6)=6 and has sopfr 5 which has not been seen before.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Magma
sopfr:=func
; a:=[2]; for n in [2..90] do Append(~a,&+[sopfr(a[k]):k in [1..n-1]|sopfr(a[k]) eq sopfr(a[n-1])]); end for; a; // Marius A. Burtea, Jan 01 2020 -
Mathematica
s[1] = 0; s[n_] := Plus @@ Times @@@ FactorInteger[n]; a[1] = 2; a[n_] := a[n] = (s1 = s[a[n - 1]])*(1 + Sum[Boole[s[a[k]] == s1], {k, 1, n - 2}]); Array[a, 100] (* Amiram Eldar, Jan 01 2020 *)
Comments