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!)
A127272 Suppose the sum of the digits of prime(n) and prime(n+1) divides prime(n) + prime(n+1). Sequence gives prime(n). 1
2, 3, 5, 7, 11, 17, 29, 41, 43, 71, 79, 97, 101, 107, 113, 191, 193, 197, 223, 227, 229, 263, 269, 293, 311, 313, 317, 349, 359, 401, 419, 431, 457, 463, 503, 521, 599, 643, 659, 661, 691, 733, 757, 773, 809, 823, 827, 839, 881, 887, 911, 1013, 1019, 1021 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
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.
MAPLE
q:= 2: sq:= 2:
R:= NULL: count:= 0:
while count < 100 do
p:= q; sp:= sq;
q:= nextprime(q); sq:= convert(convert(q, base, 10), `+`);
if (p+q) mod (sp+sq) = 0 then
R:= R, p; count:= count+1;
fi
od:
R; # Robert Israel, Jan 15 2023
MATHEMATICA
Prime[ Select[ Range[ 155 ], Mod[ Prime[ # ]+Prime[ #+1 ], Apply[ Plus, IntegerDigits[ Prime[ # ] ] ]+Apply[ Plus, IntegerDigits[ Prime[ #+1 ] ] ] ]==0& ] ] - Farideh Firoozbakht
PROG
(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 */
CROSSREFS
Sequence in context: A052284 A133670 A356627 * A238528 A113192 A077673
KEYWORD
nonn,base
AUTHOR
J. M. Bergot, Mar 27 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus and Farideh Firoozbakht, Mar 29 2007
STATUS
approved

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 May 8 19:26 EDT 2024. Contains 372341 sequences. (Running on oeis4.)