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.

A299760 Primes p with index k >= 3 such that A288189(k) = A295185(k).

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 23, 29, 31, 41, 43, 47, 59, 61, 71, 73, 79, 83, 89, 101, 103, 107, 109, 113, 131, 139, 151, 167, 173, 179, 181, 193, 197, 199, 227, 229, 233, 239, 241, 269, 271, 281, 283, 311, 313, 317, 349, 353, 359, 379, 383, 389, 401, 421, 433, 439, 443, 449, 461, 463, 467, 491, 503, 509, 523, 569, 571, 599, 601, 607
Offset: 1

Views

Author

David James Sycamore, Feb 18 2018

Keywords

Comments

Let A,B,X respectively, represent A288189, A295185, A056240. For prime p with index k >= 3, A(p) = X(t)(rp-t) for some multiple r >= 1 of p, and some integer t such that rp-t is prime; then sopfr(A(p)) = rp. Similarly B(p) = X(g)(p-g) where g = p-q for some prime q < p, where q = p-g is the greatest prime divisor of A295185(p); then sopfr(B(p)) = p. A(p) < B(p) if r and t exist such that (rp-t) is prime, with X(t)(rp-t) < X(g)(p-g), otherwise r = 1, t = g and A(p) = B(p). So A(p) <= B(p) and this sequence lists primes p for which this equality holds. All primes for which g = 2 or 4 are in this sequence, since then both 2(p-2), 4(p-4) are < 3(2p-3), the minimum possible value for any r > 1, t of X(t)(rp-t). Equivocal results are found for g >= 6, though in the great majority of cases (up to k=400), g > 6 ==> A(p) < B(p).

Examples

			p=29 is included because 2p-3 and 3p-2 are both composite so A(29) = 8(p-6) = 8(p-6) = 8*23 = 184 = B(29).
p=37 is not included since A(37) = 3(2p-3) = 213 whereas B(37) = X(6)(37-6) = 8*31 = 248, so A(37) < B(37). In both examples g=6.
		

Crossrefs

