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.

A028835 Numbers whose iterated sum of digits is a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 12, 14, 16, 20, 21, 23, 25, 29, 30, 32, 34, 38, 39, 41, 43, 47, 48, 50, 52, 56, 57, 59, 61, 65, 66, 68, 70, 74, 75, 77, 79, 83, 84, 86, 88, 92, 93, 95, 97, 101, 102, 104, 106, 110, 111, 113, 115, 119, 120, 122, 124, 128, 129, 131, 133, 137, 138, 140, 142, 146, 147, 149, 151, 155, 156
Offset: 1

Views

Author

Keywords

Comments

Also numbers k such that k mod 9 is an element of {2,3,5,7}. Hence as n tends to infinity, a(n)/n converges to 9/4 quite rapidly. - Stefan Steinerberger, Apr 23 2006

Examples

			38 -> 3 + 8 = 11 -> 1 + 1 = 2 is a prime.
		

Crossrefs

Programs

  • Haskell
    import Data.List (findIndices)
    a028835 n = a028835_list !! (n-1)
    a028835_list = findIndices (`elem` [2,3,5,7]) $ map a010888 [0..]
    -- Reinhard Zumkeller, Oct 21 2011
  • Mathematica
    Select[Range[200], PrimeQ[Mod[ #, 9]] &] (* Stefan Steinerberger, Apr 23 2006 *)

Extensions

Extended (and corrected) by Scott Lindhurst (ScottL(AT)alumni.princeton.edu)