OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
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
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