Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A037281
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A037281 Number of iterations of transformation in A037280 needed to reach 1 or a prime, or -1 if no such number exists. +0
2
0, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0 (list; graph; listen)
OFFSET

1,10

MAPLE

with(numtheory):ds:=proc(s) local j: RETURN(add(s[j]*10^(j-1), j=1..nops(s))):end: a:=proc(n) options remember: local d, i, l, m: if n<3 then RETURN(1) else if not isprime(n) then d:=divisors(n): l:=nops(d): m:=ds([seq(op(convert(d[l-i+1], base, 10)), i=2..l-1)]): RETURN(m/piecewise(m mod 2=1, 1, 2^(ifactors(m)[2][1][2]))) else RETURN(n) fi fi: end; for n from 1 to 11 do m:=n: for i from 0 while(not isprime(m) and m<>1) do m:=a(m) od: printf("%d, ", i) od: (Ronaldo)

CROSSREFS

Cf. A037279.

Sequence in context: A118269 A131038 A137979 this_sequence A118626 A062892 A118553

Adjacent sequences: A037278 A037279 A037280 this_sequence A037282 A037283 A037284

KEYWORD

nonn,base,more

AUTHOR

njas

EXTENSIONS

Corrected by C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 29 2004

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified July 6 17:22 EDT 2008. Contains 140988 sequences.


AT&T Labs Research