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

A219657 Positions of zeros in A219659.

Original entry on oeis.org

0, 2, 5, 8, 12, 16, 21, 26, 32, 38, 44, 50, 57, 64, 71, 78, 86, 94, 102, 110, 119, 128, 137, 146, 156, 166, 177, 188, 199, 210, 222, 234, 246, 258, 271, 284, 297, 310, 324, 338, 352, 366, 381, 396, 411, 426, 441, 456, 472, 488, 504, 520, 537, 554, 571, 588, 606
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2012

Keywords

Crossrefs

Cf. A219656, A219659. Analogous sequence for binary system: A213707, for Zeckendorf expansion: A219647.

Programs

Formula

a(n) = n + A219656(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)).

A219651 a(n) = n minus (sum of digits in factorial base expansion of n).

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 5, 5, 6, 6, 7, 7, 10, 10, 11, 11, 12, 12, 15, 15, 16, 16, 17, 17, 23, 23, 24, 24, 25, 25, 28, 28, 29, 29, 30, 30, 33, 33, 34, 34, 35, 35, 38, 38, 39, 39, 40, 40, 46, 46, 47, 47, 48, 48, 51, 51, 52, 52, 53, 53, 56, 56, 57, 57, 58, 58, 61, 61
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2012

Keywords

Comments

See A007623 for the factorial base number system representation.

Crossrefs

Bisection: A219650. Analogous sequence for binary system: A011371, for Zeckendorf expansion: A219641.

Programs

  • Mathematica
    (* First run program for A007623 to define factBaseIntDs *) Table[n - Plus@@factBaseIntDs[n], {n, 0, 99}] (* Alonso del Arte, Nov 25 2012 *)
  • Python
    from itertools import count
    def A219651(n):
        c, f = 0, 1
        for i in count(2):
            f *= i
            if f>n:
                break
            c += (i-1)*(n//f)
        return c # Chai Wah Wu, Oct 11 2024
  • Scheme
    (define (A219651 n) (- n (A034968 n)))
    

Formula

a(n) = n - A034968(n).

A219652 Number of steps to reach 0 starting with n and using the iterated process: x -> x - (sum of digits in factorial expansion of x).

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2012

Keywords

Comments

See A007623 for the factorial number system representation.

Crossrefs

Analogous sequence for binary system: A071542, for Zeckendorf expansion: A219642. Cf. A007623, A034968, A219650, A219651, A219653-A219655, A219659, A219661, A219666.

Programs

  • Mathematica
    nn = 72; m = 1; While[Factorial@ m < nn, m++]; m; Table[Length@ NestWhileList[# - Total@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, n, # > 0 &] - 1, {n, 0, nn}] (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)

Formula

a(0)=0; for n>0, a(n) = 1 + a(A219651(n)).

Extensions

Erroneous description corrected by Antti Karttunen, Dec 03 2012

A219653 Least inverse of A219652; a(n) = minimal i such that A219652(i) = n.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 12, 16, 20, 24, 26, 30, 34, 38, 42, 48, 52, 56, 60, 66, 72, 78, 84, 90, 96, 102, 108, 116, 120, 122, 126, 130, 134, 138, 144, 148, 152, 156, 162, 168, 174, 180, 186, 192, 198, 204, 212, 218, 226, 234, 240, 244, 248, 252, 258, 264, 270, 276
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2012

Keywords

Crossrefs

Cf. A219655 for the greatest inverse. A219654 gives the first differences.
This sequence is based on Factorial number system: A007623. Analogous sequence for binary system: A213708 and for Zeckendorf expansion: A219643. Cf. A219652, A219659, A219666.

A219654 Run lengths in A219652.

Original entry on oeis.org

1, 1, 2, 2, 2, 4, 4, 4, 4, 2, 4, 4, 4, 4, 6, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 4, 2, 4, 4, 4, 4, 6, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 8, 8, 6, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 8, 8, 6, 8, 10, 6, 6, 6, 6, 6, 6, 6, 8, 6, 8, 8, 6, 8, 10, 8, 10, 12, 6
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2012

Keywords

Comments

a(n) tells from how many starting values one can end to 0 in n steps, with the iterative process described in A219652 (if going around in 0->0 loop is disallowed).

Crossrefs

a(n) = 1+(A219655(n)-A219653(n)). This sequence is based on Factorial number system: A007623. Analogous sequence for binary system: A086876, for Zeckendorf expansion: A219644. Cf. A219652, A219659, A219666.

Formula

a(n) = A219653(n+1)-A219653(n). (The first differences of A219653).

A230416 The infinite trunk of factorial beanstalk (A219666) with reversed subsections.

Original entry on oeis.org

0, 1, 5, 2, 23, 17, 12, 10, 7, 119, 109, 102, 97, 92, 85, 79, 74, 70, 63, 57, 52, 48, 46, 40, 35, 30, 28, 25, 719, 704, 693, 680, 670, 658, 648, 641, 630, 623, 612, 605, 597, 584, 574, 562, 552, 545, 534, 527, 516, 509, 501, 492, 486, 481, 476, 465, 455, 443
Offset: 0

Views

Author

Antti Karttunen, Oct 22 2013

Keywords

Comments

Can be viewed also as an irregular table: after the initial zero on row 0, start each row n with (n!)-1 and subtract repeatedly the sum of factorial expansion digits (A034968) to get successive terms, until the number that has already been listed [which is always (n-1)!-1] is encountered, which is not listed second time, but instead, the current row is finished and the next row starts with ((n+1)!-1), with the same process repeated.
Contains the terms in the infinite trunk of factorial beanstalk (A219666) listed in partially reversed manner: after the initial zero each subsequence lists A219661(n) successive terms from A219666, descending from (n!)-1 downwards.

Examples

			This irregular table begins as:
0;
1;
5, 2;
23, 17, 12, 10, 7;
119, 109, 102, 97, 92, 85, 79, 74, 70, 63, 57, 52, 48, 46, 40, 35, 30, 28, 25;
...
After the initial zero (on row 0), each row n is A219661(n) elements long.
		

Crossrefs

The rows are the initial portions of every (n!-1)th row in A219659.
Analogous sequence for binary system: A218616.

Formula

For n < 3, a(n) = (n+1)!-1, and for n >= 3, a(n) = (k+2)!-1 if A219651(a(n-1)) is of form k!-1, otherwise just A219651(a(n-1)).
a(n) = A219666(A230432(n)). [Consequence of the definitions]

A219649 Irregular table, where row n (n >= 0) starts with n, the next term is A219641(n), and the successive terms are obtained by repeatedly subtracting the number of 1's in the previous term's Zeckendorf expansion, until zero is reached, after which the next row starts with one larger n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 24 2012

Keywords

Comments

Rows converge towards A219648 (reversed).
See A014417 for the Fibonacci number system representation, also known as Zeckendorf expansion.

Crossrefs

Cf. A007895, A014417, A219641, A219647. Analogous sequence for binary system: A218254, for factorial number system: A219659.
Showing 1-8 of 8 results.