login

Revision History for A074871

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
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.
(history; published version)
#10 by Jon E. Schoenfield at Sun Jul 19 01:17:07 EDT 2015
STATUS

editing

approved

#9 by Jon E. Schoenfield at Sun Jul 19 01:17:05 EDT 2015
COMMENTS

The first occurrence of k beginning with 0: 1, 2, 17, 59, 337, 779, 16999, 6888888, ..., . [From _- _Robert G. Wilson v_, Oct 20 2010]

EXAMPLE

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] [From _(* _Robert G. Wilson v_, Oct 20 2010] *)

STATUS

approved

editing

#8 by N. J. A. Sloane at Fri Oct 11 20:35:44 EDT 2013
STATUS

proposed

approved

#7 by Jon E. Schoenfield at Fri Oct 11 18:32:42 EDT 2013
STATUS

editing

proposed

#6 by Jon E. Schoenfield at Fri Oct 11 18:32:41 EDT 2013
AUTHOR

_Felice Russo (felice.russo(AT)katamail.com), _, Sep 12 2002, Oct 11 2010

STATUS

approved

editing

#5 by N. J. A. Sloane at Wed May 01 21:13:43 EDT 2013
EXTENSIONS

Edited by _N. J. A. Sloane, _, Oct 12 2010

Discussion
Wed May 01
21:13
OEIS Server: https://oeis.org/edit/global/1903
#4 by Russ Cox at Fri Mar 30 17:30:50 EDT 2012
COMMENTS

The first occurrence of k beginning with 0: 1, 2, 17, 59, 337, 779, 16999, 6888888, ..., . [From _Robert G. Wilson v (rgwv(AT)rgwv.com), _, Oct 20 2010]

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] [From _Robert G. Wilson v (rgwv(AT)rgwv.com), _, Oct 20 2010]

EXTENSIONS

More terms from _Robert G. Wilson v (rgwv(AT)rgwv.com), _, Oct 20 2010

Discussion
Fri Mar 30
17:30
OEIS Server: https://oeis.org/edit/global/156
#3 by N. J. A. Sloane at Wed Nov 10 03:00:00 EST 2010
DATA

0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 0, 1, 0, 1, 2, 1, 3, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 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

COMMENTS

The first occurrence of k beginning with 0: 1, 2, 17, 59, 337, 779, 16999, 6888888, ..., . [From Robert G. Wilson v (rgwv(AT)rgwv.com), Oct 20 2010]

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] [From Robert G. Wilson v (rgwv(AT)rgwv.com), Oct 20 2010]

KEYWORD

easy,nonn,base,more,new

EXTENSIONS

More terms from Robert G. Wilson v (rgwv(AT)rgwv.com), Oct 20 2010

#2 by N. J. A. Sloane at Wed Oct 20 03:00:00 EDT 2010
NAME

Number Start with n and repeatedly apply the map k -> T(k) = A053837(k) + A171765(k); a(n) is the number of steps needed to reach (at least one) until a prime when the map S(n)+M(n) is applied to n; reached, or 0 if a no prime is never ever reached. Here S(n) and M(N) mean the sum and the product of the digits of n in base 10.

EXAMPLE

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

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

CROSSREFS

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

KEYWORD

easy,nonn,base,more,new

AUTHOR

Felice Russo (felice.russo(AT)katamail.com), Sep 12 2002, Oct 11 2010

EXTENSIONS

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

#1 by N. J. A. Sloane at Fri May 16 03:00:00 EDT 2003
NAME

Number of steps needed to reach a prime when the map S(n)+M(n) is applied to n; 0 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.

DATA

0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 0, 1, 0, 1, 2, 1, 3, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 0, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 1

OFFSET

1,17

EXAMPLE

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

KEYWORD

easy,nonn,base

AUTHOR

Felice Russo (felice.russo(AT)katamail.com), Sep 12 2002

STATUS

approved