login
A118506
Smaller of two consecutive Sophie Germain primes with the same digital sum.
1
113, 491, 683, 743, 2549, 3539, 3803, 3911, 4019, 4373, 4391, 4409, 4481, 5081, 6113, 6173, 6563, 6581, 7103, 7433, 7823, 9419, 9539, 10091, 10163, 10253, 10313, 10691, 11813, 12329, 12653, 13049, 13463, 14009, 14081, 14159, 14303, 15629, 15773
OFFSET
1,1
LINKS
FORMULA
a(n)=A005384(k): A007953(A005384(k))=A007953(A005384(k+1)) for some k. - R. J. Mathar, Jun 02 2006
EXAMPLE
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.
MAPLE
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
MATHEMATICA
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 *)
CROSSREFS
Cf. A005384.
Sequence in context: A353957 A142850 A203722 * A341230 A109563 A142024
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), May 06 2006
EXTENSIONS
More terms from R. J. Mathar, Jun 02 2006
STATUS
approved