|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|