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.

Previous Showing 11-20 of 35 results. Next

A082300 Numbers relatively prime to the sum of their prime factors (with repetition).

Original entry on oeis.org

1, 6, 10, 12, 14, 15, 20, 21, 22, 26, 28, 33, 34, 35, 38, 39, 40, 44, 45, 46, 48, 51, 52, 54, 55, 56, 57, 58, 62, 63, 65, 68, 69, 74, 75, 76, 77, 80, 82, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 99, 104, 106, 108, 111, 112, 115, 116, 117, 118, 119, 122, 123, 124, 129, 133
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 08 2003

Keywords

Comments

In other words, numbers n such that n and sopfr(n) are relatively prime, where sopfr(n) (A001414) is the sum of the primes (with repetition) dividing n.
Conjecture: a(n) ~ (Pi^2/6)n. - Charles R Greathouse IV, Aug 04 2016
No term is prime since for prime p, p and 2p are not coprime; similarly no term is a prime power. A050703 is a subsequence because then n+sopfr(n) is prime, and so coprime to n. - David James Sycamore, Mar 04 2018

Examples

			gcd(2*2*5,2+2+5) = gcd(2*2*5,3*3)=1, therefore 20 is a term;
gcd(3*11,3+11) = gcd(3*11,2*7)=1, therefore 33 is a term.
		

Crossrefs

A082299(a(n)) = 1.

