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!)
A260796 Numbers n such that digit sum of prime(n) plus digit sum of prime(n+1) is prime. 1
1, 15, 37, 46, 47, 73, 91, 102, 107, 111, 118, 121, 123, 129, 161, 165, 187, 195, 197, 199, 203, 219, 239, 240, 242, 263, 275, 290, 292, 300, 326, 329, 357, 363, 388, 412, 416, 423, 426, 465, 470, 472, 504, 506, 539, 553, 565, 606, 611, 630, 641, 647, 660, 667 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(2) = 15: digit sum of prime(15) + digit sum of prime (16) = (4+7) + (5+3) = 19 which is prime.
a(3) = 37: digit sum of prime(37) + digit sum of prime (38) = (1+5+7) + (1+6+3) = 23 which is prime.
MAPLE
digsum:= n -> convert(convert(n, base, 10), `+`): select(n -> isprime(digsum(ithprime(n)) + digsum(ithprime(n+1))), [seq(k, k=1..10^3)]);
MATHEMATICA
Select[Range[1000], PrimeQ[Plus @@ (IntegerDigits[Prime[#]]) + Plus @@ (IntegerDigits[Prime[# + 1]])] &
Position[Total/@Partition[Total[IntegerDigits[#]]&/@Prime[Range[ 700]], 2, 1], _?PrimeQ] // Flatten (* Harvey P. Dale, Jun 09 2019 *)
PROG
(PARI) for(n = 1, 500, if(isprime(sumdigits(prime(n)) + sumdigits(prime(n+1))), print1(n, ", ")));
(Magma) [n : n in [1..500] | IsPrime(k) where k is (&+Intseq(NthPrime(n)) + &+Intseq(NthPrime(n+1))) ];
(Python)
from sympy import isprime, prime
A260796_list = [n for n in range(1, 10**5) if isprime(sum(int(d) for d in str(prime(n))+str(prime(n+1))))] # Chai Wah Wu, Aug 09 2015
CROSSREFS
Sequence in context: A293156 A329909 A118867 * A296179 A181362 A082112
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Aug 08 2015
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 April 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)