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.

A069661 Smallest n-digit prime with maximum digit sum.

Original entry on oeis.org

7, 89, 997, 8999, 98999, 989999, 9899999, 89999999, 998999999, 9899989999, 98999999999, 999998999999, 8998999999999, 99899999999999, 999999899999999, 9998999999999999, 99999999999899999, 999998999999999999, 9998999999999999999, 89999999999999999999
Offset: 1

Views

Author

Amarnath Murthy, Apr 05 2002

Keywords

Crossrefs

a(n) = A069662(n) for these n <= 20: 1, 2, 3, 4, 6, 7, 9, 17 and 19. a(5) = Reverse(A069662(5)).

Programs

  • Mathematica
    Table[max=0; Do[p=Prime[i]; If[Total[IntegerDigits[p]] > Total[IntegerDigits[max]], max=p], {i,PrimePi[10^n]+1, PrimePi[10^(n+1)]}]; max, {n,0,7}] (* Jayanta Basu, May 19 2013 *)

Extensions

Corrected and extended by Rick L. Shepherd, Jul 15 2002. a(5) through a(20) have been certified prime with Primo.