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.

A034049 Numbers with multiplicative digital root value 2.

Original entry on oeis.org

2, 12, 21, 26, 34, 37, 43, 62, 73, 112, 121, 126, 134, 137, 143, 162, 173, 211, 216, 223, 232, 261, 278, 279, 287, 297, 299, 314, 317, 322, 341, 367, 369, 371, 376, 389, 396, 398, 413, 431, 447, 469, 474, 496, 612, 621, 637, 639, 649, 666, 673, 693, 694, 713
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Crossrefs

Cf. A031347.
Cf. A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).

Programs

  • Maple
    A031347:= proc(n) local x;
      x:= n;
      while x > 10 do
        x:= convert(convert(x,base,10),`*`)
      od;
      x
    end proc:
    select(A031347=2, [$1..1000]); # Robert Israel, Jan 23 2023
  • Mathematica
    t = {}; n = 0; While[Length[t] < 100, n++; s = n; While[s > 10, s = Times @@ IntegerDigits[s]]; If[s == 2, AppendTo[t, n]]]; t (* T. D. Noe, Nov 15 2011 *)
  • PARI
    t(n) = {while(n>9, n=prod(i=1, #n=digits(n), n[i])); n};
    for(n=0, 1e3, if(t(n) == 2, print1(n", "))); \\ Altug Alkan, Oct 19 2015

Extensions

Incorrect formula removed by Martin Renner, Oct 19 2015