OFFSET
1,2
COMMENTS
Allan C. Wechsler's initial remarks: (Start)
This variation on A350877 was proposed by Keith F. Lynch on 2022 January 28. Because the former sequence uses prime increments, and because squares grow much faster than primes, Lynch felt that my conjecture about the former sequence (that all integers eventually appear) would not be true of this sequence. I responded that because squares nevertheless grow much more slowly than exponentials, we should still expect the same basic argument, that descents to the vicinity of 1 should happen on the order of once per "era", to apply, and I still thought that all values would appear, albeit perhaps very slowly.
But later, Gareth McCaughan did the "naive" probabilistic calculation more carefully, and I am now convinced that he and Lynch are correct and that the sequence eventually permanently exceeds any given value, most often without ever equaling that value exactly.
Primes > 2 are all odd, so in the former sequence every ascents will be immediately followed by at least one descent. But squares alternate parity, so in this sequence, ascents (after the first) will always occur in pairs, followed by at least one descent. (End)
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log-log scatterplot of a(n) for n = 1..2^16, annotating the first terms, showing records in red and terms preceded by an even number in blue.
Hans Havermann, A350742 minima in the first 150 billion terms.
EXAMPLE
Given a(10) = 12, the even rule gives a(11) = 6 and a(12) = 3, and then the odd rule must govern. Because the odd rule has already acted 5 times before a(10), we must add 6^2 = 36, so a(13) = 39. Now the odd rule must act again, giving a(14) = a(13) + 7^2 = 39 + 49 = 88.
MATHEMATICA
j = 1; q = 1; {j}~Join~Reap[Do[If[EvenQ[j], k = j/2, k = j + q^2; q++]; Sow[k]; j = k, {i, 55}]][[-1, -1]] (* Michael De Vlieger, Jan 28 2022 *)
PROG
(PARI) k=0; for (n=1, 56, print1 (v=if (n==1, 1, v%2, v+k++^2, v/2)", ")) \\ Rémy Sigrist, Jan 29 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Allan C. Wechsler, Jan 28 2022
STATUS
approved