cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A239790 #40 Aug 28 2025 10:29:41
%S A239790 11,41,41,191,402131,6340271501
%N A239790 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 A239790 a(7), if it exists, is larger than 2*10^14. - _Giovanni Resta_, Apr 03 2014
%C A239790 a(7) <= 101100010001001200110001. - _Jens Kruse Andersen_, Aug 28 2016
%C A239790 a(7) <= 1212030150560200001. - _Oscar Volpatti_, Aug 25 2025
%H A239790 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 A239790 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_1229.htm">Puzzle 1229. Set of consecutive primes such that...</a>, The Prime Puzzles & Problems Connection.
%H A239790 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> [Broken link]
%H A239790 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 A239790 a(4)=191 because 191, 193, 197, 199 generates 11, 13, 17, 19.
%e A239790 a(5)=402131 because 402131, 402133, 402137, 402139, 402197 generates 11,13,17,19,23.
%o A239790 (UBASIC)
%o A239790    10   P=7:KM=0:'puzzle 1290, Meller
%o A239790    20   P=nxtprm(P):if P>2^32-20 then end
%o A239790    30   gosub *K:if K<=KM then goto 20
%o A239790    40   print K,P,Q1:KM=K:goto 20
%o A239790   100   *K
%o A239790   110   Z=P:gosub *SODZ
%o A239790   120   if SODZ<>prmdiv(SODZ) then return
%o A239790   130   K=1:Q=SODZ:Q1=Q
%o A239790   140   Z=nxtprm(Z):gosub *SODZ
%o A239790   150   if SODZ<>nxtprm(Q) then return
%o A239790   160   K=K+1:Q=nxtprm(Q):goto 140
%o A239790   200   *SODZ:SODZ=0:L=alen(Z)
%o A239790   210   for I=1 to L:D=val(mid(str(Z),I+1,1))
%o A239790   220   SODZ=SODZ+D:next I
%o A239790   230   return
%o A239790 (PARI) isok(p, n) = if ((p > 10) && isprime(p), my(v=vector(n)); v[1] = p; for (i=2, n, v[i] = nextprime(v[i-1]+1);); my(vs=vector(n, i, sumdigits(v[i]))); if (!isprime(vs[1]), return(0)); for (i=2, n, if (vs[i] != nextprime(vs[i-1]+1), return(0));); return(1););
%o A239790 a(n) = my(k=1); while (!isok(k, n), k++); k; \\ _Michel Marcus_, Aug 28 2025
%Y A239790 Cf. A007953, A046704, A240598.
%K A239790 nonn,base,hard,more,changed
%O A239790 1,1
%A A239790 _Carlos Rivera_, Mar 26 2014
%E A239790 a(6) from _Giovanni Resta_, Apr 03 2014