cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A075254 a(n) = n + (sum of prime factors of n taken with repetition).

Original entry on oeis.org

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
Offset: 1

Views

Author

Zak Seidov, Sep 10 2002

Keywords

Comments

a(n) = n + A001414(n).
Product of prime factors plus sum of prime factors of n. For minus instead of plus we have A075255, zeros A175787. - Gus Wiseman, Jan 26 2025

Examples

			a(6)=11 because 6=2*3, sopfr(6)=2+3=5 and 6+5=11.
		

Crossrefs

A000027 gives product of prime factors, indices A003963.
A000040 lists the primes, differences A001223.
A001414 gives sum of prime factors, indices A056239.
A027746 lists prime factors, indices A112798, count A001222.
A075255 gives product of prime factors minus sum of prime factors.

Programs

  • Haskell
    a075254 n = n + a001414 n  -- Reinhard Zumkeller, Feb 27 2012
    
  • 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
    
  • Maple
    A075254 := proc(n)
        n+A001414(n) ;
    end proc: # R. J. Mathar, Jul 27 2015
  • Mathematica
    Table[If[n==1,1, n +Plus@@Times@@@FactorInteger@n], {n, 80}] (* G. C. Greubel, Jan 10 2019 *)
  • PARI
    a(n) = my(f = factor(n)); n + sum(k=1, #f~, f[k,1]*f[k,2]); \\ Michel Marcus, Feb 22 2017
    
  • 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

Formula

From Gus Wiseman, Jan 26 2025: (Start)
First differences are 1 - A090340(n).
a(n) = 2*n - A075255(n).
a(n) = 2*A001414(n) + A075255(n).
(End)

A268868 a(n) is the sum of the prime factors (with repetition) of the sum of the preceding terms; a(1)=a(2)=1.

Original entry on oeis.org

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
Offset: 1

Views

Author

David James Sycamore, Feb 15 2016

Keywords

Examples

			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.
		

Crossrefs

Cf. A001414, A269004 (similar sequence with initial terms 1,2).
For records see A271927, A271928.
Cf. A096461.

Programs

  • 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 *)
  • 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

Formula

a(n) = A001414(A096461(n-1)); n>=3. - David James Sycamore, Mar 11 2018

Extensions

Name edited and more terms from Michel Marcus, Feb 15 2016

A016837 Primes reached after k iterations of sum of n and its prime divisors = t (where t replaces n in each iteration).

Original entry on oeis.org

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
Offset: 2

Views

Author

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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:
    map(f, [$2 .. 100]); # Robert Israel, Jul 24 2015
  • 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]]];
    Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Sep 16 2022 *)
  • 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

Formula

Factor n, add n and its prime divisors. Sum = t, t replaces n, repeat until a prime is produced.

Extensions

Corrected by Michel Marcus and Robert Israel, Jul 24 2015

A192896 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.

Original entry on oeis.org

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
Offset: 0

Views

Author

Lawrence Hollom, Jul 12 2011

Keywords

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

Examples

			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.
		

Crossrefs

Cf. A096461, similar but starting with 2 rather than 3. See also A001414.

Programs

  • 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 *)
  • PARI
    A192896(n,m=3) = { for(i=1,n, m+=A001414(m)); m } \\ M. F. Hasler, Jul 18 2011

Extensions

More terms from Vincenzo Librandi and Alonso del Arte, Jul 12 2011
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

A191749 Numbers not the sum of a smaller number and its prime factors (with multiplicity).

Original entry on oeis.org

1, 2, 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, 129, 130, 132, 133, 135, 137, 139, 144, 145
Offset: 1

Views

Author

Alonso del Arte, Jul 13 2011

Keywords

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).

Examples

			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.
		

Crossrefs

Cf. A096461, A192896 (only a(1) of those sequences can be in this sequence). Cf. also A001414. Analogous to A005114.

Programs

  • Mathematica
    pfAddSeq[start_, max_] := NestWhileList[# + Plus@@Times@@@FactorInteger@# &, start, # < max &]; Complement[Range[200], Flatten[Table[Drop[pfAddSeq[n, 200], 1], {n, 2, 200}]]] (* corrected by Amiram Eldar, Aug 14 2025 *)
  • PARI
    upto(n) = {
    	v = vector(n);
    	for(i = 2, n,
    		c = i + sopfr(i);
    		if(c <= n,
    			v[c] = 1));
    	select(x -> x == 0, v, 1)}
    sopfr(n) = {my(f = factor(n)); sum(i = 1, #f~, f[i,1] * f[i,2])} \\ David A. Corneth, Aug 14 2025

Extensions

2 inserted by and more terms from David A. Corneth, Aug 14 2025
Showing 1-5 of 5 results.