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.

A103548 a(n) is the largest n-digit zeroless prime such that the sum of the two numbers that result from splitting a(n) between any two of its digits is a distinct prime.

Original entry on oeis.org

89, 863, 8821, 68683, 864883, 6866683
Offset: 2

Views

Author

Ray G. Opao, Mar 23 2005

Keywords

Comments

There is no such 8-digit prime, i.e., the sequence ends at a(7) -- although in theory a(n) might exist for some n > 8. - Hagen von Eitzen, Jun 02 2009
A term must have the last digit coprime to 10 (odd and not divisible by 5), the others from {2, 4, 6, 8}. - David A. Corneth, Aug 28 2023

Examples

			a(4) = 8821:
  8 + 821 = 829, which is prime;
  88 + 21 = 109, which is prime;
  882 + 1 = 883, which is prime;
and no larger 4-digit number has this property.
		

Crossrefs

Cf. A038618.

Programs

  • PARI
    a(n) = {my(lds = [9,7,3,1], s = (10^n\9-1)*10); forvec(x = vector(n-1,i,[1,4]), b = s - 20*fromdigits(Vec(x)); for(j = 1, #lds, if(iscan(b + lds[j]), return(b + lds[j])))); -1}
    
  • PARI
    iscan(n) = {if(n%3 == 0, return(0)); if(!isprime(n), return(0)); my(l = List(), lp, rp, qd = #digits(n-1)); for(i = 1, qd, rp = n % 10^i; lp = n \ 10^i; if(!isprime(rp + lp), return(0), listput(l, rp + lp))); #Set(l) == qd} \\ David A. Corneth, Aug 28 2023

Extensions

Last terms a(6) and a(7) from Hagen von Eitzen, Jun 02 2009