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.

Showing 1-10 of 12 results. Next

A225901 Write n in factorial base, then replace each nonzero digit d of radix k with k-d.

Original entry on oeis.org

0, 1, 4, 5, 2, 3, 18, 19, 22, 23, 20, 21, 12, 13, 16, 17, 14, 15, 6, 7, 10, 11, 8, 9, 96, 97, 100, 101, 98, 99, 114, 115, 118, 119, 116, 117, 108, 109, 112, 113, 110, 111, 102, 103, 106, 107, 104, 105, 72, 73, 76, 77, 74, 75, 90, 91, 94, 95, 92, 93, 84, 85, 88, 89, 86, 87, 78, 79, 82, 83, 80, 81, 48, 49, 52, 53, 50, 51, 66, 67, 70, 71, 68
Offset: 0

Views

Author

Paul Tek, May 20 2013

Keywords

Comments

Analogous to A004488 or A048647 for the factorial base.
A self-inverse permutation of the natural numbers.
From Antti Karttunen, Aug 16-29 2016: (Start)
Consider the following way to view a factorial base representation of nonnegative integer n. For each nonzero digit d_i present in the factorial base representation of n (where i is the radix = 2.. = one more than 1-based position from the right), we place a pebble to the level (height) d_i at the corresponding column i of the triangular diagram like below, while for any zeros the corresponding columns are left empty:
.
Level
6 o
─ ─
5 . .
─ ─ ─
4 . . .
─ ─ ─ ─
3 . . . .
─ ─ ─ ─ ─
2 . . o . .
─ ─ ─ ─ ─ ─
1 . o . . o o
─ ─ ─ ─ ─ ─ ─
Radix: 7 6 5 4 3 2
Digits: 6 1 2 0 1 1 = A007623(4491)
Instead of levels, we can observe on which "slope" each pebble (nonzero digit) is located at. Formally, the slope of nonzero digit d_i with radix i is (i - d_i). Thus in above example, both the most significant digit (6) and the least significant 1 are on slope 1 (called "maximal slope", because it contains digits that are maximal allowed in those positions), while the second 1 from the right is on slope 2 ("submaximal slope").
This involution (A225901) sends each nonzero digit at level k to the slope k (and vice versa) by flipping such a diagram by the shallow diagonal axis that originates from the bottom right corner. Thus, from above diagram we obtain:
Slope (= digit's radix - digit's value)
1
2 .
3 . .╲
4 . .╲o╲
5 . .╲.╲.╲
6 . .╲.╲o╲.╲
. .╲.╲.╲.╲o╲
o╲.╲.╲.╲.╲o╲
-----------------
1 5 3 0 2 1 = A007623(1397)
and indeed, a(4491) = 1397 and a(1397) = 4491.
Thus this permutation maps between polynomial encodings A275734 & A275735 and all the respective sequences obtained from them, where the former set of sequences are concerned with the "slopes" and the latter set with the "levels" of the factorial base representation. See the Crossrefs section.
Sequences A231716 and A275956 are closed with respect to this sequence, in other words, for all n, a(A231716(n)) is a term of A231716 and a(A275956(n)) is a term of A275956.
(End)

Examples

			a(1000) = a(1*6! + 2*5! + 1*4! + 2*3! + 2*2!) = (7-1)*6! + (6-2)*5! + (5-1)*4! + (4-2)*3! + (3-2)*2! = 4910.
a(1397) = a(1*6! + 5*5! + 3*4! + 0*3! + 2*2! + 1*1!) = (7-1)*6! + (6-5)*5! + (5-3)*4! + (3-2)*2! + (2-1)*1! = 4491.
		

Crossrefs

Cf. A275959 (fixed points), A231716, A275956.
This involution maps between the following sequences related to "levels" and "slopes" (see comments): A275806 <--> A060502, A257511 <--> A260736, A264990 <--> A275811, A275729 <--> A275728, A275948 <--> A275946, A275949 <--> A275947, A275964 <--> A275962, A059590 <--> A276091.

