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.

A054750 Smallest prime number whose digits sum to n-th prime.

Original entry on oeis.org

2, 3, 5, 7, 29, 67, 89, 199, 599, 2999, 4999, 29989, 59999, 79999, 389999, 989999, 6999899, 8989999, 59899999, 89999999, 289999999, 799999999, 3999998999, 19999997999, 79999999999, 399999998999, 599999899999, 999998999999
Offset: 1

Views

Author

G. L. Honaker, Jr., Apr 24 2000

Keywords

Comments

a(n) >= A051885(A000040(n)). Indices n for which the equality holds are listed in A055019.
a(n) >= A046864(n). - Michel Marcus, Nov 01 2015

Examples

			a(7)=89 because 8+9=17 and 17 is the 7th prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{k=2}, While[DigitSum[k]!=Prime[n], k=NextPrime[k]]; k]; Array[a,15] (* Stefano Spezia, Mar 27 2025 *)
  • PARI
    a(n) = {my(k=2); my(p=prime(n)); while((sumdigits(k) != prime(n)), k=nextprime(k+1)); k;} \\ Michel Marcus, Nov 01 2015

Extensions

More terms from Kok Seng Chua (chuaks(AT)ihpc.nus.edu.sg), May 31 2000
Edited and extended by Robert G. Wilson v, Feb 26 2002