Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Jan 16 2023 11:15:20
%S 2,3,5,7,11,17,29,41,43,71,79,97,101,107,113,191,193,197,223,227,229,
%T 263,269,293,311,313,317,349,359,401,419,431,457,463,503,521,599,643,
%U 659,661,691,733,757,773,809,823,827,839,881,887,911,1013,1019,1021
%N Suppose the sum of the digits of prime(n) and prime(n+1) divides prime(n) + prime(n+1). Sequence gives prime(n).
%H Robert Israel, <a href="/A127272/b127272.txt">Table of n, a(n) for n = 1..10000</a>
%e Sum of the digits of prime(25) = 97 is 16, sum of the digits of prime(26) = 101 is 2. 16+2 = 18, which divides 97+101 = 198 = 11*18. Hence prime(25) = 97 is a term.
%p q:= 2: sq:= 2:
%p R:= NULL: count:= 0:
%p while count < 100 do
%p p:= q; sp:= sq;
%p q:= nextprime(q); sq:= convert(convert(q,base,10),`+`);
%p if (p+q) mod (sp+sq) = 0 then
%p R:= R,p; count:= count+1;
%p fi
%p od:
%p R; # _Robert Israel_, Jan 15 2023
%t Prime[ Select[ Range[ 155 ], Mod[ Prime[ # ]+Prime[ #+1 ], Apply[ Plus, IntegerDigits[ Prime[ # ] ] ]+Apply[ Plus, IntegerDigits[ Prime[ #+1 ] ] ] ]==0& ] ] - Farideh Firoozbakht
%o (Magma) [ p: p in [ NthPrime(k): k in [1..172] ] | (p+q) mod (&+Intseq(p, 10) + &+Intseq(q, 10)) eq 0 where q is NextPrime(p) ]; /* _Klaus Brockhaus_, Mar 29 2007 */
%K nonn,base
%O 1,1
%A _J. M. Bergot_, Mar 27 2007
%E Edited and extended by _Klaus Brockhaus_ and _Farideh Firoozbakht_, Mar 29 2007