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.
Original entry on oeis.org
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, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18
Offset: 1
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.
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.
Motivated by trying to understand
A000319.
-
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]]))));
a(n) = #f(n!); \\ Jinyuan Wang, Feb 25 2025
A381227
Irregular triangle read by rows: row n lists the A381226(n) numbers constructed in the definition of A381226, in increasing order.
Original entry on oeis.org
1, 1, 2, 1, 2, 3, 6, 1, 2, 3, 4, 5, 24, 1, 2, 3, 4, 10, 11, 120, 1, 2, 3, 5, 6, 26, 27, 720, 1, 2, 3, 8, 9, 70, 71, 5040, 1, 2, 3, 4, 14, 15, 200, 201, 40320, 1, 2, 3, 4, 5, 24, 25, 602, 603, 362880, 1, 2, 3, 6, 7, 43, 44, 1904, 1905, 3628800, 1, 2, 3, 8, 9, 79, 80, 6317, 6318, 39916800
Offset: 1
Triangle begins:
1;
1, 2;
1, 2, 3, 6;
1, 2, 3, 4, 5, 24;
1, 2, 3, 4, 10, 11, 120;
1, 2, 3, 5, 6, 26, 27, 720;
1, 2, 3, 8, 9, 70, 71, 5040;
1, 2, 3, 4, 14, 15, 200, 201, 40320;
1, 2, 3, 4, 5, 24, 25, 602, 603, 362880;
1, 2, 3, 6, 7, 43, 44, 1904, 1905, 3628800;
...
A381228
Smallest k such that n appears in row k of the triangle in A381227, or -1 if n never appears in A381227.
Original entry on oeis.org
1, 2, 3, 4, 4, 3, 10, 7, 7, 5, 5, 12, 12, 8, 8, 13, 13, 21, 36, 22, 22, 37, 14, 4, 9, 6, 6, 39, 39, 24, 24, 15, 15, 69, 41, 41, 25, 25, 42, 42, 72, 72, 10, 10, 43, 16, 16, 74, 128, 44, 44, 75, 130, 76, 76, 27, 27, 77, 77, 134, 134, 78, 46, 46, 17, 17, 79, 79, 28
Offset: 1
14 first appears in row 8 of A381227, so a(14) = 8.
A139003
Number of operations A000142 (i.e., x!) or A000196 (i.e., floor(sqrt(x))) needed to get n, starting with 3.
Original entry on oeis.org
1, 2, 0, 20, 4, 1, 14, 17, 31, 6, 26, 41, 35, 20, 31, 31, 19, 28, 27, 38, 21, 33, 21, 21, 26, 3, 51, 38, 28, 26, 20, 35, 36, 36, 13, 23, 27, 62, 45, 50, 45, 40, 9, 15, 31, 8, 32, 52, 36, 13, 68, 69, 57, 33, 54, 36, 46, 34, 49, 63, 56, 68, 14, 63, 23, 33, 36, 47, 43, 16, 38, 66, 38
Offset: 1
Representing the operation x -> floor(sqrt(x)) by "s" and x -> x! by "f",
we have:
a(1) = 1 since 1 = s3 is clearly the shortest way to obtain 1 from 3.
a(2) = 2 since 2 = sf3 is clearly the shortest way to obtain 2 from 3.
a(3) = 0 since no operation is required to get 3 which is there at the beginning.
a(5) = 4 since 5 = ssff3 is the shortest way to obtain 5 from 3.
a(6) = 1 since 6 = f3 is certainly the shortest way to get 6 from 3.
a(4) = 20 = 7+9+a(5) since 4 = ssssssfsssssssffssff3 = floor(35!^(1/2^6)), 35 = floor((5!)!^(1/2^7)).
-
A139003( n, S=Set(3), LIM=10^5 )={ for( i=0,LIM, setsearch( S, n) & return(i); S=setunion( S, setunion( Set( vector( #S, j, sqrtint(eval(S[j])))), Set( vector( #S, j, if( LIM > j=eval(S[j]), j!))))))}
Corrected formula, added terms from a(12) onward. -
Jon E. Schoenfield, Nov 17 2008, Nov 19 2008
Showing 1-4 of 4 results.
Comments