Programs

  • Mathematica
    b = MixedRadix[Reverse@ Range[2, 12]]; Table[FromDigits[Map[Boole[# > 0] &, #] (Reverse@ Range[2, Length@ # + 1] - #), b] &@ IntegerDigits[n, b], {n, 0, 82}] (* Version 10.2, or *)
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Range[# + 1] <= n &]; Most@ Rest[a][[All, 1]] /. {} -> {0}]; g[w_List] := Total[Times @@@ Transpose@ {Map[Times @@ # &, Range@ Range[0, Length@ w]], Reverse@ Append[w, 0]}]; Table[g[Map[Boole[# > 0] &, #] (Reverse@ Range[2, Length@ # + 1] - #)] &@ f@ n, {n, 0, 82}] (* Michael De Vlieger, Aug 29 2016 *)
  • PARI
    a(n)=my(s=0,d,k=2);while(n,d=n%k;n=n\k;if(d,s=s+(k-d)*(k-1)!);k=k+1);return(s)
    
  • Python
    from sympy import factorial as f
    def a(n):
        s=0
        k=2
        while(n):
            d=n%k
            n=(n//k)
            if d: s=s+(k - d)*f(k - 1)
            k+=1
        return s
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 19 2017
  • Scheme
    (define (A225901 n) (let loop ((n n) (z 0) (m 2) (f 1)) (cond ((zero? n) z) (else (loop (quotient n m) (if (zero? (modulo n m)) z (+ z (* f (- m (modulo n m))))) (+ 1 m) (* f m))))))
    ;; One implementing the first recurrence, with memoization-macro definec:
    (definec (A225901 n) (if (zero? n) n (+ (A276091 (A275736 n)) (A153880 (A225901 (A257684 n))))))
    ;; Antti Karttunen, Aug 29 2016
    

Formula

From Antti Karttunen, Aug 29 2016: (Start)
a(0) = 0; for n >= 1, a(n) = A276091(A275736(n)) + A153880(a(A257684(n))).
or, for n >= 1, a(n) = A276149(n) + a(A257687(n)).
(End)
Other identities. For n >= 0:
a(n!) = A001563(n).
a(n!-1) = A007489(n-1).
From Antti Karttunen, Aug 16 2016: (Start)
A275734(a(n)) = A275735(n) and vice versa, A275735(a(n)) = A275734(n).
A060130(a(n)) = A060130(n). [The flip preserves the number of nonzero digits.]
A153880(n) = a(A255411(a(n))) and A255411(n) = a(A153880(a(n))). [This involution conjugates between the two fundamental factorial base shifts.]
a(n) = A257684(a(A153880(n))) = A266193(a(A255411(n))). [Follows from above.]
A276011(n) = A273662(a(A273670(n))).
A276012(n) = A273663(a(A256450(n))).
(End)

A059590 Numbers obtained by reinterpreting base-2 representation of n in the factorial base: a(n) = Sum_{k>=0} A030308(n,k)*A000142(k+1).

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 9, 24, 25, 26, 27, 30, 31, 32, 33, 120, 121, 122, 123, 126, 127, 128, 129, 144, 145, 146, 147, 150, 151, 152, 153, 720, 721, 722, 723, 726, 727, 728, 729, 744, 745, 746, 747, 750, 751, 752, 753, 840, 841, 842, 843, 846, 847, 848, 849, 864, 865
Offset: 0

Views

Author

Henry Bottomley, Jan 24 2001

Keywords

Comments

Numbers that are sums of distinct factorials (0! and 1! not treated as distinct).
Complement of A115945; A115944(a(n)) > 0; A115647 is a subsequence. - Reinhard Zumkeller, Feb 02 2006
A115944(a(n)) = 1. - Reinhard Zumkeller, Dec 04 2011
From Tilman Piesk, Jun 04 2012: (Start)
The inversion vector (compare A007623) of finite permutation a(n) (compare A055089, A195663) has only zeros and ones. Interpreted as a binary number it is 2*n (or n when the inversion vector is defined without the leading 0).
The inversion set of finite permutation a(n) interpreted as a binary number (compare A211362) is A211364(n).
(End)

Examples

			128 is in the sequence since 5! + 3! + 2! = 128.
a(22) = 128. a(22) = a(6) + (1 + floor(log(16) / log(2)))! = 8 + 5! = 128. Also, 22 = 10110_2. Therefore, a(22) = 1 * 5! + 0 * 4! + 1 * 3! + 1 + 2! + 0 * 0! = 128. - _David A. Corneth_, Aug 21 2016
		

Crossrefs

Indices of zeros in A257684.
Cf. A275736 (left inverse).
Cf. A025494, A060112 (subsequences).
Subsequence of A060132, A256450 and A275804.
Other sequences that are built by replacing 2^k in the binary representation with other numbers: A029931 (naturals), A089625 (primes), A022290 (Fibonacci), A197433 (Catalans), A276091 (n*n!), A275959 ((2n)!/2). Cf. also A276082 & A276083.

Programs

  • Haskell
    import Data.List (elemIndices)
    a059590 n = a059590_list !! n
    a059590_list = elemIndices 1 $ map a115944 [0..]
    -- Reinhard Zumkeller, Dec 04 2011
    
  • Maple
    [seq(bin2facbase(j),j=0..64)]; bin2facbase := proc(n) local i; add((floor(n/(2^i)) mod 2)*((i+1)!),i=0..floor_log_2(n)); end;
    floor_log_2 := proc(n) local nn,i; nn := n; for i from -1 to n do if(0 = nn) then RETURN(i); fi; nn := floor(nn/2); od; end;
    # next Maple program:
    a:= n-> (l-> add(l[j]*j!, j=1..nops(l)))(Bits[Split](n)):
    seq(a(n), n=0..57);  # Alois P. Heinz, Aug 12 2025
  • Mathematica
    a[n_] :=  Reverse[id = IntegerDigits[n, 2]].Range[Length[id]]!; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jun 19 2012, after Philippe Deléham *)
  • PARI
    a(n) = if(n>0, a(n-msb(n)) + (1+logint(n,2))!, 0)
    msb(n) = 2^#binary(n)>>1
    {my(b = binary(n)); sum(i=1,#b,b[i]*(#b+1-i)!)} \\ David A. Corneth, Aug 21 2016
    
  • Python
    def facbase(k, f):
        return sum(f[i] for i, bi in enumerate(bin(k)[2:][::-1]) if bi == "1")
    def auptoN(N): # terms up to N factorial-base digits; 13 generates b-file
        f = [factorial(i) for i in range(1, N+1)]
        return list(facbase(k, f) for k in range(2**N))
    print(auptoN(5)) # Michael S. Branicky, Oct 15 2022

Formula

G.f. 1/(1-x) * Sum_{k>=0} (k+1)!*x^2^k/(1+x^2^k). - Ralf Stephan, Jun 24 2003
a(n) = Sum_{k>=0} A030308(n,k)*A000142(k+1). - Philippe Deléham, Oct 15 2011
From Antti Karttunen, Aug 19 2016: (Start)
a(0) = 0, a(2n) = A153880(a(n)), a(2n+1) = 1+A153880(a(n)).
a(n) = A225901(A276091(n)).
a(n) = A276075(A019565(n)).
a(A275727(n)) = A276008(n).
A275736(a(n)) = n.
A276076(a(n)) = A019565(n).
A007623(a(n)) = A007088(n).
(End)
a(n) = a(n - mbs(n)) + (1 + floor(log(n) / log(2)))!. - David A. Corneth, Aug 21 2016

Extensions

Name changed (to emphasize the functional nature of the sequence) with the old definition moved to the comments by Antti Karttunen, Aug 21 2016

A060130 Number of nonzero digits in factorial base representation (A007623) of n; minimum number of transpositions needed to compose each permutation in the lists A060117 & A060118.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 3, 4, 3, 4, 2, 3, 3, 4, 3, 4, 2, 3, 3, 4, 3, 4, 1, 2, 2, 3, 2, 3, 2, 3, 3, 4, 3, 4, 2, 3, 3, 4, 3, 4, 2, 3, 3, 4, 3, 4, 1, 2, 2, 3, 2, 3, 2, 3, 3, 4, 3, 4, 2, 3, 3, 4, 3, 4, 2, 3, 3, 4, 3, 4, 1, 2, 2, 3, 2, 3, 2, 3, 3
Offset: 0

Views

Author

Antti Karttunen, Mar 02 2001

Keywords

Examples

			19 = 3*(3!) + 0*(2!) + 1*(1!), thus it is written as "301" in factorial base (A007623). The count of nonzero digits in that representation is 2, so a(19) = 2.
		

Crossrefs

Cf. A227130 (positions of even terms), A227132 (of odd terms).
The topmost row and the leftmost column in array A230415, the left edge of triangle A230417.
Differs from similar A267263 for the first time at n=30.

Programs

  • Maple
    A060130(n) = count_nonfixed(convert(PermUnrank3R(n), 'disjcyc'))-nops(convert(PermUnrank3R(n), 'disjcyc')) or nops(fac_base(n))-nops(positions(0, fac_base(n)))
    fac_base := n -> fac_base_aux(n, 2); fac_base_aux := proc(n, i) if(0 = n) then RETURN([]); else RETURN([op(fac_base_aux(floor(n/i), i+1)), (n mod i)]); fi; end;
    count_nonfixed := l -> convert(map(nops, l), `+`);
    positions := proc(e, ll) local a, k, l, m; l := ll; m := 1; a := []; while(member(e, l[m..nops(l)], 'k')) do a := [op(a), (k+m-1)]; m := k+m; od; RETURN(a); end;
    # For procedure PermUnrank3R see A060117
  • Mathematica
    Block[{nn = 105, r}, r = MixedRadix[Reverse@ Range[2, -1 + SelectFirst[Range@ 12, #! > nn &]]]; Array[Count[IntegerDigits[#, r], k_ /; k > 0] &, nn, 0]] (* Michael De Vlieger, Dec 30 2017 *)
  • Scheme
    (define (A060130 n) (let loop ((n n) (i 2) (s 0)) (cond ((zero? n) s) (else (loop (quotient n i) (+ 1 i) (+ s (if (zero? (remainder n i)) 0 1)))))))
    ;; Two other implementations, that use memoization-macro definec:
    (definec (A060130 n) (if (zero? n) n (+ 1 (A060130 (A257687 n)))))
    (definec (A060130 n) (if (zero? n) n (+ (A257511 n) (A060130 (A257684 n)))))
    ;; Antti Karttunen, Dec 30 2017

Formula

a(0) = 0; for n > 0, a(n) = 1 + a(A257687(n)).
a(0) = 0; for n > 0, a(n) = A257511(n) + a(A257684(n)).
a(n) = A060129(n) - A060128(n).
a(n) = A084558(n) - A257510(n).
a(n) = A275946(n) + A275962(n).
a(n) = A275948(n) + A275964(n).
a(n) = A055091(A060119(n)).
a(n) = A069010(A277012(n)) = A000120(A275727(n)).
a(n) = A001221(A275733(n)) = A001222(A275733(n)).
a(n) = A001222(A275734(n)) = A001222(A275735(n)) = A001221(A276076(n)).
a(n) = A046660(A275725(n)).
a(A225901(n)) = a(n).
A257511(n) <= a(n) <= A034968(n).
A275806(n) <= a(n).
a(A275804(n)) = A060502(A275804(n)). [A275804 gives all the positions where this coincides with A060502.]
a(A276091(n)) = A260736(A276091(n)). [A276091 gives all the positions where this coincides with A260736.]

Extensions

Example-section added, name edited, the old Maple-code moved away from the formula-section, and replaced with all the new formulas by Antti Karttunen, Dec 30 2017

A276326 Numbers expressed in greedy A001563-base.

Original entry on oeis.org

0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 40, 41, 100, 101, 102, 103, 110, 111, 112, 113, 120, 121, 122, 123, 130, 131, 132, 133, 140, 141, 200, 201, 202, 203, 210, 211, 212, 213, 220, 221, 222, 223, 230, 231, 232, 233, 240, 241, 300, 301, 302, 303, 310, 311, 312, 313, 320, 321, 322, 323, 330, 331, 332, 333, 340, 341, 400
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

Terms A001563(1) = 1, A001563(2) = 4, A001563(3) = 18, ... give the base values for the digit positions from 1 onward. Digit places are filled by always trying to find the largest possible term of A001563 that still fits into the sum.
A130744(8) = 3225600 = 10*A001563(8) is the first number which yields an ambiguous representation when expressed in decimal, because in this base it is actually "A0000000" (where digit "A" stands for ten).

Examples

			To recover n from a(n) the digits in positions i = 1, 2, 3, ... (starting indexing from the least significant digit at right) are multiplied by A001563(i) and added together:
  ----------------
   n         a(n)
  ----------------
   0           0
   1           1
   2           2
   3           3
   4          10
   5          11
   6          12
   7          13
   8          20
   9          21
  10          22
  11          23
  12          30
  13          31
  14          32
  15          33
  16          40
  17          41 (as 4*A001563(2) + 1*A001563(1) = 17)
  18         100 (as 1*A001563(3) + 0*A001563(2) + 0*A001563(1) = 18)
and:
3225599 99111111 (as 3225599 = 9*b(8) + 9*b(7) + b(6) + b(5) + b(4) + b(3) + b(2) + b(1)), where b(n) = A001563(n).
		

Crossrefs

Cf. A276327 (the least significant nonzero digit).
Cf. A276328 (the sum of digits).
Cf. A276333 (the most significant digit).
Cf. A276336 (a largest digit).
Cf. A276337 (number of nonzero digits).
Cf. A033312 (repunits).
Cf. A276091 (no digits larger than one).
Differs from A007090 for the first time at n=16 and from A055655 at n=18.

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; Table[FromDigits@ f@ n, {n, 72}] (* Michael De Vlieger, Aug 31 2016 *)
  • Scheme
    (define (A276326 n) (let loop ((n n) (s 0)) (if (zero? n) s (let ((dig (A276333 n))) (if (> dig 9) (error "A276326: ambiguous representation of n, digit > 9 would be needed: " n dig) (loop (A276335 n) (+ s (* dig (expt 10 (- (A258198 n) 1))))))))))

A275959 Sum of distinct terms of A002674: a(0) = 0, a(2n) = A255411(A153880(a(n))), a(2n+1) = 1+A255411(A153880(a(n))).

Original entry on oeis.org

0, 1, 12, 13, 360, 361, 372, 373, 20160, 20161, 20172, 20173, 20520, 20521, 20532, 20533, 1814400, 1814401, 1814412, 1814413, 1814760, 1814761, 1814772, 1814773, 1834560, 1834561, 1834572, 1834573, 1834920, 1834921, 1834932, 1834933, 239500800, 239500801, 239500812, 239500813, 239501160, 239501161, 239501172, 239501173, 239520960, 239520961
Offset: 0

Views

Author

Antti Karttunen, Aug 16 2016

Keywords

Comments

Fixed points of involution A225901.
This can be also viewed as a function that reinterprets base-2 representation of n in base-((2n)!/2) where the digits are multiplied with the successive terms of A002674, thus a(0) = 0.

Crossrefs

Fixed points of A225901.
Subsequence of A275956 and of A276089.

Programs

  • Python
    from sympy import factorial as f
    def a007623(n, p=2): return n if n

    0 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))]) def a153880(n): x=(str(a007623(n)) + '0')[::-1] return 0 if n==0 else sum([int(x[i])*f(i + 1) for i in range(len(x))]) def a(n): return 0 if n==0 else a255411(a153880(a(n//2))) if n%2==0 else 1 + a255411(a153880(a((n - 1)//2))) print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 20 2017

Formula

a(0) = 0, a(2n) = A255411(A153880(a(n))), a(2n+1) = 1+A255411(A153880(a(n))).
a(n) = A276089(A276091(n)).

A276328 Digit sum when n is expressed in greedy A001563-base (A276326).

Original entry on oeis.org

0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 8, 6, 7, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 8, 6, 7, 8, 9, 7, 8, 4, 5, 6, 7, 5, 6, 7, 8, 6, 7, 8, 9, 7, 8, 9, 10, 8, 9, 5, 6, 7, 8, 6, 7, 1
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

a(n) is the number of terms of A001563 needed to sum to n using the greedy algorithm.
This seems to give also the minimal number of terms of A001563 that sum to n (checked empirically up to n=3265920), but it would be nice to know for sure whether this holds for all n.

Examples

			For n=1, the largest term of A001563 <= 1 is A001563(1) = 1, thus a(1) = 1.
For n=2, the largest term of A001563 <= 2 is A001563(1) = 1, thus a(2) = 1 + a(2-1) = 2.
For n=18, the largest term of A001563 <= 18 is A001563(3) = 18, thus a(18) = 1.
For n=20, the largest term of A001563 <= 20 is A001563(3) = 18, thus a(20) = 1 + a(20-18) = 3.
For n=36, the largest term of A001563 <= 36 is A001563(3) = 18, thus a(36) = 1 + a(18) = 2.
		

Crossrefs

Cf. A276091 (gives all n for which a(n) = A276337(n)).
Cf. also A007895, A034968, A265744, A265745 for similar sequences.

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[Total@ f@ n, {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)

Formula

a(0) = 0; for n >= 1, a(n) = 1 + a(n-A258199(n)).
a(0) = 0; for n >= 1, a(n) = A276333(n) + a(A276335(n)).
Other identities and observations. For all n >= 0:
a(A276091(n)) = A000120(n).
a(n) >= A276337(n).
It also seems that a(n) <= A276332(n) for all n.

A276082 a(0) = 0, a(2n) = A153880(a(n)), a(2n+1) = 1+A255411(a(n)).

Original entry on oeis.org

0, 1, 2, 5, 6, 13, 14, 23, 24, 49, 50, 77, 54, 85, 86, 119, 120, 241, 242, 365, 246, 373, 374, 503, 264, 409, 410, 557, 414, 565, 566, 719, 720, 1441, 1442, 2165, 1446, 2173, 2174, 2903, 1464, 2209, 2210, 2957, 2214, 2965, 2966, 3719, 1560, 2401, 2402, 3245, 2406, 3253, 3254, 4103, 2424, 3289, 3290, 4157, 3294, 4165, 4166, 5039, 5040, 10081
Offset: 0

Views

Author

Antti Karttunen, Aug 21 2016

Keywords

Crossrefs

Programs

  • Python
    from sympy import factorial as f
    def a007623(n, p=2): return n if n

    0 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))]) def a153880(n): x=(str(a007623(n)) + '0')[::-1] return 0 if n==0 else sum([int(x[i])*f(i + 1) for i in range(len(x))]) def a(n): return 0 if n==0 else a153880(a(n//2)) if n%2==0 else 1 + a255411(a((n - 1)//2)) print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 20 2017

Formula

a(0) = 0, a(2n) = A153880(a(n)), a(2n+1) = 1+A255411(a(n)).
Other identities. For all n >= 0:
a(n) = A225901(A276083(n)).

A276083 a(0) = 0, a(2n) = A255411(a(n)), a(2n+1) = 1+A153880(a(n)).

Original entry on oeis.org

0, 1, 4, 3, 18, 13, 16, 9, 96, 73, 76, 51, 90, 61, 64, 33, 600, 481, 484, 363, 498, 373, 376, 249, 576, 433, 436, 291, 450, 301, 304, 153, 4320, 3601, 3604, 2883, 3618, 2893, 2896, 2169, 3696, 2953, 2956, 2211, 2970, 2221, 2224, 1473, 4200, 3361, 3364, 2523, 3378, 2533, 2536, 1689, 3456, 2593, 2596, 1731, 2610, 1741, 1744, 873, 35280, 30241
Offset: 0

Views

Author

Antti Karttunen, Aug 21 2016

Keywords

Crossrefs

Programs

  • Python
    from sympy import factorial as f
    def a007623(n, p=2): return n if n

    0 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))]) def a153880(n): x=(str(a007623(n)) + '0')[::-1] return 0 if n==0 else sum([int(x[i])*f(i + 1) for i in range(len(x))]) def a(n): return 0 if n==0 else a255411(a(n//2)) if n%2==0 else 1 + a153880(a((n - 1)//2)) print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 20 2017

Formula

a(0) = 0, a(2n) = A255411(a(n)), a(2n+1) = 1+A153880(a(n)).
Other identities. For all n >= 0:
a(n) = A225901(A276082(n)).

A276340 Shift left the greedy A001563-base (A276326) representation of n (append 0 to the right, then convert back to decimal).

Original entry on oeis.org

0, 4, 8, 12, 18, 22, 26, 30, 36, 40, 44, 48, 54, 58, 62, 66, 72, 76, 96, 100, 104, 108, 114, 118, 122, 126, 132, 136, 140, 144, 150, 154, 158, 162, 168, 172, 192, 196, 200, 204, 210, 214, 218, 222, 228, 232, 236, 240, 246, 250, 254, 258, 264, 268, 288, 292, 296, 300, 306, 310, 314, 318, 324, 328, 332, 336, 342, 346, 350, 354, 360
Offset: 0

Views

Author

Antti Karttunen, Sep 01 2016

Keywords

Examples

			   n   A276326  with one zero           converted back
                appended to the right   to decimal = a(n)
---------------------------------------------------------
   0       0            00                     0
   1       1            10                     4
   2       2            20                     8
   3       3            30                    12
   4      10           100                    18
   5      11           110                    22
   6      12           120                    26
   7      13           130                    30
   8      20           200                    36
   9      21           210                    40
  10      22           220                    44
  11      23           230                    48
  12      30           300                    54
  13      31           310                    58
  14      32           320                    62
  15      33           330                    66
  16      40           400                    72
  17      41           410                    76
  18     100          1000                    96
		

Crossrefs

Cf. A276341 (complement).
Cf. also A153880, A255411, A276091.

Programs

Formula

a(0) = 0; for n >= 1, a(n) = A276338(n) + a(A276335(n)).
Other identities:
a(A001563(n)) = A001563(n+1) for all n >= 1.

A276336 The largest digit used when n is written in greedy A001563-base (A276326).

Original entry on oeis.org

0, 1, 2, 3, 1, 1, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 1, 1, 2, 3, 1, 1, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 1, 1, 2, 3, 1, 1, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 1, 1, 2, 3, 1, 1, 2
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

After a(1) = 1 and a(2) = 2, the records occur at positions given by A130744, so that each n >= 3 occurs for the first time at A130744(n-2). This holds because A001563(n) = (n*n!) < A130744(n) = (n+2)*(n*n!) < (n+1)*(n+1)! = A001563(n+1).
First term > 9 occurs thus at A130744(8) = 3225600 with a(3225600)=10.

Crossrefs

Cf. A276091 (indices of terms <= 1).

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[Max@ f@ n, {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)

Formula

a(0) = 0; for n >= 1, a(n) = max(A276333(n), a(A276335(n))).
Showing 1-10 of 12 results. Next