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.

A171130 Primes p such that sum of divisors of p+2 is prime.

This page as a plain text file.
%I A171130 #26 Aug 01 2024 18:08:17
%S A171130 2,7,23,727,2399,5039,7919,17159,28559,29927,85847,458327,552047,
%T A171130 579119,707279,1190279,3418799,3728759,4532639,5166527,5331479,
%U A171130 7447439,10374839,24137567,25877567,28398239,30260999,43546799,47458319,52258439,56957207,62425799
%N A171130 Primes p such that sum of divisors of p+2 is prime.
%C A171130 If p is a term then p+2 is a prime power with an even exponent (A056798). - _Amiram Eldar_, Aug 01 2024
%H A171130 Amiram Eldar, <a href="/A171130/b171130.txt">Table of n, a(n) for n = 1..10000</a>
%e A171130 2 is a term since it is a prime and sigma(2+2) = 7 is a prime.
%e A171130 7 is a term since it is a prime and sigma(7+2) = 13 is a prime.
%e A171130 23 is a term since it is a prime and sigma(23+2) = 31 is a prime.
%e A171130 727 is a term since it is a prime and sigma(727+2) = 1093 is a prime.
%p A171130 with(numtheory): A171130:=n->`if`(isprime(n) and isprime(sigma(n+2)), n, NULL): seq(A171130(n), n=1..10^5); # _Wesley Ivan Hurt_, Sep 30 2014
%t A171130 f[n_]:=Plus@@Divisors[n]; lst={};Do[p=Prime[n];If[PrimeQ[f[p+2]],AppendTo[lst,p]],{n,10!}];lst
%t A171130 Select[Prime[Range[700000]],PrimeQ[DivisorSigma[1,#+2]]&] (* _Harvey P. Dale_, Jun 23 2011 *)
%o A171130 (PARI) lista(nn) = forprime(p=2, nn, if (isprime(sigma(p+2)), print1(p, ", "))); \\ _Michel Marcus_, Sep 30 2014
%o A171130 (PARI) lista(kmax) = {my(p); for(k = 1, kmax, if(isprime(k) || isprimepower(k), p = k^2-2; if(isprime(p) && isprime(sigma(p+2)), print1(p, ", "))));} \\ _Amiram Eldar_, Aug 01 2024
%Y A171130 Cf. A000203, A056798.
%K A171130 nonn
%O A171130 1,1
%A A171130 _Vladimir Joseph Stephan Orlovsky_, Dec 04 2009
%E A171130 More terms from _Michel Marcus_, Sep 30 2014