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.

A320881 Numbers equal to a prime plus its digit sum.

Original entry on oeis.org

4, 6, 10, 13, 14, 17, 25, 28, 29, 35, 40, 46, 47, 50, 58, 61, 68, 73, 79, 80, 83, 94, 95, 103, 106, 107, 113, 115, 118, 119, 136, 137, 148, 152, 158, 163, 170, 173, 181, 184, 191, 196, 202, 206, 214, 215, 218, 230, 238, 241, 242, 248, 253, 259, 271, 274, 281, 286, 292, 293, 296, 307, 316
Offset: 1

Views

Author

M. F. Hasler, Nov 08 2018

Keywords

Comments

Sequence A048520 lists the primes in this sequence.

Examples

			a(1) = 4 = 2 + 2 = (the smallest prime, 2 = prime(1)) + (digit sum of 2).
Similarly, a({2, 3, 5}) = 2*prime({2, 3, 4}), since the digit sum of single-digit primes is the prime itself.
a(4) = 13 = 11 + (1 + 1) = A048520(1), the first prime in this sequence.
a(6) = 17 = 13 + (1 + 3) = A048520(2), the second prime in this sequence.
		

Crossrefs

Cf. A062028 (n + its digit sum), A047791 (A062028(n) is prime), A048519 (primes in A047791).

Programs

  • PARI
    is_A320881(n)=select(p->p+sumdigits(p)==n, primes([n-9*#digits(n), n-2])) \\ Returns the list of all "solutions"; this has the boolean value of true iff the list is nonempty. - M. F. Hasler, Nov 08 2018