This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A350742 #78 Feb 05 2022 22:22:13 %S A350742 1,2,1,5,14,7,23,48,24,12,6,3,39,88,44,22,11,75,156,78,39,139,260,130, %T A350742 65,209,378,189,385,610,305,561,850,425,749,1110,555,955,1396,698,349, %U A350742 833,1362,681,1257,1882,941,1617,2346,1173,1957,2798,1399,2299,3260,1630 %N A350742 Sisyphus with squares: a(1) = 1; thereafter, if a(n-1) is even, a(n) = a(n-1)/2; otherwise a(n) = a(n-1) + k^2, where k^2 is the smallest square (starting from 1) that has not yet been added. %C A350742 Allan C. Wechsler's initial remarks: (Start) %C A350742 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. %C A350742 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. %C A350742 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) %H A350742 Rémy Sigrist, <a href="/A350742/b350742.txt">Table of n, a(n) for n = 1..10000</a> %H A350742 Michael De Vlieger, <a href="/A350742/a350742.png">Log-log scatterplot of a(n)</a> for n = 1..2^16, annotating the first terms, showing records in red and terms preceded by an even number in blue. %H A350742 Hans Havermann, <a href="/A350742/a350742_1.png">A350742 minima</a> in the first 150 billion terms. %e A350742 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. %t A350742 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 *) %o A350742 (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 %Y A350742 A variation of the Sisyphus sequence A350877. %K A350742 nonn,easy %O A350742 1,2 %A A350742 _Allan C. Wechsler_, Jan 28 2022