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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A074871 Start with n and repeatedly apply the map k -> T(k) = A053837(k) + A171765(k); a(n) is the number of steps (at least one) until a prime is reached, or 0 if no prime is ever reached. 2
0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 0, 1, 0, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 0, 0, 0, 1, 0, 1, 0, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 0, 1, 2, 2, 0, 1, 3, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 0, 1, 2, 2, 2, 1, 2, 1, 2, 1, 0, 0, 1, 1, 2, 3, 1, 2, 1, 1, 0, 1, 1, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,17

COMMENTS

The first occurrence of k beginning with 0: 1, 2, 17, 59, 337, 779, 16999, 6888888, ..., . - Robert G. Wilson v, Oct 20 2010

LINKS

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

EXAMPLE

T(2)=2. So in one step we reach a prime.

T(3)=3 and then in one step again we reach a prime.

T(4)=4 and we will never reach a prime.

T(11)=1+2=3 and again in one step we reach a prime.

T(17)=7+8=15 --> T(15)=5+6=11 and then in two steps we reach a prime.

T(13)=3+4=7 and then 1 step......

T(14)=4+5=9 --> T(9)=9 --> T(9)=9........ and we will never reach a prime.

MATHEMATICA

g[n_] := Block[{id = IntegerDigits@ n}, Mod[ Plus @@ id, 10] + If[n < 10, 0, Times @@ id]]; f[n_] := Block[{lst = Rest@ NestWhileList[g, n, UnsameQ, All]}, lsp = PrimeQ@ lst; If[ Last@ Union@ lsp == False, 0, Position[lsp, True, 1, 1][[1, 1]]]]; Array[f, 105] (* Robert G. Wilson v, Oct 20 2010 *)

CROSSREFS

Cf. A053837, A171765. See A171772 for another version.

Sequence in context: A141702 A259896 A113313 * A182641 A099200 A093578

Adjacent sequences:  A074868 A074869 A074870 * A074872 A074873 A074874

KEYWORD

easy,nonn,base

AUTHOR

Felice Russo, Sep 12 2002, Oct 11 2010

EXTENSIONS

Edited by N. J. A. Sloane, Oct 12 2010

More terms from Robert G. Wilson v, Oct 20 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 17 19:40 EST 2017. Contains 294834 sequences.