login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A171772 Number of steps needed to reach a prime when the map S(n)+M(n) is applied to n, or -1 if a prime is never reached. Here S(n) and M(N) mean the sum and the product of the digits of n in base 10. 1
1, 0, 0, 3, 0, 2, 0, 2, 2, 2, 0, 1, 0, 3, 1, 1, 0, 1, 0, 1, 1, 3, 0, 4, 1, 2, 1, 3, 0, 1, 0, 1, 2, 1, 1, 2, 0, 2, -1, 4, 0, 4, 0, 5, 1, 2, 0, 6, -1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 0, 3, 0, 2, 2, 2, 1, 7, 0, 3, -1, 1, 0, 1, 0, -1, 1, 3, 3, 1, 0, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

a(n)=0 if n is a prime.

LINKS

Table of n, a(n) for n=1..80.

EXAMPLE

Example: a(4)=3 because 4->8->16->13 is prime.

Example: a(39)=-1 because 39 -> 39 ->39 .. never reaches a prime.

Example: a(49)=-1 because 49 -> 49 ->49 .. never reaches a prime.

Example: a(69)=-1 because 69 -> 69 ->69 .. never reaches a prime.

Example: a(74)=-1 because 74 -> 39 ->39 .. never reaches a prime.

a(28)=3 because 28 ->26 ->20 ->2

CROSSREFS

A variant of A074871.

Cf. A007954, A053837, A061762.

Sequence in context: A260737 A059339 A241181 * A092735 A035464 A194669

Adjacent sequences:  A171769 A171770 A171771 * A171773 A171774 A171775

KEYWORD

base,easy,sign

AUTHOR

R. J. Mathar, Oct 12 2010

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 20 05:01 EDT 2019. Contains 324229 sequences. (Running on oeis4.)