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!)
A321568 Least prime p such that p plus the sum of its digits is the n-th prime after p. 2

%I #15 Dec 18 2018 11:31:30

%S 11,19,37,59,97,55787,26699,663959,6974477,86966771,1095975857,

%T 4649574977,349685387573,988839709939,86396869388567

%N Least prime p such that p plus the sum of its digits is the n-th prime after p.

%C The other way round is not feasible because p minus the sum of its digits is never a prime but a multiple of 9.

%H Carlos Rivera, <a href="https://www.primepuzzles.net/puzzles/puzz_935.htm">Puzzle 935. pi+SOD(pi)=p(i+n)</a>, The Prime Puzzles and Problems Connection.

%e a(1) = 11 because 11 + 1 + 1 = 13 that is the first prime after 11.

%e a(2) = 19 because 19 + 1 + 9 = 29 that is the second prime after 19.

%p P:=proc(q) local a,b,c,d,n,x; x:=0; d:=[]; for n from 1 to q do

%p x:=nextprime(x); a:=x+convert(convert(x,base,10),`+`);

%p if isprime(a) then c:=0; b:=x; while b<a do b:=nextprime(b); c:=c+1; od;

%p if numboccur(c,d)=0 then d:=[op(d),c]; lprint(c,x,a); fi; fi;

%p od; end: P(10^13); # Terms not in order.

%t Array[Block[{p = 2}, While[p + Total@ IntegerDigits@ p != NextPrime[p, #], p = NextPrime@ p]; p] &, 8] (* _Michael De Vlieger_, Dec 17 2018 *)

%Y Cf. A000040, A007953, A321569, A321570.

%K base,nonn,more

%O 1,1

%A _Paolo P. Lava_, Dec 17 2018

%E a(12)-a(15) from _Giovanni Resta_, Dec 17 2018

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 16 16:13 EDT 2024. Contains 371749 sequences. (Running on oeis4.)