Programs

  • Mathematica
    Select[Range@ 106, CoprimeQ[#, Total@ Flatten@ Map[Table[#1, {#2}] & @@ # &, FactorInteger[#]]] &] (* Michael De Vlieger, Aug 06 2016 *)
  • PARI
    sopfr(n)=my(f=factor(n)); sum(i=1,#f~, f[i,1]*f[i,2])
    is(n)=gcd(sopfr(n),n)==1 \\ Charles R Greathouse IV, Aug 04 2016

Extensions

Revised definition from Lior Manor, Apr 14 2004

A018845 Number of iterations required for the sum of n and its prime divisors = t to reach a prime (where t replaces n in each iteration) in A016837.

Original entry on oeis.org

4, 2, 3, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 1, 3, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 3, 3, 2, 3, 5, 4, 1, 1, 1, 2, 2, 1, 2, 2, 10, 3, 2, 1, 6, 1, 3, 1, 5, 5, 1, 5, 3, 2, 1, 5, 1, 1, 2, 7, 3, 4, 4, 4, 1, 10, 3, 1, 4, 6, 3, 6, 3, 1, 6, 3, 4, 2, 2, 2, 2, 9, 2, 5, 1, 1, 3
Offset: 2

Views

Author

Keywords

Examples

			Starting with 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 in 3 iterations, so a(4)=3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; local t;
       t:= n + convert(map(convert,ifactors(n)[2],`*`),`+`);
       if isprime(t) then 1 else 1+procname(t) fi
    end proc:
    map(f, [$2..100]); # Robert Israel, Jul 26 2015
  • Mathematica
    a[n_] := a[n] = Module[{t, f = FactorInteger[n]}, t = n + f[[All, 1]]. f[[All, 2]]; If[PrimeQ[t], 1, 1 + a[t]]];
    a /@ Range[2, 100] (* Jean-François Alcover, Jul 19 2020, after Maple *)
  • PARI
    sfpn(n) = {my(f = factor(n)); n + sum(k=1, #f~, f[k,1]*f[k,2]);}
    a(n) = {nb = 1; while (! isprime(t=sfpn(n)), n=t; nb++); nb;}

Formula

Factor n, add n and its prime divisors. Sum = t, t replaces n, repeat until a prime is produced in k iterations.
For x in A050703, a(x) = 1. - Michel Marcus, Jul 24 2015
Number of iterations x->A075254(x) to reach a prime, starting at x=n. - R. J. Mathar, Jul 27 2015

Extensions

Corrected by Michel Marcus, Jul 24 2015

A050766 Primes occurring in A050765.

Original entry on oeis.org

38431, 59333, 89753, 93683, 156007, 356441, 682141, 1226959, 1468387, 1648697, 2592043, 2995249, 3595589, 3933731, 5845309, 5967433, 8861059, 8953631, 9748537, 11351399, 12819329, 13227023, 13712551, 16193579, 18375053, 19294523, 21206117, 25259593, 28297559
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Examples

			Prime 19294523 = composite 19294436 + sopf 2+2+7+7+7+7+7+7+41 = 19294436 + 87 = nextprime(19294436).
		

Crossrefs

Programs

  • Mathematica
    Reap[For[n = 4, n <= 2*10^7, n = If[PrimeQ[n+1], n+2, n+1], p = NextPrime[n]; If[n + Total[Times @@@ FactorInteger[n] ] == p, Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Oct 18 2013 *)

Extensions

Offset corrected by Donovan Johnson, Oct 18 2013

A050778 Primes that are ending primes after the iterated procedure of 'composite added to the sum of its prime factors reaches a prime'.

Original entry on oeis.org

11, 17, 19, 23, 29, 31, 41, 47, 53, 59, 71, 79, 83, 89, 103, 107, 109, 113, 127, 131, 149, 151, 167, 179, 191, 227, 229, 239, 241, 251, 263, 269, 271, 293, 311, 313, 317, 331, 337, 359, 373, 383, 401, 419, 431, 439, 443, 449, 461, 467, 479, 491, 503, 509, 521
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Examples

			383 is ending prime for the following composites 182, 204, 218, 226, 228, 254, 329 and 341. For instance 341 (=11*31) -> 341 + (11+31) = 341 + 42 = 383.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=NestWhile[#+Total[Times@@@FactorInteger[#]]&,n,!PrimeQ[#]&]; t={}; Do[If[!PrimeQ[n],AppendTo[t,a[n]]],{n,4,nn=522}]; Select[Union[t],#Jayanta Basu, Jun 01 2013 *)

A274718 Set x = n. Then a(n) is the number of iterations of successive applications of the map x = A001414(x) that leave x composite, or a(n) = -1 if x always remains composite.

Original entry on oeis.org

-1, 0, 0, -1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, 2, 2, 0, 2, 0, 2, 1, 0, 0, 2, 1, 3, 2, 0, 0, 1, 0, 1, 3, 0, 1, 1, 0, 2, 3, 0, 0, 1, 0, 3, 0, 2, 0, 0, 3, 1, 3, 0, 0, 0, 3, 0, 1, 0, 0, 1, 0, 4, 0, 1, 3, 3, 0, 2, 4, 3, 0, 1, 0, 4, 0, 0, 3, 3, 0, 0, 1, 0, 0, 3, 1, 1, 2, 0, 0, 0, 3, 3, 1, 4, 3, 0, 0, 3, 0, 3, 0, 1, 0, 0, 3
Offset: 1

Views

Author

Felix Fröhlich, Jul 03 2016

Keywords

Comments

a(1) and a(4) are the only terms with a value of -1.
a(n) = 0 iff n is a term of A100118.

Examples

			For n = 26: A001414(26) = 15, A001414(15) = 8, A001414(8) = 6 and A001414(6) = 5. 5 is prime and so 26 remains composite through 3 iterations of the map given in the definition, therefore a(26) = 3.
		

Crossrefs

Programs

  • Mathematica
    lim = 10^4; Table[Length@ NestWhileList[If[# == 1, 0, Total@ Flatten[Table[#1, {#2}] & @@@ FactorInteger@ #]] &, n, ! PrimeQ@ # &, 1, lim] - 2 /. {-1 -> 0, lim - 1 -> -1}, {n, 86}] (* Michael De Vlieger, Jul 03 2016 *)
  • PARI
    sopfr(n) = my(f=factor(n)); sum(i=1, #f[, 1], f[i, 1]*f[i, 2]) /* after Charles R Greathouse IV in A050703 */
    a(n) = my(i=0, s=sopfr(n)); while(1, if(ispseudoprime(s), return(i)); if(s==sopfr(s), return(-1)); s=sopfr(s); i++)

Extensions

More terms from Antti Karttunen, Mar 07 2018

A387048 Numbers k such that k^2 + sopfr(k)^2 is prime, where sopfr = A001414.

Original entry on oeis.org

6, 10, 12, 14, 21, 22, 39, 40, 44, 46, 51, 54, 57, 62, 65, 69, 74, 80, 82, 86, 90, 91, 95, 104, 108, 111, 115, 119, 129, 134, 141, 155, 161, 164, 166, 172, 176, 187, 189, 202, 210, 212, 217, 221, 226, 232, 244, 248, 252, 254, 265, 272, 274, 287, 292, 295, 297, 299, 300, 302, 305, 306, 328, 339
Offset: 1

Views

Author

Robert Israel, Aug 14 2025

Keywords

Comments

Includes 2*p where p is a prime such that 5 * p^2 + 4 * p + 4 is prime. The Generalized Bunyakowsky Conjecture implies there are infinitely many of these.

Examples

			a(3) = 12 is a term because 12^2 + sopfr(12)^2 = 144 + (2*2+3)^2 = 193 is prime.
		

Crossrefs

Programs

  • Maple
    sopfr:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
    filter:= t -> isprime(t^2 + sopfr(t)^2):
    select(filter, [$1..10^3]);
  • Mathematica
    q[k_] := PrimeQ[k^2 + (Plus @@ Times @@@ FactorInteger[k])^2]; Select[Range[2, 340], q] (* Amiram Eldar, Aug 14 2025 *)

A387049 Numbers k such that both k + sopfr(k) and k^2 + sopfr(k)^2 are prime, where sopfr = A001414.

Original entry on oeis.org

6, 10, 12, 14, 21, 44, 46, 51, 57, 65, 74, 86, 90, 111, 141, 155, 161, 166, 210, 212, 221, 252, 254, 295, 297, 300, 306, 365, 371, 404, 415, 447, 466, 485, 504, 513, 514, 524, 545, 629, 634, 640, 674, 685, 720, 767, 866, 910, 914, 930, 985, 1020, 1035, 1062, 1124, 1135, 1157, 1189, 1197, 1214
Offset: 1

Views

Author

Robert Israel, Aug 14 2025

Keywords

Comments

Includes 2*p if p is a prime such that 3*p + 2 and 5 * p^2 + 4 * p + 4 are prime. The Generalized Bunyakowsky Conjecture implies there are infinitely many of these.

Examples

			a(3) = 12 is a term because sopfr(12) = 2*2 + 3 = 7 and both 12 + 7 = 19 and 12^2 + 7^2 = 193 are prime.
		

Crossrefs

Cf. A001414. Intersection of A050703 and A387048.

Programs

  • Maple
    sopfr:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
    filter:= proc(n) local s; s:= sopfr(n); isprime(n+s) and isprime(n^2 + s^2) end proc:
    select(filter, [$1..2000]);
  • Mathematica
    q[k_] := Module[{sopfr = Plus @@ Times @@@ FactorInteger[k]}, PrimeQ[k + sopfr] && PrimeQ[k^2 + sopfr^2]]; Select[Range[2, 1214], q] (* Amiram Eldar, Aug 14 2025 *)

A020905 Sum of n plus its prime factors associated with A020700.

Original entry on oeis.org

14, 23, 76, 93, 241, 312, 373, 388, 504, 912, 956, 1117, 1528, 2088, 2064, 3564, 3744, 4092, 6022, 6816, 8664, 9664, 13281, 15632, 17364, 19199, 19717, 21183, 21913, 24630, 24720, 27429, 31954, 32517, 35881, 37784, 37669, 41947, 49704, 50868, 55439, 57313
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

More terms from Michel Marcus, Jun 05 2014

A050767 Let f(m) = smallest composite number that takes m steps of "add prime factors to number" to reach a prime and g(m) be the prime that is reached. Sequence gives values of g(m), sorted and duplicates removed.

Original entry on oeis.org

11, 23, 83, 149, 167, 251, 269, 881, 2039, 5021, 9311, 35111, 82219, 89809, 181421, 289099, 420899, 885839, 996157, 1963799, 2554439, 2843903, 3269039, 3632701, 4648519, 6448103, 9748579, 35200439, 71927183, 82216501, 283709077
Offset: 0

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Examples

			23 is included as it is both g(2) (with f(2)=8) and g(3) (with f(3)=4): '8' + (2+2+2) => 14 + (2+7) => 23; '4' + (2+2) => 8 + (2+2+2) => 14 + (2+7) => 23.
		

Crossrefs

Cf. A050703, A050710 (for f(n)).

A050768 Iterated procedure 'composite k added to sum of its prime factors reaches a prime' yields 1 skipped prime.

Original entry on oeis.org

6, 20, 48, 112, 320, 1326, 1400, 4165, 4374, 10395, 12852, 15827, 20412, 23232, 24300, 24990, 25000, 27200, 27300, 31407, 33660, 34965, 38480, 41553, 42525, 50688, 53508, 65450, 66000, 68400, 69498
Offset: 0

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Examples

			a(2)=20 + (2+2+5) = ending prime 29. Between 20 and 29 lies exactly one prime 23.
		

Crossrefs

Programs

  • Mathematica
    aQ[n_]:=NextPrime[NestWhile[#+Total[Times@@@FactorInteger[#]]&,n,!PrimeQ[#]&],-1]==NextPrime[n]; Select[Range[70000],!PrimeQ[#]&&aQ[#]&] (* Jayanta Basu, May 31 2013 *)
Previous Showing 11-20 of 35 results. Next