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!)
A118506 Smaller of two consecutive Sophie Germain primes with the same digital sum. 1

%I #8 Aug 09 2015 15:33:29

%S 113,491,683,743,2549,3539,3803,3911,4019,4373,4391,4409,4481,5081,

%T 6113,6173,6563,6581,7103,7433,7823,9419,9539,10091,10163,10253,10313,

%U 10691,11813,12329,12653,13049,13463,14009,14081,14159,14303,15629,15773

%N Smaller of two consecutive Sophie Germain primes with the same digital sum.

%H Harvey P. Dale, <a href="/A118506/b118506.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n)=A005384(k): A007953(A005384(k))=A007953(A005384(k+1)) for some k. - _R. J. Mathar_, Jun 02 2006

%e 113 is in the sequence because it is a Sophie Germain prime and the next Sophie Germain prime (namely 131) has the same digital sum.

%p isA005384 := proc(n) RETURN(isprime(n) and isprime(2*n+1) ) ; end : A007953 := proc(n) local t1, t2; t1 := n; t2 := 0; while t1 <> 0 do t2 := t2 + (t1 mod 10); t1 := floor(t1/10); od: t2; end: A118506 := proc(pmax) local resul,n,p,opri ; resul := [] ; opri := 0 ; for n from 1 to pmax do p := ithprime(n) ; if isA005384(p) then if A007953(p) = A007953(opri) then resul := [op(resul),opri] ; fi ; opri := p ; fi ; end : RETURN(resul) ; end: A118506(4000) ; # _R. J. Mathar_, Jun 02 2006

%t Transpose[Select[Partition[Select[Prime[Range[2000]],PrimeQ[ 2#+1]&],2,1], Total[ IntegerDigits[#[[1]]]]==Total[IntegerDigits[#[[2]]]]&]][[1]] (* _Harvey P. Dale_, Jun 01 2015 *)

%Y Cf. A005384.

%K base,nonn

%O 1,1

%A Luc Stevens (lms022(AT)yahoo.com), May 06 2006

%E More terms from _R. J. Mathar_, Jun 02 2006

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 April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)