Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A073755
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A073755 Number of steps needed to reach a prime when the following map is repeatedly applied to n: if n is even then 2n + int(sqrt(n)) + 1, otherwise 2n - int(sqrt(n)) - 1; or -1 if no prime is ever reached. +0
6
10, 2, 1, 1, 9, 1, 1, 4, 2, 2, 5, 28, 3, 8, 1, 1, 1, 17, 2, 1, 27, 1, 1, 34, 7, 2, 4, 12, 4, 3, 2, 16, 2, 2, 1, 1, 1, 1, 12, 4, 9, 1, 33, 1, 6, 12, 1, 26, 2, 16, 11, 5, 21, 4, 2, 2, 6, 8, 15, 2, 3, 6, 1, 11, 3, 27, 2, 4, 1, 15, 2, 1, 1, 3, 12, 2, 2, 1, 8, 2, 7, 3, 6, 3, 16, 11, 4, 2, 25, 8, 4, 10 (list; graph; listen)
OFFSET

2,1

EXAMPLE

For n=3, a(3)=2 because 3 -> 4 -> 11

PROGRAM

10 cls 30 for I=2 to 100 32 H=I 40 if odd(H)=1 then goto 90 else goto 50 50 A=2*H+int(sqrt(H))+1:K=K+1 60 if prmdiv(A)=A then print I, K:goto 120 65 if K>1000 then print I, 0:goto 120 70 H=A:goto 40 90 A=2*H-int(sqrt(H))-1:K=K+1 100 if prmdiv(A)=A then print I, K:goto 120 105 if K>1000 then print I, 0:goto 120 110 H=A:goto 40 120 K=0 130 next

CROSSREFS

Sequence in context: A057603 A040097 A010174 this_sequence A010173 A136712 A138999

Adjacent sequences: A073752 A073753 A073754 this_sequence A073756 A073757 A073758

KEYWORD

easy,nonn

AUTHOR

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

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 November 30 13:13 EST 2009. Contains 167758 sequences.


AT&T Labs Research