login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A127269
Suppose the sum of the prime factors of the composites between prime(n) and prime(n+1) is prime. Sequence gives prime(n).
2
5, 7, 11, 67, 97, 103, 107, 109, 113, 163, 173, 197, 263, 283, 331, 359, 389, 409, 419, 431, 461, 463, 521, 569, 599, 607, 659, 761, 787, 797, 809, 811, 829, 857, 877, 911, 1019, 1039, 1061, 1087, 1093, 1277, 1283, 1289, 1301, 1409, 1427, 1451, 1481, 1627
OFFSET
1,1
LINKS
EXAMPLE
Prime(4) = 7, prime(5) = 11. Sum of prime factors of 8 is 2+2+2 = 6, sum of prime factors of 9 is 3+3 = 6, sum of prime factors of 10 is 2+5= 7; 6+6+7 = 19 is prime, hence prime(4) = 7 is a term.
Prime(19) = 67, prime(20) = 71. Sum of prime factors of 68, 69, 70 is resp. 2+2+17 = 21, 3+23 = 26, 2+5+7 = 14; 21+26+14 = 61 is prime, hence prime(19) = 67 is a term.
Prime(26) = 101, prime(27) = 103. Sum of prime factors of 102 = 2*3*17 is 22, which is composite. Hence prime(26) = 101 is not in the sequence.
MAPLE
p:= 2: count:= 0: R:= NULL:
while count < 100 do
q:= nextprime(p);
v:= add(add(t[1]*t[2], t=ifactors(m)[2]), m=p+1..q-1);
if isprime(v) then count:= count+1; R:= R, p; fi;
p:= q;
od:
R; # Robert Israel, Oct 08 2020
MATHEMATICA
spfQ[n_]:=Module[{strt=First[n]+1, end=Last[n]-1}, PrimeQ[Total[Times@@@ Flatten[ FactorInteger[ Range[ strt, end]], 1]]]]; Transpose[Select[ Partition[ Prime[ Range[300]], 2, 1], spfQ]][[1]] (* Harvey P. Dale, May 06 2011 *)
PROG
(Magma) [ p: p in [ NthPrime(k): k in [2..258] ] | IsPrime(&+[ &+[ k[1]*k[2]: k in Factorization(c) ]: c in [p+1..NextPrime(p)-1] ] ) ]; /* Klaus Brockhaus, Mar 29 2007 */
CROSSREFS
Contains A338083.
Sequence in context: A045968 A066367 A098036 * A071781 A091509 A027728
KEYWORD
nonn
AUTHOR
J. M. Bergot, Mar 27 2007
EXTENSIONS
Edited, corrected and extended by Klaus Brockhaus, Mar 29 2007
STATUS
approved