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!)
A326823 a(n) is the number of iterations needed to reach 1 or 11 starting at n and using the map k -> (k/2 if k is even, otherwise k + (smallest square > k)). Set a(n) = -1 if the trajectory never reaches 1 or 11. 2
0, 1, 6, 2, 7, 7, 5, 3, 17, 8, 0, 8, 21, 6, 21, 4, 15, 18, 3, 9, 13, 1, 11, 9, 16, 22, 16, 7, 20, 22, 20, 5, 10, 16, 8, 19, 16, 4, 4, 10, 16, 14, 14, 2, 14, 12, 12, 10, 31, 17, 38, 23, 29, 17, 27, 8, 34, 21, 34, 23, 15, 21, 15, 6, 19, 11, 19, 17, 9, 9, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

It is conjectured that this algorithm will always terminate at 1 or 11.

Matthijs Coster verified the conjecture for n <= 100000.

Neil Fernandez checked for n <= 2*10^6 and always reached either the cycle (1,5,14,7,16,8,4,2,1) or the cycle (11,27,63,127,271,560,280,140,70,35,71,152,76,38,19,44,22,11).

Jim Nastos verified the conjecture for n <= 43*10^6 (Oct 21 2019).

Generalization: The algorithm also appears to terminate when replacing the least perfect square greater than n with the greatest perfect square less than n. It also seems to terminate when square is replaced by any power.

LINKS

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

EXAMPLE

The trajectory of 22 reaches 11 in a single iteration, so a(22) = 1. - Jon E. Schoenfield, Oct 20 2019

The trajectory of 9 is [9, 25, 61, 125, 269, 558, 279, 568, 284, 142, 71, 152, 76, 38, 19, 44, 22, 11], taking 17 steps to reach 11. So a(9) = 17. - N. J. A. Sloane, Oct 20 2019

CROSSREFS

Cf. A006577, A326825.

Sequence in context: A096050 A115731 A163340 * A244381 A307086 A021090

Adjacent sequences: A326820 A326821 A326822 * A326824 A326825 A326826

KEYWORD

nonn

AUTHOR

Ali Sada, Oct 20 2019

EXTENSIONS

Edited and data corrected by Jon E. Schoenfield and N. J. A. Sloane, Oct 20 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 February 3 01:46 EST 2023. Contains 360024 sequences. (Running on oeis4.)