login
The smallest multidigit prime of a sequence of n consecutive primes such that their digit sums are also a sequence of n consecutive primes.
2

%I #22 Nov 13 2019 16:34:05

%S 11,41,41,191,402131,6340271501

%N The smallest multidigit prime of a sequence of n consecutive primes such that their digit sums are also a sequence of n consecutive primes.

%C a(7), if it exists, is larger than 2*10^14. - _Giovanni Resta_, Apr 03 2014

%C a(7) <= 101100010001001200110001. - _Jens Kruse Andersen_, Aug 28 2016

%H Números y Algo Más <a href="http://simplementenumeros.blogspot.mx/2014/03/1290-primos-cuya-suma-digital-dan-primos.html">Primos cuya suma digital dan primos</a>

%H B. Sindelar, <a href="https://groups.yahoo.com/neo/groups/primenumbers/conversations/topics/25924">Two Sets of Consecutive Primes and their Sum of Digits Connection</a>

%H Bill Sindelar, Jens Kruse Andersen, Marian Otremba, <a href="/A239790/a239790.txt">Two Sets of Consecutive Primes and their Sum of Digits Connection</a>, digest of 12 messages in primenumbers Yahoo group, Aug 26 - Aug 30, 2016.

%e a(4)=191 because 191, 193, 197, 199 generates 11, 13, 17, 19.

%e a(5)=402131 because 402131, 402133, 402137, 402139, 402197 generates 11,13,17,19,23.

%o (UBASIC)

%o 10 P=7:KM=0:'puzzle 1290, Meller

%o 20 P=nxtprm(P):if P>2^32-20 then end

%o 30 gosub *K:if K<=KM then goto 20

%o 40 print K,P,Q1:KM=K:goto 20

%o 100 *K

%o 110 Z=P:gosub *SODZ

%o 120 if SODZ<>prmdiv(SODZ) then return

%o 130 K=1:Q=SODZ:Q1=Q

%o 140 Z=nxtprm(Z):gosub *SODZ

%o 150 if SODZ<>nxtprm(Q) then return

%o 160 K=K+1:Q=nxtprm(Q):goto 140

%o 200 *SODZ:SODZ=0:L=alen(Z)

%o 210 for I=1 to L:D=val(mid(str(Z),I+1,1))

%o 220 SODZ=SODZ+D:next I

%o 230 return

%Y Cf. A007953, A046704, A240598.

%K nonn,base,hard

%O 1,1

%A _Carlos Rivera_, Mar 26 2014

%E a(6) from _Giovanni Resta_, Apr 03 2014