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 A381229 #8 Feb 25 2025 15:05:36 %S A381229 1,2,3,3,4,4,4,4,4,5,5,5,5,5,5,4,6,6,6,6,6,6,6,6,5,6,6,6,6,6,6,6,6,6, %T A381229 6,5,6,6,6,6,6,6,6,6,6,6,6,6,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5,6,6,6,6, %U A381229 6,6,6,6,6,6,6,6,6,6,6,6,5,7,7,7,7,7,7 %N A381229 a(n) is the number of distinct positive integers that can be obtained by starting with n, and optionally applying the operations square root, floor, and ceiling, in any order. %e A381229 For n = 15, sqrt(15) = 3.872..., floor and ceiling give 3 and 4. Sqrt(3) = 1.732..., and floor and ceiling give 1 and 2. 4 gives nothing new. In all, we get a(15) = 5 different numbers: 15, 3, 4, 1, 2. %o A381229 (PARI) f(n) = my(t); if(n<4, [1..n], t=sqrtint(n); if(issquare(n), concat(f(t), n), Set(concat([f(t), f(t+1), [n]])))); %o A381229 a(n) = #f(n); %Y A381229 Cf. A381226, A381227, A381228. %K A381229 nonn %O A381229 1,2 %A A381229 _N. J. A. Sloane_ and _Jinyuan Wang_, Feb 25 2025