A257681 Column index of A257503: If A257685(n) = 0, then a(n) = A257682(n), otherwise a(n) = a(A257685(n)).
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 0..10080
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.
Factorial base representation (A007623) of 1 is "1", shifting it left yields "10", and when we increment all nonzero digits by one, we get "20", which is the factorial base representation of 4 (as 4 = 2*2! + 0*1!), thus a(1) = 4. F.b.r. of 2 is "10", shifting it left yields "100", and "200" is f.b.r. of 12, thus a(2) = 12. F.b.r. of 43 is "1301", shifting it left and incrementing all nonzeros by one yields "24020", which is f.b.r of 340, thus a(43) = 340.
factBaseIntDs[n_] := Module[{m, i, len, dList, currDigit}, i = 1; While[n > i!, i++]; m = n; len = i; dList = Table[0, {len}]; Do[currDigit = 0; While[m >= j!, m = m - j!; currDigit++]; dList[[len - j + 1]] = currDigit, {j, i, 1, -1}]; If[dList[[1]] == 0, dList = Drop[dList, 1]]; dList]; s = Table[FromDigits[factBaseIntDs[n]], {n, 500}]; {0}~Join~Flatten@ Position[s, x_ /; DigitCount[x][[1]] == 0](* Michael De Vlieger, Apr 27 2015, after Alonso del Arte at A007623 *) Select[Range[0, 444], ! MemberQ[IntegerDigits[#, MixedRadix[Reverse@ Range@ 12]], 1] &] (* Michael De Vlieger, May 30 2016, Version 10.2 *) r = MixedRadix[Reverse@Range[2, 12]]; Table[FromDigits[Map[If[# == 0, 0, # + 1] &, IntegerDigits[n, r]]~Join~{0}, r], {n, 0, 60}] (* Michael De Vlieger, Aug 14 2016, Version 10.2 *)
from sympy import factorial as f def a007623(n, p=2): return n if n0 else '0' for i in x)[::-1] return 0 if n==0 else sum(int(y[i])*f(i + 1) for i in range(len(y))) print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 20 2017
Select[Range@ 101, MemberQ[IntegerDigits[#, MixedRadix[Reverse@ Range@ 12]], 1] &] (* Michael De Vlieger, May 30 2016, Version 10.2 *) r = MixedRadix[Reverse@ Range[2, 12]]; Select[Range@ 101, Min[IntegerDigits[#, r] /. 0 -> Nothing] == 1 &] (* Michael De Vlieger, Aug 14 2016, Version 10.2 *)
def A(n, p=2): return n if n=1]) # Indranil Ghosh, Jun 19 2017
a062119 n = (n - 1) * a000142 n -- Reinhard Zumkeller, Aug 27 2012
G(x):=x^2/(1-x)^2: f[0]:=G(x): for n from 1 to 19 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=1..19); # Zerinvary Lajos, Apr 01 2009
a[n_]:=1*(n+2)!-2*(n+1)!; (* or *) a[n_]:=n!*(n-1); (* Vladimir Joseph Stephan Orlovsky, Dec 05 2008 *) Table[n!(n-1),{n,20}] (* Harvey P. Dale, Aug 29 2021 *)
{ f=1; for (n=1, 100, f*=n; write("b062119.txt", n, " ", f*(n - 1)) ) } \\ Harry J. Smith, Aug 02 2009
a(n) = n!*(n-1); \\ Altug Alkan, May 04 2018
(define (A062119 n) (* (- n 1) (A000142 n))) ;; Antti Karttunen, May 07 2015
Factorial base representation (A007623) of 4 is "20", the smallest digit which is not zero is "2", thus a(4) = 2.
a[n_] := Module[{k = n, m = 2, rmin = n, r}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, If[0 < r < rmin, rmin = r]; m++]; rmin]; Array[a, 100, 0] (* Amiram Eldar, Jan 23 2024 *)
def A(n, p=2): return n if n
(define (A257679 n) (let loop ((n n) (i 2) (mind 0)) (if (zero? n) mind (let ((d (modulo n i))) (loop (/ (- n d) i) (+ 1 i) (cond ((zero? mind) d) ((zero? d) mind) (else (min d mind)))))))) ;; Alternative implementations based on given recurrences, using memoizing definec-macro: (definec (A257679 n) (if (zero? (A257687 n)) (A099563 n) (min (A099563 n) (A257679 (A257687 n))))) (definec (A257679 n) (cond ((zero? n) n) ((= 1 (A257680 n)) 1) (else (+ 1 (A257679 (A257684 n))))))
The top left corner of the array: 1, 4, 18, 96, 600, 4320, 35280, 322560, 3265920 2, 12, 72, 480, 3600, 30240, 282240, 2903040, 32659200 3, 16, 90, 576, 4200, 34560, 317520, 3225600, 35925120 5, 22, 114, 696, 4920, 39600, 357840, 3588480, 39553920 6, 48, 360, 2880, 25200, 241920, 2540160, 29030400, 359251200 7, 52, 378, 2976, 25800, 246240, 2575440, 29352960, 362517120 8, 60, 432, 3360, 28800, 272160, 2822400, 31933440, 391910400 9, 64, 450, 3456, 29400, 276480, 2857680, 32256000, 395176320 10, 66, 456, 3480, 29520, 277200, 2862720, 32296320, 395539200 11, 70, 474, 3576, 30120, 281520, 2898000, 32618880, 398805120 13, 76, 498, 3696, 30840, 286560, 2938320, 32981760, 402433920 14, 84, 552, 4080, 33840, 312480, 3185280, 35562240, 431827200 15, 88, 570, 4176, 34440, 316800, 3220560, 35884800, 435093120 17, 94, 594, 4296, 35160, 321840, 3260880, 36247680, 438721920 19, 100, 618, 4416, 35880, 326880, 3301200, 36610560, 442350720 20, 108, 672, 4800, 38880, 352800, 3548160, 39191040, 471744000 21, 112, 690, 4896, 39480, 357120, 3583440, 39513600, 475009920 23, 118, 714, 5016, 40200, 362160, 3623760, 39876480, 478638720 ...
The top left corner of the array: 1, 3, 4, 5, 7, 9, 10, 11, 13, 15, 16 2, 8, 12, 14, 26, 32, 36, 38, 50, 56, 60 6, 30, 48, 54, 126, 150, 168, 174, 246, 270, 288 24, 144, 240, 264, 744, 864, 960, 984, 1464, 1584, 1680 120, 840, 1440, 1560, 5160, 5880, 6480, 6600, 10200, 10920, 11520 720, 5760, 10080, 10800, 41040, 46080, 50400, 51120, 81360, 86400, 90720
[0,0] cat [n*(n+1)*(n+2)*Factorial(n): n in [0..20]]; // Vincenzo Librandi, Oct 11 2011
spec := [S,{S=Prod(Z,Z,Z,Sequence(Z),Sequence(Z))},labeled]: seq(combstruct[count](spec,size=n), n=0..20); [seq (n*(n+1)*(n+2)*n!,n=0..17)]; # Zerinvary Lajos, Nov 25 2006 a:=n->add((n!),j=1..n-2):seq(a(n), n=0..21); # Zerinvary Lajos, Aug 27 2008 G(x):=x^3/(1-x)^2: f[0]:=G(x): for n from 1 to 21 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..19); # Zerinvary Lajos, Apr 01 2009
Table[Sum[n!, {i, 3, n}], {n, 0, 19}] (* Zerinvary Lajos, Jul 12 2009 *) With[{nn=20},CoefficientList[Series[x^3/(1-x)^2,{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Feb 27 2025 *)
(define (A052571 n) (if (< n 2) 0 (* (- n 2) (A000142 n)))) ;; Antti Karttunen, May 07 2015
Comments