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.

A127305 Primes p such that p + (sum of the prime factors of p-1) + (sum of prime factors of p+1) is prime.

This page as a plain text file.
%I A127305 #33 Sep 08 2022 08:45:29
%S A127305 2,13,47,71,101,151,193,239,241,293,331,337,359,383,397,401,421,463,
%T A127305 487,557,577,709,773,797,821,929,1019,1031,1069,1093,1103,1181,1217,
%U A127305 1249,1327,1367,1423,1499,1571,1759,1787,1789,1831,1871,1877,1913,1933,2053
%N A127305 Primes p such that p + (sum of the prime factors of p-1) + (sum of prime factors of p+1) is prime.
%C A127305 The primes are taken "with multiplicity".
%H A127305 Harvey P. Dale, <a href="/A127305/b127305.txt">Table of n, a(n) for n = 1..1000</a> (updated by _Robert Israel_, May 25 2022)
%e A127305 2 is a term, since 2 + 0 + 3 = 5 is a prime.
%e A127305 13 is a term since 13 + (2+2+3) + (2+7) = 29 is prime, i.e. the prime factors are added with multiplicity.
%e A127305 151 is prime, 150 = 2*3*5*5, 152 = 2*2*2*19. 151 + 2+3+5+5 + 2+2+2+19 = 191 is prime, hence 151 is a term.
%p A127305 spf:= proc(n) local t; add(t[1]*t[2], t = ifactors(n)[2]) end proc:
%p A127305 filter:= proc(p) isprime(p) and isprime(p+spf(p-1)+spf(p+1)) end proc:
%p A127305 select(filter, [$2..10000]); # _Robert Israel_, May 25 2022
%t A127305 pspfQ[n_] := PrimeQ[n + Total[Flatten[Table[#[[1]], {#[[2]]}] & /@ Flatten[FactorInteger[n + {1,-1}], 1] ] ] ]; {2}~Join~Select[Prime[Range[400]], pspfQ] (* _Harvey P. Dale_, Jan 08 2015, corrected by _Michael De Vlieger_, May 25 2022 *)
%o A127305 (Magma) [ p: p in PrimesInInterval(3, 2100) | IsPrime(&+[ &+[ k[1]*k[2]: k in Factorization(n)]: n in [p-1..p+1] ] ) ]; /* _Klaus Brockhaus_, Apr 06 2007 */
%Y A127305 Cf. A210934, A210936.
%K A127305 nonn
%O A127305 1,1
%A A127305 _J. M. Bergot_, Mar 28 2007
%E A127305 Edited and extended by _Klaus Brockhaus_, Apr 06 2007
%E A127305 Edited by _N. J. A. Sloane_, May 25 2022