login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

All factorials n! along with powers of the numbers n and n+1 that fall in between n! and (n+1)!, in increasing order.
1

%I #22 Apr 22 2015 12:04:05

%S 1,2,3,4,6,9,16,24,25,64,120,125,216,625,720,1296,2401,5040,16807,

%T 32768,40320,59049,262144,362880,531441,1000000,3628800,10000000,

%U 19487171,39916800,214358881,429981696,479001600,815730721,5159780352,6227020800,10604499373,20661046784,87178291200,289254654976

%N All factorials n! along with powers of the numbers n and n+1 that fall in between n! and (n+1)!, in increasing order.

%C For each positive integer n, we consider the two factorials n! and (n+1)! as lower and upper bounds of an interval. Then we look for all powers of n and all powers of n+1 that fall inside that interval. We sort those numbers in increasing order, and we append them to the sequence without allowing duplicates. Then we move on to the next integer, and so on.

%C A000142 (without its first term that stands for 0!) is a subsequence.

%H Michael De Vlieger, <a href="/A256774/b256774.txt">Table of n, a(n) for n = 1..1346</a>

%e With n=1: 1! < 2! gives a(1)=1, a(2)=2.

%e With n=2: 2! < 3^1 < 2^2 < 3! gives a(3)=3, a(4)=4, a(5)=6.

%e With n=3: 3! < 3^2 < 4^2 < 4! gives a(6)=9, a(7)=16, a(8)=24.

%e With n=4: 4! < 5^2 < 4^3 < 5! gives a(9)=25, a(10)=64, a(11)=120.

%e With n=5: 5! < 5^3 < 6^3 < 5^4 < 6! gives a(12)=125, a(13)=216, a(14)=625, a(15)=720

%t f[n_] := Block[{a = n!, b = (n + 1)!}, Sort@ Union[{a}, n^Range[Ceiling@ Log[n, a], Floor@ Log[n, b]], (n + 1)^Range[Ceiling@ Log[n + 1, a], Floor@ Log[n + 1, b]]]]; {1}~Join~(f /@ Range[2, 14] // Flatten) (* _Michael De Vlieger_, Apr 15 2015 *)

%o (PARI) tabf(nn) = {print([1]); for (n=2, nn, v = [n!]; ka = ceil(log(n!+1)/log(n)); kb = floor(log((n+1)!-1)/log(n)); for (k=ka, kb, v = concat(v, n^k);); ka = ceil(log(n!+1)/log(n+1)); kb = floor(log((n+1)!-1)/log(n+1)); for (k=ka, kb, v = concat(v, (n+1)^k);); print(vecsort(v));); } \\ _Michel Marcus_, Apr 22 2015

%Y Cf. A000142, A039960, A060151, A074181, A074182, A074184, A111683.

%K nonn,tabf

%O 1,2

%A _Juan Castaneda_, Apr 10 2015