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.

A235600 a(n) = n/d(n) if d(n) divides n, otherwise a(n) = n, where d(n) is the sum of the digits of n (A007953).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 11, 4, 13, 14, 15, 16, 17, 2, 19, 10, 7, 22, 23, 4, 25, 26, 3, 28, 29, 10, 31, 32, 33, 34, 35, 4, 37, 38, 39, 10, 41, 7, 43, 44, 5, 46, 47, 4, 49, 10, 51, 52, 53, 6, 55, 56, 57, 58, 59, 10, 61, 62, 7, 64, 65, 66, 67, 68, 69, 10, 71, 8, 73, 74, 75, 76, 77, 78, 79, 10, 9, 82, 83, 7, 85
Offset: 1

Views

Author

N. J. A. Sloane, Jan 18 2014

Keywords

Crossrefs

Cf. A065517 (first differs at n=15).

Programs

  • Mathematica
    A235600[n_]:=With[{d=Total[IntegerDigits[n]]},If[Divisible[n,d],n/d,n]];
    Array[A235600,100] (* Paolo Xausa, Dec 06 2023 *)
  • PARI
    a(n) = my(s=sumdigits(n)); if (n % s, n, n/s); \\ Michel Marcus, Jul 15 2021