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-6 of 6 results.

A231718 Positions of ones in A231717.

Original entry on oeis.org

1, 8, 14, 18, 22, 33, 37, 41, 45, 53, 57, 61, 71, 75, 87, 116, 120, 124, 128, 136, 140, 144, 154, 158, 170, 208, 212, 216, 226, 230, 242, 289, 293, 305, 362, 544, 548, 552, 556, 564, 568, 572, 582, 586, 598, 636, 640, 644, 654, 658, 670, 717, 721, 733, 790, 1021
Offset: 1

Views

Author

Antti Karttunen, Nov 12 2013

Keywords

Comments

This sequence gives all n at which positions the successive terms A219666(n-1) & A219666(n) in the infinite trunk of the factorial beanstalk differ only in one digit position in their factorial base representations (A007623) and the difference of those digits is exactly one.

Examples

			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 the third least significant digits, and 3-2 = 1.
		

Crossrefs

Subset of A230422.

Formula

For all n, A230406(a(n)) = A000142(A231719(a(n))).

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

Views

Author

Antti Karttunen, Nov 25 2012

Keywords

Comments

a(n) tells in what number we end in n steps, when we start climbing up the infinite trunk of the "factorial beanstalk" from its root (zero).
There are many finite sequences such as 0,1,2,4; 0,1,2,5,6; etc. obeying the same condition (see A219659) and as the length increases, so (necessarily) does the similarity to this infinite sequence.
See A007623 for the factorial number system representation.

Crossrefs

Cf. A007623, A034968, A219651, A230411, A226061. For all n, A219652(a(n)) = n and A219653(n) <= a(n) <= A219655(n).
Characteristic function: Χ_A219666(n) = A230418(n+1)-A230418(n).
The first differences: A230406.
Subsets: A230428 & A230429.
Analogous sequence for binary system: A179016, for Fibonacci number system: A219648.

Programs

  • Mathematica
    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 *)
  • Scheme
    ;; 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)))))

Formula

a(0) = 0, a(1) = 1, and for n>1, if A226061(A230411(n)) = n then a(n) = A230411(n)!-1, otherwise a(n) = a(n+1) - A034968(a(n+1)).
a(n) = A230416(A230432(n)).

