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.

A304367 Numbers n with additive persistence = 2.

Original entry on oeis.org

19, 28, 29, 37, 38, 39, 46, 47, 48, 49, 55, 56, 57, 58, 59, 64, 65, 66, 67, 68, 69, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 109, 118, 119, 127, 128, 129, 136, 137, 138, 139, 145, 146, 147, 148, 149, 154
Offset: 1

Views

Author

Jaroslav Krizek, May 11 2018

Keywords

Comments

First deviation from A298638 is at a(161); a(161) = 299, A298638(161) = 307.

Examples

			Repeatedly taking the sum of digits starting with 19 gives 10 and then 1. There are two steps, so the additive persistence is 2, and 19 is a member. - _Michael B. Porter_, May 16 2018
		

Crossrefs

Cf. A031286.
Cf. Numbers with additive persistence k: A304366 (k=1), A304368 (k=3), A304373 (k=4).

Programs

  • Mathematica
    Select[Range@ 160, Length@ FixedPointList[Total@ IntegerDigits@ # &, #] == 4 &] (* Michael De Vlieger, May 14 2018 *)
  • PARI
    nb(n) = {my(nba = 0); while (n > 9, n = sumdigits(n); nba++); nba;}
    isok(n) = nb(n) == 2; \\ Michel Marcus, May 13 2018

Formula

A031286(a(n)) = 2.