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.

A068873 Smallest prime which is a sum of n distinct primes.

Original entry on oeis.org

2, 5, 19, 17, 43, 41, 79, 83, 127, 131, 199, 197, 283, 281, 379, 389, 499, 509, 643, 641, 809, 809, 983, 971, 1171, 1163, 1381, 1373, 1609, 1607, 1861, 1861, 2137, 2137, 2437, 2441, 2749, 2767, 3109, 3109, 3457, 3457, 3833, 3847, 4243, 4241, 4663, 4679, 5119
Offset: 1

Views

Author

Amarnath Murthy, Mar 19 2002

Keywords

Comments

Conjectured terms a(50)-a(76): 5147, 5623, 5591, 6079, 6101, 6599, 6607, 7151, 7151, 7699, 7699, 8273, 8293, 8893, 8893, 9521, 9547, 10211, 10223, 10889, 10891, 11597, 11617, 12343, 12373, 13099, 13127. - Jean-François Alcover, Apr 22 2020

Examples

			a(3) = 19 as 19 is the smallest prime which can be expressed as the sum of three primes as 19 = 3 + 5 + 11.
a(4) = 17= 2+3+5+7. a(2)=A038609(1). a(3)=A124867(7). Further examples in A102330.
		

References

  • Shantanu Dey & Moloy De, Two conjectures on prime numbers, Journal of Recreational Mathematics, Vol. 36 (3), pp 205-206. Baywood Publ. Co, Amityville NY 2011.

Crossrefs

Programs

  • Maple
    # Number of ways to write n as a sum of k distinct primes, the smallest
    # being smalp
    sumkprims := proc(n,k,smalp)
        option remember;
        local a,res,pn;
        res := n-smalp ;
        if res < 0 then
            return 0;
        elif res > 0 and k <=0 then
            return 0;
        elif res = 0 and k = 1 then
            return 1;
        else
            pn := nextprime(smalp) ;
            a := 0 ;
            while pn <= res do
                a := a+procname(res,k-1,pn) ;
                pn := nextprime(pn) ;
            end do:
            a ;
        end if;
    end proc:
    # Number of ways of writing n as a sum of k distinct primes
    A000586k := proc(n,k)
        local a,i,smalp ;
        a := 0 ;
        for i from 1 do
            smalp := ithprime(i) ;
            if k*smalp > n then
                return a;
            end if;
            a := a+sumkprims(n,k,smalp) ;
        end do:
    end proc:
    # Smallest prime which is a sum of n distinct primes
    A068873 := proc(n)
        local a,i;
        a := A007504(n) ;
        a := nextprime(a-1) ;
        for i from 1 do
            if A000586k(a,n) > 0 then
                return a;
            end if;
            a := nextprime(a) ;
        end do:
    end proc: # R. J. Mathar, May 04 2014
  • PARI
    a(n)=
    {
        my(P=primes(n), k=n, t, res = oo);
        while(1,
            forvec(v=vector(n-1, i, [1, k-1]),
                t=sum(i=1, n-1, P[v[i]])+P[k];
                if(isprime(t),
    		res = min(res, t);
    	   )
            ,
                2 \\ flag: only strictly increasing vectors v
            );
            P=concat(P, nextprime(P[k]+1));
            k++;
    	if(P[k] + sum(i = 1+bitand(n,1), n-1+bitand(n,1), P[i]) > res,
    		return(res)
    	)
        );
    }
    \\ Charles R Greathouse IV, Sep 19 2015; corrected by David A. Corneth, May 12 2025

Formula

Min(a(n), A073619(n)) = A007504(n) for n > 1. - Jonathan Sondow, Jul 10 2012

Extensions

More terms from Sascha Kurz, Feb 03 2003
Corrected by Ray Chandler, Feb 02 2005

A383725 a(n) is the least number k such that omega(k) = n and the largest prime factor of k equals the sum of its remaining prime factors, where omega(k) = A001221(k).

Original entry on oeis.org

30, 3135, 3570, 844305, 1231230, 463798335, 1089218130, 410825520105, 905980145070, 818186519485335, 1461885412557570, 2023416377587710105, 3676255934199278430, 6175645531427513476335, 14590719651042312667890, 29263451149172039260325865, 67794672364404337821058590
Offset: 3

Views

Author

Paolo Xausa, May 07 2025

Keywords

Comments

a(n) and n have opposite parity. - David A. Corneth, May 08 2025

Examples

			a(3) = 30 is the smallest number having 3 distinct prime factors (namely 2, 3, and 5) such that the largest one is the sum of the others (2 + 3 = 5).
a(4) = 3135 is the smallest number having 4 distinct prime factors (namely 3, 5, 11 and 19) such that the largest one is the sum of the others (3 + 5 + 11 = 19).
		

Crossrefs

Programs

  • PARI
    isok(k, n) = my(f=factor(k)); (omega(f)==n) && (vecsum(f[,1]) == 2*vecmax(f[,1]));
    a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, May 08 2025

Formula

a(n) = (Product_{i=1..n-1} A102330(n-1,i))*A068873(n-1).
a(n) = A383726(n,1).
a(n) >= A002110(n).

A102325 Primes p such that the largest prime divisor of p^3 + 1 is less than p.

Original entry on oeis.org

17, 19, 23, 31, 101, 103, 173, 179, 257, 263, 293, 353, 373, 431, 467, 491, 521, 563, 593, 619, 641, 677, 719, 739, 773, 821, 829, 857, 859, 863, 881, 929, 941, 953, 1031, 1051, 1087, 1091, 1109, 1129, 1229, 1297, 1327, 1399, 1433, 1487, 1489, 1499, 1583
Offset: 1

Views

Author

Labos Elemer, Jan 05 2005

Keywords

Examples

			p = 17, 1 + p^3 = 1 + 4913 = 2*3*3*3*7*13, so the largest prime factor is 13 < p = 17.
		

Crossrefs

Programs

  • Mathematica
    <Ray Chandler, Jan 08 2005 *)
Showing 1-3 of 3 results.