Programs

  • PARI
    sopfr(k) = my(f=factor(k)); sum(j=1, #f~, f[j, 1]*f[j, 2]);
    ap288189(p) = forcomposite(c=p, , if (!(sopfr(c) % p), return(c)));
    ap295185(p) = forcomposite(c=p, , if (sopfr(c) == p, return(c)));
    isok(p) = isprime(p) && (ap288189(p)==ap295185(p)); \\ Michel Marcus, Apr 14 2018

A302720 Primes with index k >= 3 such that A288189(prime(k)) < A295185(prime(k)).

Original entry on oeis.org

37, 53, 67, 97, 127, 137, 149, 157, 163, 191, 211, 223, 251, 257, 263, 277, 293, 307, 331, 337, 347, 367, 373, 397, 409, 419, 431, 457, 479, 487, 499, 521, 541, 547, 557, 563, 577, 587, 593, 613, 631, 641, 653, 673, 691, 701, 709, 719, 727, 751, 757, 769, 787, 797, 809, 821, 839, 853, 877, 907, 919, 929, 937, 953, 967, 977
Offset: 1

Views

Author

David James Sycamore, Apr 12 2018

Keywords

Comments

Let A,B,X represent A288189, A295185, A056240 respectively. A(p) is defined for every prime, B(p) is defined for primes >= 5. For a prime p with index k >= 3, A(p) = X(t)(rp-t) for some multiple r of p, and some integer t such that rp-t is prime. Then Sopfr(A(p)) = Sopfr(X(t))+(rp-t) = t+rp-t = rp. B(p) = X(g)(p-g) where g = p-q for some prime q = p-g < p. q is the greatest prime divisor of A295185(p), so Sopfr(B(p)) = p. A(p) < B(p) if r and t exist such that (rp-t) is prime, with X(t)(rp-t) < X(g)(p-g). A(p) is computed from the list of possible values in the list of inequalities: 3(2p-3) < 2(3p-2) < 5(2p-5) < 2(5p-2) < ... < X(g)(p-g), selecting the first (smallest) value of (rp-t) which is prime. If such a term exists and is < X(p)(p-g), then A(p) < B(p) and p is in this sequence. Otherwise A(p) = B(p) = X(p)(p-g) and p is in A299760.

Examples

			k=12, prime(12)=37, A288189(37) = 213 < 248 = A295185(37). 37 is the smallest prime with this property, so a(1)=37.
		

Crossrefs

Programs

  • PARI
    sopfr(k) = my(f=factor(k)); sum(j=1, #f~, f[j, 1]*f[j, 2]);
    ap288189(p) = forcomposite(c=p, , if (!(sopfr(c) % p), return(c)));
    ap295185(p) = forcomposite(c=p, , if (sopfr(c) == p, return(c)));
    isokp(p) = (ap288189(p) < ap295185(p));
    lista(nn) = forprime(p=5, nn, if (isokp(p), print1(p, ", "))); \\ Michel Marcus, May 13 2018

Extensions

a(53) corrected by Georg Fischer, Mar 20 2022

A295185 a(n) is the smallest composite number whose prime divisors (with multiplicity) sum to prime(n); n >= 3.

Original entry on oeis.org

6, 10, 28, 22, 52, 34, 76, 184, 58, 248, 148, 82, 172, 376, 424, 118, 488, 268, 142, 584, 316, 664, 1335, 388, 202, 412, 214, 436, 3729, 508, 1048, 274, 2919, 298, 1208, 1256, 652, 1336, 1384, 358, 3801, 382, 772, 394, 6501, 7385, 892, 454, 916, 1864, 478, 5061, 2008, 2056, 2104, 538, 2168, 1108, 562, 5943, 9669
Offset: 3

Views

Author

David James Sycamore, Nov 16 2017

Keywords

Comments

Sequence is undefined for n=1,2 since no composites exist whose prime divisors sum to 2, 3. For n >= 3, a(n) = A288814(prime(n)) = prime(n-k)*B(prime(n) - prime(n-k)) where B=A056240, and k >= 1 is the "type" of prime(n), indicated as prime(n)~k(g1,g2,...,gk) where gi = prime(n-(i-1)) - prime(n-i); 1 <= i <= k. Thus: 5~1(2), 211~2(12,2), 4327~3(30,8,6) etc. The sequence relates to gaps between odd primes, and in particular to the sequence of k prime gaps below prime(n). The even-indexed terms of B are relevant, as are those of subsequences:
C=A288313, 2,4 plus terms B(n) where n-3 is prime (A298252),
D=A297150, terms B(n) where n-5 is prime and n-3 is composite (A297925) and
E=A298615, terms B(n) where both n-3 and n-5 are composite (A298366).
The above sequences of indices 2m form a partition of the even numbers and the corresponding terms B(2m) form a partition of the even-indexed terms of A056240. The union of D and E is the sequence A292081 = B-C.
Let g(n,t) = prime(n) - prime(n-t), t < n, and h(n,t) = g(n,t) - g(n,1), 1 < t < n. If g1=g(n,1) is a term in A298252 (g1-3 is prime), then B(g1) is a term in C, so k=1. If g1 belongs to A297925 or A298366 then B(g1) is a term in D or E and the value of k depends on subsequent gaps below prime(n), within a range dependent on g1.
Let range R1(g1) = u - g(n,1) where u is the index in B of the greatest term in C such that C(u) < B(g1). Let range R2(g1) = v-g(n,1) where v is the index in B of the greatest term in D such that D(v) <= B(g1). For all n, R2 < R1, and if g1 is a term in D then R2(g1)=0. Examples: R1(12)=2, R2(12)=0, R1(30)=26, R2(30)=6.
k >= 1 is the smallest integer such that B(g(n,k)) <= B(g(n,t)) for all t satisfying g1 <= g(n,t) <= g1 + R1(g1). For g1-3 prime, k=1. If g1-3 is composite, let z be least integer > 1 such that g(n,z)-3 is prime, and let w be least integer >= 1 such that g(n,w)-5 is prime. Then z "complies" if h(n,z) <= R1, and w "complies" if h(n,w) <= R2. If g1-5 is prime then R2=w=0 and only z is relevant.
B(g1) must belong to C,D or E. If in C (g1-3 is prime) then k=1. If in D (g1-5 is prime), k=z if z complies, otherwise k=1. If B(g1) is in E and z complies but not w then k=z, or if w complies but not z then k=w. If B(g1) is in E and z,w both comply then k=z if 3*(g(n,z)-3) < 5*(g(n,w)-5), otherwise k=w. If neither z nor w comply, then k=1.
Conjecture: For all n >= 3, a(n) >= A288189(n).

Examples

			5=prime(3), g(3,1)=5-3=2, a term in C; k=1, and a(3)=3*B(5-3)=3*2=6; 5~1(2).
17=prime(7), g(7,1)=17-13=4, a term in C; k=1, a(7)=13*B(17-13)=13*4=52; 17~1(4).
211=prime(47); g(47,1)=12, a term in D, R1=2, R2=0, k=z=2, a(47)=197*b(211-197)=197*33=6501; 211~2(12,2), and 211 is first prime of type k=2.
8923=prime(1109); g(1109,1)=30, a term in E. R1=26, R2=6, z=3 and w=2 both comply  but 3*(g(n,3)-3)=159 > 5*(g(n,2)-5)=155, so k=w=2. Therefore a(1109)=8887*b(8923-8887)=8887*b(36)=8887*155=1377485; 8923~2(30,6).
40343=prime(4232); g(4232,1)=54, a term in E. R1=58, R2=12,z=6 and w=3, both comply, 3*(g(n,z)-3)=309 and 5*(g(n,w)-5)=305 therefore k=w=3 and a(4232) = 40277*b(40343-40277)=40277*b(66)=40277*305=12284485; 40343~3(54,6,6).
81611=prime(7981); g(81611,1)=42, a term in D, R1=22, R2=0; z complies, k=z=6, a(7981)=81547*b(81611-81547)=81546*b(64)=81546*183=14923101; 81611~6(42,6,4,6,2,4) and is the first prime of type k=6.
If p is the greater of twin/cousin primes then p~1(2), p~1(4), respectively.
		

Crossrefs

Programs

  • Mathematica
    b[n_] := b[n] = Total[Times @@@ FactorInteger[n]];
    a[n_] := For[k = 2, True, k++, If[CompositeQ[k], If[b[k] == Prime[n], Return[k]]]];
    Table[a[n], {n, 3, 63}] (* Jean-François Alcover, Feb 23 2018 *)
  • PARI
    a(n) = { my(p=prime(n)); forcomposite(x=6, , my(f=factor(x)); if(f[, 1]~*f[, 2]==p, return(x))); } \\ Iain Fox, Dec 08 2017

Formula

a(n) = A288814(prime(n)) = prime(n-k)*A056240(prime(n) - prime(n-k)) for some k >= 1 and prime(n-k) = gpf(A288814(prime(n)).
a(n) >= A288189(n).
Showing 1-3 of 3 results.