login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A351327 Numbers whose trajectory under iteration of the product of squares of nonzero digits map includes 1. 2

%I #51 Mar 18 2023 08:49:14

%S 1,5,10,11,15,25,50,51,52,100,101,105,110,111,115,125,150,151,152,205,

%T 215,250,251,255,357,375,455,500,501,502,510,511,512,520,521,525,537,

%U 545,552,554,573,735,753,1000,1001,1005,1010,1011,1015,1025,1050,1051

%N Numbers whose trajectory under iteration of the product of squares of nonzero digits map includes 1.

%C To determine whether a given number k is a term of this sequence, start with k, take the square of the product of its nonzero digits, apply the same process to the result, and continue until 1 is reached or a loop is entered. If 1 is reached, k is a term of this sequence.

%C Every power 10^k is a term of this sequence.

%C If k is a term, the numbers obtained by inserting zeros anywhere in k are terms.

%C If k is a term, the numbers obtained by inserting ones anywhere in k are terms.

%C If k is a term, each distinct permutation of the digits of k gives another term.

%C If k is a term, the number of iterations required to converge to 1 is less than or equal to 3 (conjectured).

%C From _Michael S. Branicky_, Feb 07 2022: (Start)

%C The product of squares of nonzero digits map, f, has fixed points given in A115385.

%C The map f has (at least) the following cycles:

%C - 324, 576, 44100, 256, 3600;

%C - 11664, 20736, 63504, 129600;

%C - 15876, 2822400, 65536, 7290000;

%C - 5308416, 8294400;

%C - 49787136000000, 64524128256, 849346560000, 386983526400, 55725627801600.

%C (End)

%H Luca Onnis, <a href="https://arxiv.org/abs/2203.03381">On a variant of the happy numbers and their generalizations</a>, arXiv:2203.03381 [math.GM], 2022.

%e 255 is a term of the sequence: the square of the product of its nonzero digits is (2*5*5)^2=2500, the square of the product of its nonzero digits is (2*5)^2=100, and the square of the product of its nonzero digits is 1^2=1.

%e 2 is not a term of the sequence because its trajectory under the map is 2 -> 4 -> 16 -> 36 -> 324 -> 576 -> 44100 -> 256 -> 3600 -> 324 (reached earlier), so it enters a loop and never reaches 1.

%p b:= proc() false end:

%p q:= proc(n) local m, s; m, s:= n, {};

%p do if m=1 then return true

%p elif m in s or b(m) then b(n):= true; return false

%p else s, m:= {s[], m}, mul(max(1, i)^2, i=convert(m, base, 10))

%p fi

%p od

%p end:

%p select(q, [$1..2000])[]; # _Alois P. Heinz_, Feb 11 2022

%t Select[Range[1000],

%t FixedPoint[

%t Product[ReplaceAll[0 -> 1][IntegerDigits[#]][[i]]^2, {i, 1,

%t Length[ReplaceAll[0 -> 1][IntegerDigits[#]]]}] &, #, 10] == 1 &]

%o (Python)

%o from math import prod

%o def psd(n): return prod(int(d)**2 for d in str(n) if d != "0")

%o def ok(n):

%o seen = set()

%o while n not in seen: # iterate until fixed point or in cycle

%o seen.add(n)

%o n = psd(n)

%o return n == 1

%o def aupto(n): return [k for k in range(1, n+1) if ok(k)]

%o print(aupto(1205)) # _Michael S. Branicky_, Feb 07 2022

%o (PARI) f(n) = vecprod(apply(d -> if (d, d^2, 1), digits(n)))

%o is(n) = { my (m=f(n)); while (1, if (n==1, return (1), n==m, return (0), n=f(n); m=f(f(m)))) } \\ _Rémy Sigrist_, Feb 11 2022

%Y Cf. A007770, A051801, A115385.

%K nonn,base

%O 1,2

%A _Luca Onnis_, Feb 07 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 11:35 EDT 2024. Contains 371912 sequences. (Running on oeis4.)