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-3 of 3 results.

A055233 Composite numbers equal to the sum of the primes from their smallest prime factor to their largest prime factor.

Original entry on oeis.org

10, 39, 155, 371, 2935561623745, 454539357304421
Offset: 1

Views

Author

Carlos Rivera, Jun 21 2000

Keywords

Comments

Composite n such that n = p_1 + p_2 + ... + p_k where the p_i are consecutive primes, p_1 is the smallest prime factor of n and p_k is the largest.
Concerning a(6): 454539357304421 is the product of two primes, 3536123 * 128541727 and also the sum of these two plus all the primes in between: 3536123 + 3536129 + 3536131 + ... + 128541719 + 128541727. I do not know if there are any terms in A055233 between 2935561623745 and 454539357304421. (I have searched for values of N satisfying N=Pa*Pb=Pa+...+Pb as far as 5.98*10^16, but this is not quite the same as A055233 or A055514.) - Robert Munafo, Nov 20 2002
This is a subsequence of A055514 where the sum must be divisible by the smallest and largest term, but they need not be its smallest and largest prime factor. Without restriction to composite numbers, all primes would be trivially included: see A169802. - M. F. Hasler, Nov 21 2021

Examples

			10 = 2*5 = 2 + 3 + 5;
39 = 3*13 = 3 + 5 + 7 + 11 + 13;
371 = 7*53 = 7 + 11 + 13 + ... + 53.
		

Crossrefs

Subsequence of A055514.
Cf. A074036 (sum of primes from sfp(n) to gpf(n)), A169802 (n = A074036(n)).
Cf. A020639 (spf: smallest prime factor), A006530 (gpf: greatest prime factor).

Programs

  • Mathematica
    Select[Range[2, 10^3], And[CompositeQ@ #1, #1 == #2] & @@ {#, Total@ Prime[Range @@ PrimePi@ {#[[1, 1]], #[[-1, 1]]} &@ FactorInteger[#]]} &] (* Michael De Vlieger, Sep 04 2019 *)

Extensions

a(5) found by Jud McCranie, Jul 03 2000
454539357304421 confirmed to be the 6th term by Donovan Johnson, Aug 23 2010
Example: removed last (see A055514). - Manuel Valdivia, Nov 19 2011

A074036 Sum of the primes from the smallest prime factor of n to the largest prime factor of n.

Original entry on oeis.org

0, 2, 3, 2, 5, 5, 7, 2, 3, 10, 11, 5, 13, 17, 8, 2, 17, 5, 19, 10, 15, 28, 23, 5, 5, 41, 3, 17, 29, 10, 31, 2, 26, 58, 12, 5, 37, 77, 39, 10, 41, 17, 43, 28, 8, 100, 47, 5, 7, 10, 56, 41, 53, 5, 23, 17, 75, 129, 59, 10, 61, 160, 15, 2, 36, 28, 67, 58, 98, 17, 71, 5, 73, 197, 8
Offset: 1

Views

Author

Jason Earls, Sep 15 2002

Keywords

Comments

Obviously if n is prime then a(n) = n. However, there are composite values of n such that a(n) = n, such as 10 and 155. - Alonso del Arte, May 30 2017

Examples

			a(14) = 17 because 14 = 2 * 7 and 2 + 3 + 5 + 7 = 17.
		

Crossrefs

Programs

  • Maple
    f:=proc(n) local i,t1,t2,t3,t4,t5,t6; if n<=1 then RETURN(0) else
    t1:=ifactors(n); t2:=t1[2]; t3:=nops(t2); t4:=0; t5:=pi(t2[1][1]); t6:=pi(t2[t3][1]);
    for i from t5 to t6 do t4:=t4+ithprime(i); od; RETURN(t4); fi; end; # N. J. A. Sloane, May 24 2010
    # second Maple program:
    s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    a:= proc(n) option remember; uses numtheory; `if`(n<2, 0, (m->
          s(pi(max(m)))-s(pi(min(m))-1))(factorset(n)))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 24 2021
  • Mathematica
    sp[n_]:=With[{fi=FactorInteger[n][[All,1]]},Total[Prime[Range[ PrimePi[ fi[[1]]],PrimePi[fi[[-1]]]]]]]; Join[{0},Array[sp,80,2]] (* Harvey P. Dale, Dec 22 2017 *)
  • PARI
    a(n) = if (n==1, 0, my(f = factor(n), s = 0); forprime(p=f[1,1], f[#f~,1], s += p); s); \\ Michel Marcus, May 31 2017

Formula

Given p prime and k > 0, a(p^k) = p. - Alonso del Arte, May 30 2017

A169804 Numbers k such that A074036(k) > k.

Original entry on oeis.org

14, 22, 26, 34, 38, 46, 51, 57, 58, 62, 69, 74, 76, 82, 86, 87, 92, 93, 94, 106, 111, 116, 118, 122, 123, 124, 129, 134, 141, 142, 146, 148, 158, 159, 164, 166, 172, 177, 178, 183, 185, 188, 194, 201, 202, 205, 206, 212, 213, 214, 215, 218, 219, 226, 235, 236, 237, 244, 249
Offset: 1

Views

Author

N. J. A. Sloane, May 24 2010

Keywords

Crossrefs

Showing 1-3 of 3 results.