login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A340112
Prime-acronym numbers: sums of primes which also equal the concatenation of the initial digits of these primes.
1
2, 3, 5, 7, 21, 32, 117, 119, 127, 131, 132, 133, 135, 137, 139, 149, 151, 157, 169, 171, 172, 173, 175, 177, 179, 187, 211, 212, 213, 215, 217, 218, 221, 231, 232, 233, 235, 237, 251, 253, 271, 272, 273, 275, 277, 281, 311, 319, 321, 322, 323, 325, 327, 329, 331
OFFSET
1,1
LINKS
Eric Angelini, Sum of peculiar primes, math-fun mailing list, Dec 24, 2020.
EXAMPLE
Single-digit primes trivially satisfy the constraint.
21 is the sum and also concatenation of the initial digits of the primes 2 and 19.
32 is the sum and also concatenation of the initial digits of the primes 3 and 29.
117 is the sum and also concatenation of the initial digits of the primes 19, 19 and 79.
PROG
(PARI) is_A340112(n, d=digits(n), nd=if(vecmin(d), #d))={ /* Check whether n is the sum of primes starting with the digits d[1..nd], respectively. If there's a zero digit, return 0. If there's a single digit left, n must be a prime starting with d[1] */ nd<2 && return(isprime(n) && nd && d[1]==digits(n)[1]); /* else subtract from n a prime p starting with digit d[nd]; check n-p with digits d[1 .. nd-1] */ for( e= !isprime(d[nd]), logint(n, 10), forprime( p=d[nd]*10^e, min(n-vecsum(d[^-1]), (d[nd]+1)*10^e-1), self()(n-p, d[^-1], nd-1) && return(1)))}
CROSSREFS
Cf. A340113 for the subset of primes in this sequence.
Sequence in context: A162948 A024768 A024769 * A376776 A085557 A125665
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Dec 28 2020
STATUS
approved