A137902 Limiting sequence when we start with positive integers (A000027) and at step n >= 1 add to the term at position n + a(n) the value 1 if the term is odd, otherwise divide the term by 2.
1, 1, 4, 4, 5, 6, 8, 4, 9, 5, 11, 3, 13, 14, 4, 16, 17, 9, 20, 20, 21, 11, 23, 24, 25, 13, 28, 14, 29, 30, 31, 16, 34, 17, 35, 36, 37, 38, 20, 20, 41, 22, 43, 44, 45, 23, 47, 12, 49, 25, 52, 52, 53, 54, 56, 56, 57, 29, 60, 16, 61, 31, 63, 32, 65, 66, 68, 68, 70, 35
Offset: 1
Programs
-
PARI
lista(nn) = my(va = [1..nn]); for (n=1, nn, my(m = n+va[n]); if (m <= nn, if (va[m] % 2, va[m]++, va[m] /= 2));); va; \\ Michel Marcus, Oct 29 2022
Extensions
More terms from Michel Marcus, Oct 29 2022
Comments