login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A322987 Number of iterations of A049820(x) = x - A000005(x) needed to reach a square, when starting from x = n. 3
0, 0, 1, 1, 0, 2, 2, 3, 1, 0, 3, 1, 3, 2, 4, 2, 0, 3, 4, 4, 5, 4, 5, 5, 1, 0, 6, 6, 6, 7, 6, 8, 7, 8, 7, 9, 0, 10, 8, 10, 8, 11, 8, 12, 9, 11, 9, 12, 9, 0, 10, 13, 10, 14, 10, 14, 10, 15, 11, 16, 10, 17, 12, 16, 0, 18, 12, 19, 13, 19, 13, 20, 11, 21, 14, 20, 14, 22, 14, 23, 14, 0, 15, 1, 12, 1, 16, 2, 15, 3, 15, 3, 17, 4, 16, 4, 13, 5, 18, 5, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
FORMULA
If A010052(n) == 1 [when n is in A000290], then a(n) = 0, otherwise a(n) = 1+a(A049820(n)).
a(n) <= A155043(n).
For n >= 83, a(2*n) = A322996(2*n)-1. [Note that 2*83 = 166 > 144 = A262514(2).]
PROG
(PARI) A322987(n) = if(issquare(n), 0, 1+A322987(n-numdiv(n)));
(PARI) A322987(n) = { for(j=0, oo, if(issquare(n), return(j)); n -= numdiv(n)); };
CROSSREFS
Sequence in context: A107098 A293837 A181736 * A290563 A071474 A071480
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 05 2019
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 1 19:22 EDT 2024. Contains 374817 sequences. (Running on oeis4.)