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

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)).

A230423 a(n) = smallest natural number x such that x=n+A034968(x), or zero if no such number exists.

Original entry on oeis.org

0, 2, 4, 0, 0, 6, 8, 10, 0, 0, 12, 14, 16, 0, 0, 18, 20, 22, 0, 0, 0, 0, 0, 24, 26, 28, 0, 0, 30, 32, 34, 0, 0, 36, 38, 40, 0, 0, 42, 44, 46, 0, 0, 0, 0, 0, 48, 50, 52, 0, 0, 54, 56, 58, 0, 0, 60, 62, 64, 0, 0, 66, 68, 70, 0, 0, 0, 0, 0, 72, 74, 76, 0, 0, 78
Offset: 0

Views

Author

Antti Karttunen, Oct 31 2013

Keywords

Comments

Also, if n can be partitioned into sum d1*(k1!-1) + d2*(k2!-1) + ... + dj*(kj!-1), where all k's are distinct and greater than one and each di is in range [1,ki] (in other words, if A230412(n)=1), then a(n) = d1*k1! + d2*k2! + ... + dj*kj!. If this is not possible, then n is one of the terms of A219658, and a(n)=0.

Crossrefs

a(A219650(n)) = A005843(n) = 2n. Cf. also A230414, A230424.
Can be used to compute A230425-A230427.
This sequence relates to the factorial base representation (A007623) in a similar way as A213723 relates to the binary system.

Programs

  • Scheme
    (define (A230423 n) (let loop ((k n)) (cond ((= (A219651 k) n) k) ((> k (+ n n)) 0) (else (loop (+ 1 k))))))

Formula

a(n) = 2*A230414(n).

A230424 a(n) = largest natural number x such that x=n+A034968(x), or zero if no such number exists.

Original entry on oeis.org

1, 3, 5, 0, 0, 7, 9, 11, 0, 0, 13, 15, 17, 0, 0, 19, 21, 23, 0, 0, 0, 0, 0, 25, 27, 29, 0, 0, 31, 33, 35, 0, 0, 37, 39, 41, 0, 0, 43, 45, 47, 0, 0, 0, 0, 0, 49, 51, 53, 0, 0, 55, 57, 59, 0, 0, 61, 63, 65, 0, 0, 67, 69, 71, 0, 0, 0, 0, 0, 73, 75, 77, 0, 0, 79
Offset: 0

Views

Author

Antti Karttunen, Oct 31 2013

Keywords

Crossrefs

Cf. A034968, A230414. a(A219650(n)) = A005408(n) = 2n+1.
One more than A230423 at its nonzero points. A219658 gives the positions of zeros. Can be used to compute A230425-A230427.
Analogous sequence for binary system: A213724.

Programs

  • Scheme
    (define (A230424 n) (if (zero? n) 1 (let ((v (A230423 n))) (if (zero? v) v (+ 1 v)))))

Formula

a(n) = A230412(n)*(A230423(n)+1).

A230427 a(n)=0 if n is in the infinite trunk of factorial beanstalk (in A219666), otherwise the number of nodes (including leaves and the node n itself) in that finite branch of the beanstalk.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 3, 0, 1, 1, 0, 5, 0, 1, 1, 3, 3, 0, 1, 1, 1, 1, 1, 0, 3, 0, 1, 1, 0, 5, 0, 1, 1, 3, 7, 0, 1, 1, 3, 3, 0, 1, 1, 1, 1, 1, 0, 5, 0, 1, 1, 3, 0, 5, 1, 1, 5, 0, 3, 1, 1, 3, 5, 0, 1, 1, 1, 1, 1, 3, 0, 5, 1, 1, 0, 11, 3, 1, 1, 0, 7, 3, 1, 1, 3, 0, 5
Offset: 0

Views

Author

Antti Karttunen, Nov 10 2013

Keywords

Comments

This sequence relates to the factorial base representation (A007623) in the same way as A213727 relates to the binary system.

Examples

			From 11 sprouts the following finite side-tree of "factorial beanstalk":
    18  19
     \  /
  14  15
   \  /
    11
Its leaves are the numbers 14, 18 and 19 (which all occur in A219658), whose factorial base representations (see A007623) are '210', '300' and '301' respectively. The corresponding parent nodes are obtained by subtracting the sum of factorial base digits, thus we get 18-3 = 15 and also 19-4 = 15, thus 15 ('211' in factorial base) is the parent of 18 and 19. For 14 and 15 we get 14-3 = 15-4 = 11, thus 11 is the parent of both 14 and 15, and the common ancestor of all numbers 11, 14, 15, 18 and 19.
For numbers not occurring in A219666 this sequence gives 1 + the number of all descendant nodes in such subtrees. Thus a(11)=5, a(14)=1 (counting just the leaf 14 itself), a(15)=3 and a(18) = a(19) = 1.
		

Crossrefs

A219658 gives the position of ones (leaves). Cf. also A230407, A230423-A230424, A230425-A230426, A230430.

Formula

If A230412(n)=0, a(n)=1; otherwise, if n is in A219666, a(n)=0; otherwise a(n) = 1 + a(A230423(n)) + a(A230424(n)).
Alternatively, if A230426(n)=0, a(n)=0; otherwise (2*A230426(n))-1.

A230426 a(n)=0 if n is in the infinite trunk of factorial beanstalk (in A219666), otherwise the number of terminal nodes (leaves) in that finite branch of the beanstalk.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 10 2013

Keywords

Comments

This sequence relates to the factorial base representation (A007623) in the same way as A213726 relates to the binary system.

Examples

			From 11 sprouts the following finite side-tree of "factorial beanstalk":
    18  19
     \  /
  14  15
   \  /
    11
Its leaves are the numbers 14, 18 and 19 (which all occur in A219658), whose factorial base representations (see A007623) are '210', '300' and '301' respectively. The corresponding parent nodes are obtained by subtracting the sum of factorial base digits, thus we get 18-3 = 15 and also 19-4 = 15, thus 15 ('211' in factorial base) is the parent of 18 and 19. For 14 and 15 we get 14-3 = 15-4 = 11, thus 11 is the parent of both 14 and 15, and the common ancestor of all numbers 11, 14, 15, 18 and 19.
For numbers not occurring in A219666 this sequence gives the number of leaves in such subtrees. Thus a(11)=3, a(14)=1 (counting just the leaf 14 itself), a(15)=2 and a(18) = a(19) = 1.
		

Crossrefs

A219658 gives the position of ones in this sequence (which are the leaves of the tree).
Differs from A230425 for the first time at n=34, where a(n)=4, while A230425(34)=3. Cf. also A230427.

Formula

If A230412(n)=0, a(n)=1; otherwise, if n is in A219666, a(n)=0; otherwise a(n) = a(A230423(n)) + a(A230424(n)).
Showing 1-5 of 5 results.