Original entry on oeis.org
1, 8, 14, 16, 18, 22, 33, 35, 37, 41, 45, 51, 53, 57, 61, 71, 75, 82, 87, 96, 106, 116, 118, 120, 124, 128, 134, 136, 140, 144, 154, 158, 165, 170, 179, 189, 198, 200, 206, 208, 212, 216, 226, 230, 237, 242, 251, 261, 270, 272, 280, 289, 293, 300, 305, 314, 324
Offset: 1
14 is included, because A219666(13) = 40 = '1220' in factorial base representation, while A219666(14) = 46 = '1320' in factorial base, and they differ only by their third least significant digit.
16 is included, because A219666(15) = 48 = '2000' in factorial base representation, while A219666(16) = 52 = '2020' in factorial base, and they differ only by their second least significant digit.
-
nn = 10^4; m = 1; While[m! < Floor[6 nn/5], m++]; m; f[n_] := IntegerDigits[n, MixedRadix[Reverse@ Range[2, m]]]; Position[#, 1] &[Function[w, Count[Subtract @@ Map[PadLeft[#, Max@ Map[Length, w]] &, w], k_ /; k != 0]]@ Map[f@ # &, {#1, #2}] & @@@ Partition[#, 2, 1] &@ TakeWhile[Reverse@ NestWhileList[# - Total@ f@ # &, Floor[6 nn/5], # > 0 &], # <= nn &]] // Flatten (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
A219666
The infinite trunk of factorial expansion beanstalk. The only infinite sequence such that a(n-1) = a(n) - sum of digits in factorial expansion of a(n).
Original entry on oeis.org
0, 1, 2, 5, 7, 10, 12, 17, 23, 25, 28, 30, 35, 40, 46, 48, 52, 57, 63, 70, 74, 79, 85, 92, 97, 102, 109, 119, 121, 124, 126, 131, 136, 142, 144, 148, 153, 159, 166, 170, 175, 181, 188, 193, 198, 204, 213, 221, 228, 238, 240, 244, 249, 255, 262, 266, 271, 277
Offset: 0
Analogous sequence for binary system:
A179016, for Fibonacci number system:
A219648.
-
nn = 10^3; m = 1; While[m! < Floor[6 nn/5], m++]; m; t = TakeWhile[Reverse@ NestWhileList[# - Total@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, Floor[6 nn/5], # > 0 &], # <= nn &] (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
-
;; Memoizing definec-macro from Antti Karttunen's IntSeq-library
(definec (A219666 n) (cond ((<= n 2) n) ((= (A226061 (A230411 n)) n) (- (A000142 (A230411 n)) 1)) (else (- (A219666 (+ n 1)) (A034968 (A219666 (+ n 1)))))))
;; Another variant, utilizing A230416 (which gives a more convenient way to compute large number of terms of this sequence):
(define (A219666 n) (A230416 (A230432 n)))
;; This function is for checking whether n belongs to this sequence:
(define (inA219666? n) (or (zero? n) (= 1 (- (A230418 (+ 1 n)) (A230418 n)))))
Original entry on oeis.org
0, 1, 3, 8, 27, 110, 538, 3149, 21622, 172348, 1549896, 15401144, 168011252, 2003304293, 25928878272, 361788001015, 5411160126367, 86353882249911, 1464841397585335, 26323224850512719, 499551889319197565
Offset: 1
Analogous sequence for binary system:
A218600.
-
Accumulate@ Table[Length@ NestWhileList[# - Total@ IntegerDigits[#,
MixedRadix[Reverse@ Range[2, 120]]] &, (n + 1)! - 1, # > n! - 1 &] - 1, {n, 0, 8}] (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
A230406
a(n) = A034968(A219666(n)); after zero, the differences between successive nodes in the infinite trunk of the factorial beanstalk (A219666).
Original entry on oeis.org
0, 1, 1, 3, 2, 3, 2, 5, 6, 2, 3, 2, 5, 5, 6, 2, 4, 5, 6, 7, 4, 5, 6, 7, 5, 5, 7, 10, 2, 3, 2, 5, 5, 6, 2, 4, 5, 6, 7, 4, 5, 6, 7, 5, 5, 6, 9, 8, 7, 10, 2, 4, 5, 6, 7, 4, 5, 6, 7, 5, 5, 6, 8, 6, 8, 8, 7, 10, 11, 4, 5, 6, 7, 5, 5, 6, 8, 6, 8, 8, 7, 10, 12, 10, 11
Offset: 0
A231719
After zero, a(n) = largest m such that m! divides the difference between successive nodes A219666(n-1) and A219666(n) in the infinite trunk of the factorial beanstalk.
Original entry on oeis.org
0, 1, 1, 1, 2, 1, 2, 1, 3, 2, 1, 2, 1, 1, 3, 2, 2, 1, 3, 1, 2, 1, 3, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 3, 2, 2, 1, 3, 1, 2, 1, 3, 1, 1, 1, 3, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 3, 1, 1, 1, 3, 2, 3, 2, 2, 1, 2, 1, 2, 1, 3, 1, 1, 1, 3, 2, 3, 2, 2, 1, 2, 3, 2, 1, 1, 1
Offset: 0
-
nn = 1200; m = 1; While[Factorial@ m < nn, m++]; m; t = TakeWhile[
Reverse@ NestList[# - Total@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, nn, 182], # <= 1000 &]; {0}~Join~Table[SelectFirst[Reverse@ Range@ 10, Divisible[t[[n]] - t[[n - 1]], #!] &], {n, 2, 87}] (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
-
(define (A231719 n) (if (zero? n) n (A055881 (A230406 n))))
A230415
Square array T(i,j) giving the number of differing digits in the factorial base representations of i and j, for i >= 0, j >= 0, read by antidiagonals.
Original entry on oeis.org
0, 1, 1, 1, 0, 1, 2, 2, 2, 2, 1, 1, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 0, 1, 2, 1, 2, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 2, 2, 1, 2, 2, 0, 2, 2, 1, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 1, 2, 2, 1, 2, 2, 0, 2, 2, 1, 2, 2, 1, 2, 2, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 2, 2, 2, 1, 2, 2, 1, 2, 1, 0, 1, 2, 1, 2, 2, 1, 2
Offset: 0
The top left corner of this square array begins as:
0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 2, ...
1, 0, 2, 1, 2, 1, 2, 1, 3, 2, 3, ...
1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 2, ...
2, 1, 1, 0, 2, 1, 3, 2, 2, 1, 3, ...
1, 2, 1, 2, 0, 1, 2, 3, 2, 3, 1, ...
2, 1, 2, 1, 1, 0, 3, 2, 3, 2, 2, ...
1, 2, 2, 3, 2, 3, 0, 1, 1, 2, 1, ...
2, 1, 3, 2, 3, 2, 1, 0, 2, 1, 2, ...
2, 3, 1, 2, 2, 3, 1, 2, 0, 1, 1, ...
3, 2, 2, 1, 3, 2, 2, 1, 1, 0, 2, ...
2, 3, 2, 3, 1, 2, 1, 2, 1, 2, 0, ...
...
For example, T(1,2) = T(2,1) = 2 as 1 has factorial base representation '...0001' and 2 has factorial base representation '...0010', and they differ by their two least significant digits.
On the other hand, T(3,5) = T(5,3) = 1, as 3 has factorial base representation '...0011' and 5 has factorial base representation '...0021', and they differ only by their second rightmost digit.
Note that as A007623(6)='100' and A007623(10)='120', we have T(6,10) = T(10,6) = 1 (instead of 2 as in A231713, cf. also its Example section), as here we count only the number of differing digit positions, but ignore the magnitudes of their differences.
The topmost row and the leftmost column:
A060130.
-
nn = 14; m = 1; While[m! < nn, m++]; m; Table[Function[w, Count[Subtract @@ Map[PadLeft[#, Max@ Map[Length, w]] &, w], k_ /; k != 0]]@ Map[IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, {i - j, j}], {i, 0, nn}, {j, 0, i}] // Flatten (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
-
(define (A230415 n) (A230415bi (A025581 n) (A002262 n)))
(define (A230415bi x y) (let loop ((x x) (y y) (i 2) (d 0)) (cond ((and (zero? x) (zero? y)) d) (else (loop (floor->exact (/ x i)) (floor->exact (/ y i)) (+ i 1) (+ d (if (= (modulo x i) (modulo y i)) 0 1)))))))
Original entry on oeis.org
0, 1, 2, 2, 3, 3, 3, 3, 1, 6, 3, 3, 3, 2, 1, 6, 2, 3, 1, 3, 5, 3, 1, 3, 6, 2, 2, 3, 10, 3, 3, 3, 2, 1, 6, 2, 3, 1, 3, 5, 3, 1, 3, 6, 2, 1, 3, 5, 5, 3, 10, 2, 3, 1, 3, 5, 3, 1, 3, 6, 2, 1, 2, 4, 2, 4, 5, 3, 3, 9, 3, 1, 3, 6, 2, 1, 2, 4, 2, 4, 5, 3, 2, 4, 3, 10
Offset: 0
A231718 gives the positions of ones.
A232094
a(n) = A060130(A000217(n)); number of nonzero digits in factorial base representation (A007623) of 0+1+2+...+n.
Original entry on oeis.org
0, 1, 2, 1, 2, 3, 3, 2, 2, 4, 3, 2, 2, 3, 4, 1, 3, 5, 4, 4, 3, 5, 3, 3, 3, 4, 5, 2, 4, 4, 5, 3, 2, 5, 4, 3, 3, 4, 4, 3, 3, 5, 6, 5, 4, 5, 3, 3, 3, 4, 5, 3, 5, 6, 5, 3, 4, 6, 5, 4, 4, 5, 6, 3, 5, 6, 4, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 4, 6, 5, 2, 6, 5, 3, 4, 4, 5
Offset: 0
-
a[n_] := Module[{k = n*(n+1)/2, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; Count[s, ?(# > 0 &)]]; Array[a, 100, 0] (* _Amiram Eldar, Feb 07 2024 *)
-
(define (A232094 n) (A060130 (A000217 n)))
Showing 1-8 of 8 results.
Comments