login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
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 * A085557 A125665 A046034
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Dec 28 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 20 10:34 EDT 2024. Contains 375325 sequences. (Running on oeis4.)