login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #16 Sep 08 2022 08:45:29

%S 5,7,11,67,97,103,107,109,113,163,173,197,263,283,331,359,389,409,419,

%T 431,461,463,521,569,599,607,659,761,787,797,809,811,829,857,877,911,

%U 1019,1039,1061,1087,1093,1277,1283,1289,1301,1409,1427,1451,1481,1627

%N Suppose the sum of the prime factors of the composites between prime(n) and prime(n+1) is prime. Sequence gives prime(n).

%H Robert Israel, <a href="/A127269/b127269.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%e 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.

%e 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.

%p p:= 2: count:= 0: R:= NULL:

%p while count < 100 do

%p q:= nextprime(p);

%p v:= add(add(t[1]*t[2],t=ifactors(m)[2]),m=p+1..q-1);

%p if isprime(v) then count:= count+1; R:= R,p; fi;

%p p:= q;

%p od:

%p R; # _Robert Israel_, Oct 08 2020

%t 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 *)

%o (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 */

%Y Contains A338083.

%K nonn

%O 1,1

%A _J. M. Bergot_, Mar 27 2007

%E Edited, corrected and extended by _Klaus Brockhaus_, Mar 29 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 7 10:38 EDT 2024. Contains 375730 sequences. (Running on oeis4.)