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.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

11, 41, 41, 191, 402131, 6340271501
Offset: 1

Views

Author

Carlos Rivera, Mar 26 2014

Keywords

Comments

a(7), if it exists, is larger than 2*10^14. - Giovanni Resta, Apr 03 2014
a(7) <= 101100010001001200110001. - Jens Kruse Andersen, Aug 28 2016
a(7) <= 1212030150560200001. - Oscar Volpatti, Aug 25 2025

Examples

			a(4)=191 because 191, 193, 197, 199 generates 11, 13, 17, 19.
a(5)=402131 because 402131, 402133, 402137, 402139, 402197 generates 11,13,17,19,23.
		

Crossrefs

Programs

  • 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););
    a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Aug 28 2025
  • UBASIC
    10   P=7:KM=0:'puzzle 1290, Meller
       20   P=nxtprm(P):if P>2^32-20 then end
       30   gosub *K:if K<=KM then goto 20
       40   print K,P,Q1:KM=K:goto 20
      100   *K
      110   Z=P:gosub *SODZ
      120   if SODZ<>prmdiv(SODZ) then return
      130   K=1:Q=SODZ:Q1=Q
      140   Z=nxtprm(Z):gosub *SODZ
      150   if SODZ<>nxtprm(Q) then return
      160   K=K+1:Q=nxtprm(Q):goto 140
      200   *SODZ:SODZ=0:L=alen(Z)
      210   for I=1 to L:D=val(mid(str(Z),I+1,1))
      220   SODZ=SODZ+D:next I
      230   return
    

Extensions

a(6) from Giovanni Resta, Apr 03 2014

A241525 a(n) is the smallest start of a run of exactly n consecutive primes such that the sum of the digits of each prime is composite.

Original entry on oeis.org

19, 17, 13, 521, 509, 503, 499, 491, 14153, 25793, 25771, 37663, 37657, 98729, 98717, 98713, 98711, 98689, 98669, 98663, 98641, 98639, 98627, 98621, 98597, 98573, 69794393, 69794383, 268684679, 268684651, 268684627, 329788829, 545497787, 545497769, 545497759, 545497753, 545497747, 545497741, 545497727, 545497723, 545497691, 545497681, 545497679, 545497637, 545497633, 545497609
Offset: 1

Views

Author

Carlos Rivera, Apr 24 2014

Keywords

Comments

No more terms below 2^32

Examples

			a(3)=13 because the run of the 3 consecutive primes {13, 17, 19} is such that the sum of digits for each prime is {4, 8, 10}.
		

Crossrefs

Cf. A240598.

Programs

  • UBASIC
    10   P=1:KM=0:K=0:'puzzle 1290, Meller
       20   P=nxtprm(P):if P>2^32-20 then end
       30   gosub *SODP:if S<>prmdiv(S) then K=K+1:Q=P:goto 20
       40   if K>KM then print K, Q:KM=K
       50   K=0:goto 20
      200   *SODP:S=0:L=alen(P)
      210   for I=1 to L:D=val(mid(str(P), I+1, 1))
      220   S=S+D:next I
      230   return
Showing 1-2 of 2 results.