A230410 After a(0)=0, a(n) = A230415(A219666(n),A219666(n-1)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 10 2013

Keywords

Comments

After zero, a(n) = number of positions where digits in the factorial base representations of successive nodes A219666(n-1) and A219666(n) in the infinite trunk of the factorial beanstalk differ from each other.

Examples

			a(8) = 1, because A219666(8)=23, whose factorial base representation (A007623(23)) is '321', and A219666(7)=17, whose factorial base representation (A007623(17)) is '221', and they differ just in one digit position.
a(9) = 3, because A219666(9)=25, '...01001' in factorial base, which differs from '...0321' in three digit positions.
Note that A226061(4)=8 (A226061(n) tells the position of (n!)-1 in A219666), and 1+2+3 = 6 happens to be both a triangular number (A000217) and a factorial number (A000142).
The next time 1 occurs in this sequence because of this coincidence is at x=A226061(16) (whose value is currently not known), as at that point A219666(x) = 16!-1 = 20922789887999, whose factorial base representation is (15,14,13,12,11,10,9,8,7,6,5,4,3,2,1), and A000217(15) = 120 = A000142(5), which means that A219666(x-1) = A219651(20922789887999) = 20922789887879, whose factorial base representation is (15,14,13,12,11,10,9,8,7,6,4,4,3,2,1), which differs only in one position from the previous.
Of course 1's occur in this sequence for other reasons as well.
		

Crossrefs

Cf. A230415, A230406, A231717, A231719, A232094. A230422 gives the positions of ones.

Programs

  • Mathematica
    nn = 1200; m = 1; While[m! < nn, m++]; m; f[n_] := IntegerDigits[n, MixedRadix[Reverse@ Range[2, m]]]; Join[{0}, 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@ # &, nn, # > 0 &], # <= 500 &]] (* Michael De Vlieger, Jun 27 2016, Version 10 *)
  • Scheme
    (define (A230410 n) (if (zero? n) n (A230415bi (A219666 n) (A219666 (- n 1))))) ;; Where bi-variate function A230415bi has been given in A230415.

Formula

a(0)=0, and for n>=1, a(n) = A230415(A219666(n),A219666(n-1)).
For all n, a(A226061(n+1)) = A232094(n).

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

Views

Author

Antti Karttunen, Nov 12 2013

Keywords

Comments

The first 4 occurs at n=2206. The first 5 occurs at n = 361788001015 = A226061(16).

Crossrefs

Programs

  • Mathematica
    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 *)
  • Scheme
    (define (A231719 n) (if (zero? n) n (A055881 (A230406 n))))

Formula

a(0)=0 and for n>=1, a(n) = A055881(A230406(n)).
For all n, a(A226061(n+1)) = A232096(n).

A231713 Square array A(i,j) = the sum of absolute values of digit differences in the matching positions of 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, 2, 1, 0, 1, 2, 3, 3, 1, 1, 3, 3, 1, 2, 1, 0, 1, 2, 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, 3, 2, 1, 2, 3, 0, 3, 2, 1, 2, 3, 4, 4, 2, 2, 4, 4, 4, 4, 2, 2, 4, 4, 2, 3, 2, 1, 2, 3, 0, 3, 2, 1, 2, 3, 2, 3, 3, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 3, 3, 3, 2, 3, 2, 1, 2, 1, 0, 1, 2, 1, 2, 3, 2, 3
Offset: 0

Views

Author

Antti Karttunen, Nov 12 2013

Keywords

Comments

This table relates to the factorial base representation (A007623) in a similar way as A101080 relates to the binary system. See A230415 for another analog.

Examples

			The top left corner of this square array begins as:
0, 1, 1, 2, 2, 3, 1, 2, 2, 3, 3, ...
1, 0, 2, 1, 3, 2, 2, 1, 3, 2, 4, ...
1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 2, ...
2, 1, 1, 0, 2, 1, 3, 2, 2, 1, 3, ...
2, 3, 1, 2, 0, 1, 3, 4, 2, 3, 1, ...
3, 2, 2, 1, 1, 0, 4, 3, 3, 2, 2, ...
1, 2, 2, 3, 3, 4, 0, 1, 1, 2, 2, ...
2, 1, 3, 2, 4, 3, 1, 0, 2, 1, 3, ...
2, 3, 1, 2, 2, 3, 1, 2, 0, 1, 1, ...
3, 2, 2, 1, 3, 2, 2, 1, 1, 0, 2, ...
3, 4, 2, 3, 1, 2, 2, 3, 1, 2, 0, ...
...
For example, A(1,2) = A(2,1) = 2 as 1 has factorial base representation '...0001' and 2 has factorial base representation '...0010', and adding the absolute values of the digit differences, we get 1+1 = 2.
On the other hand, A(3,5) = A(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, the absolute value of difference being 1.
Note that as A007623(6)='100' and A007623(10)='120', we have A(6,10) = A(10,6) = 2.
		

Crossrefs

The topmost row and the leftmost column: A034968.
Only the lower triangular region: A231714. Related tables: A230415, A230419. Cf. also A101080, A231717.

Programs

  • Scheme
    (define (A231713 n) (A231713bi (A025581 n) (A002262 n)))
    (define (A231713bi 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 (abs (- (modulo x i) (modulo y i)))))))))

Formula

Each entry A(i,j) >= A230415(i,j) and also each entry A(i,j) >= abs(A230419(i,j)).

A232095 Minimal number of factorials which add to 0+1+2+...+n; a(n) = A034968(A000217(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 18 2013

Keywords

Comments

1's occur at positions n=1, n=3 and n=15 as they are such natural numbers that A000217(n) is also one of the factorial numbers (A000142), as we have A000217(1) = 1 = 1!, A000217(3) = 1+2+3 = 6 = 3! and A000217(15) = 1 + 2 + ... + 15 = 120 = 5!
On the other hand, a(2)=2, as A000217(2) = 1+2 = 3 = 2! + 1!. Is this the only occurrence of 2?
Are some numbers guaranteed to occur an infinite number of times?

Crossrefs

Programs

Formula

a(n) = A034968(A000217(n)).
a(n) = A231717(A226061(n+1)). [Not a practical way to compute this sequence. Please see comments at A231717.]
For all n, a(n) >= A232094(n).
Showing 1-6 of 6 results.