cp's OEIS Frontend

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.

A381226 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.

This page as a plain text file.
%I A381226 #33 Mar 16 2025 12:55:32
%S A381226 1,2,4,6,7,8,8,9,10,10,10,11,12,12,12,12,12,13,13,13,14,14,14,14,14,
%T A381226 14,14,14,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16,17,
%U A381226 17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,18
%N A381226 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.
%C A381226 This sequence, A381227, and A381228 arose in connection with the problem of showing that every positive integer can be represented using a single 4. _Hans Havermann_ has pointed out that A139004 is related to this question and has many references. - _N. J. A. Sloane_, Feb 25 2025
%e A381226 For n = 8, 8! = 40320; sqrt(40320) = 200.798..., floor and ceiling give 200 and 201. Sqrt(200) = 14.142..., and floor and ceiling give 14 and 15. From 14 we get 3 and 4; from 3 we get 1 and 2. 15 and 4 give nothing more. In all, we get a(8) = 9 different numbers: 40320, 200, 201, 14, 15, 3, 4, 1, 2.
%e A381226 Note that at each step, we must consider three "parents": if x was a term at the previous step, we get floor(sqrt(x)), sqrt(x), and ceiling(sqrt(x)) as potential parents at the next step.
%o A381226 (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 A381226 a(n) = #f(n!); \\ _Jinyuan Wang_, Feb 25 2025
%Y A381226 Cf. A139004, A381227-A381229.
%Y A381226 Motivated by trying to understand A000319.
%K A381226 nonn
%O A381226 1,2
%A A381226 _N. J. A. Sloane_, Feb 24 2025
%E A381226 More terms from _Jinyuan Wang_, Feb 25 2025