Displaying 1-5 of 5 results found.
page
1
a(n) = n + (sum of prime factors of n taken with repetition).
+10
18
1, 4, 6, 8, 10, 11, 14, 14, 15, 17, 22, 19, 26, 23, 23, 24, 34, 26, 38, 29, 31, 35, 46, 33, 35, 41, 36, 39, 58, 40, 62, 42, 47, 53, 47, 46, 74, 59, 55, 51, 82, 54, 86, 59, 56, 71, 94, 59, 63, 62, 71, 69, 106, 65, 71, 69, 79, 89, 118, 72, 122, 95, 76, 76, 83, 82, 134, 89, 95, 84, 142
EXAMPLE
a(6)=11 because 6=2*3, sopfr(6)=2+3=5 and 6+5=11.
MATHEMATICA
Table[If[n==1, 1, n +Plus@@Times@@@FactorInteger@n], {n, 80}] (* G. C. Greubel, Jan 10 2019 *)
PROG
(Haskell)
(PARI) a(n) = my(f = factor(n)); n += sum(k=1, #f~, f[k, 1]*f[k, 2]); \\ Michel Marcus, Feb 22 2017
(Magma) [n eq 1 select 1 else (&+[p[1]*p[2]: p in Factorization(n)]) + n: n in [1..80]]; // G. C. Greubel, Jan 10 2019
(Sage) [n + sum(factor(n)[j][0]*factor(n)[j][1] for j in range(0, len(factor(n)))) for n in range(1, 80)] # G. C. Greubel, Jan 10 2019
a(n) is the sum of the prime factors (with repetition) of the sum of the preceding terms; a(1)=a(2)=1.
+10
4
1, 1, 2, 4, 6, 9, 23, 25, 71, 73, 48, 263, 265, 120, 911, 913, 552, 192, 85, 27, 35, 53, 296, 66, 455, 289, 48, 188, 5021, 5023, 159, 190, 379, 946, 900, 600, 97, 204, 118, 512, 87, 148, 3886, 23291, 23293, 71, 896, 11812, 60, 41359, 2394, 11508, 5529, 8977, 200
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
option remember;
if n <= 2 then
1;
else
A001414(add(procname(i), i=1..n-1)) ;
end if;
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
Primes reached after k iterations of sum of n and its prime divisors = t (where t replaces n in each iteration).
+10
3
23, 11, 23, 17, 11, 23, 23, 23, 17, 47, 19, 41, 23, 23, 47, 53, 41, 59, 29, 31, 47, 71, 47, 47, 41, 71, 71, 89, 71, 167, 83, 47, 53, 47, 71, 113, 59, 71, 71, 269, 83, 131, 59, 167, 71, 167, 59, 149, 167, 71, 167, 191, 83, 71, 167, 79, 89, 179, 251, 227, 167, 149, 149, 83, 269, 239, 89, 167, 251, 263, 251, 251, 113, 239, 149, 167
COMMENTS
Patrick asked what composite would produce 666 or 313 iterations. Carlos has also been working on the problem and asks if there is a run of 3 primes produced by consecutive composites. So original idea belongs to Patrick. This sequence was calculated by Enoch.
FORMULA
Factor n, add n and its prime divisors. Sum = t, t replaces n, repeat until a prime is produced.
EXAMPLE
Starting from 4, 4=2*2, so 4+2+2=8. 8=2*2*2 so 8+2+2+2=14. 14=2*7 so 14+2+7=23, prime is 23 in 3 iterations.
MAPLE
f:= proc(n) option remember; local t;
t:= n + add(f[1]*f[2], f=ifactors(n)[2]);
if isprime(t) then return t
else f(t)
fi;
end proc:
MATHEMATICA
a[n_] := a[n] = Module[{t, f = FactorInteger[n]}, t = n + f[[All, 1]].f[[All, 2]]; If[PrimeQ[t], Return[t], a[t]]];
PROG
(PARI) sfpn(n) = {my(f = factor(n)); n + sum(k=1, #f~, f[k, 1]*f[k, 2]); }
a(n) = {while (! isprime(t=sfpn(n)), n=t); t; } \\ Michel Marcus, Jul 24 2015
Prime factor addition sequence: For the term n, add all the prime factors of n to n. If n is a prime then add n to it. Start with n = 3
+10
2
3, 6, 11, 22, 35, 47, 94, 143, 167, 334, 503, 1006, 1511, 3022, 4535, 5447, 5879, 11758, 17639, 18239, 18336, 18540, 18658, 19170, 19257, 19405, 23291, 46582, 69875, 69946, 70842, 82654, 82714, 124073, 126467, 137975
COMMENTS
If n has repeated prime factors, then these are added as indicated by the exponents. For example, 18336 = 2^5 * 3 * 191, therefore we add 2 five times in our sum to obtain the next term of the sequence. - Alonso del Arte, Jul 12 2011
EXAMPLE
For n = 3, n is a prime number so the next term is 6.
For n = 6, n is not a prime factor, as n = 2*3, so the next term = 6+2+3 = 11.
MATHEMATICA
a[1] := 3; a[n_] := a[n] = a[n - 1] + Plus@@Times@@@FactorInteger@a[n - 1]; Table[a[n], {n, 40}] (* Alonso del Arte, Jul 12 2011 *)
CROSSREFS
Cf. A096461, similar but starting with 2 rather than 3. See also A001414.
EXTENSIONS
Offset corrected to 0 (so as to have a(n) = n times iterated A001414 acting on the initial value) by M. F. Hasler, Jul 18 2011
Numbers not the sum of a smaller number and its prime factors (with multiplicity).
+10
0
1, 3, 5, 7, 9, 12, 13, 16, 18, 20, 21, 25, 27, 28, 30, 32, 37, 43, 44, 45, 48, 49, 50, 52, 57, 60, 61, 64, 66, 67, 68, 70, 73, 75, 77, 78, 80, 81, 85, 87, 90, 91, 92, 97, 100, 101, 102, 104, 108, 110, 112, 115, 117, 126
COMMENTS
If a number is not squarefree, then its repeated prime factors are added as many times as the exponent indicates (e.g., the sum of prime factors of 8 is 6 since 8 = 2 * 2 * 2 and 2 + 2 + 2 = 6).
No even semiprime ( A100484) can be in this sequence, since, if nothing else, it is the sum of a prime number and that prime number's only prime factor (itself).
EXAMPLE
3 is in the sequence since neither 1 + sopfr(1) nor 2 + sopfr(2) add up to 3 (instead these equal 2 and 4 respectively).
Because 2 + sopfr(2) = 4, the number 4 is not in this sequence.
MATHEMATICA
pfAddSeq[start_, max_] := NestWhileList[# + Plus@@Times@@@FactorInteger@# &, start, # < max &]; Complement[Range[200], Flatten[Table[Drop[pfAddSeq[n, 200], 1], {n, 200}]]]
Search completed in 0.006 seconds
|