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.

A157678 Numbers k such that k + floor(average of digits of k) is prime.

Original entry on oeis.org

1, 12, 16, 27, 30, 34, 38, 41, 56, 63, 67, 70, 74, 89, 92, 96, 101, 102, 105, 107, 112, 125, 128, 130, 136, 146, 147, 154, 161, 164, 168, 175, 186, 188, 190, 193, 208, 210, 219, 226, 229, 231, 236, 237, 247, 254, 258, 265, 273, 276, 278, 280, 290, 305, 308, 309
Offset: 1

Views

Author

Kyle D. Balliet, Mar 04 2009

Keywords

Examples

			n = 89 -> 89 + floor((8+9)/2) = 89 + 8 = 97 (prime).
n = 190 -> 190 + floor((1+9+0)/3) = 190 + 3 = 193 (prime).
		

Crossrefs

Cf. A172367.

Programs

  • Maple
    a := proc (n) local nn: nn := convert(n, base, 10): if isprime(n+floor(add(nn[j], j = 1 .. nops(nn))/nops(nn))) = true then n else end if end proc: seq(a(n), n = 1 .. 350); # Emeric Deutsch, Mar 07 2009
  • PARI
    is(n)=isprime(sumdigits(n)\#digits(n)+n) \\ Charles R Greathouse IV, Dec 27 2013

Extensions

Corrected and extended by Emeric Deutsch, Mar 07 2009