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

A230432 Simple self-inverse permutation of natural numbers: after zero, list each block of A219661(n) numbers in reverse order, from A226061(n+1) to A219665(n).

Original entry on oeis.org

0, 1, 3, 2, 8, 7, 6, 5, 4, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73
Offset: 0

Views

Author

Antti Karttunen, Oct 22 2013

Keywords

Comments

This permutation can be used to map between the sequences A219666 and A230416. E.g. A219666(n) = A230416(a(n)) and vice versa: A230416(n) = A219666(a(n)).

Crossrefs

Analogous sequence for binary system: A218602.

Programs

Formula

a(n) = A219665(A230411(n+1)) - A230431(n) - 1.

A230411 a(n) = minimal k for which A219665(k) >= n; a(n) = one more than the factorial base width (A084558) of the (n-1)th term in the infinite trunk of factorial beanstalk (A219666).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 22 2013

Keywords

Comments

a(1)=1, after which each term n occurs A219661(n-1) times.
Auxiliary function for computing A219666, A230431 and A230432.

Crossrefs

Analogous sequence for binary system: A213711.

Formula

a(n) = 1 + A084558(A219666(n-1)) = 1 + A084558(A230416(n-1)). [Each a(n) is one more than the number of digits needed in factorial base to write the (n-1)-th term in the infinite trunk of factorial beanstalk]

A255062 Number of steps to reach 0 when starting from (2^n)-1 and iterating the map x -> x - (number of runs in binary representation of x): a(n) = A255072(A000225(n)).

Original entry on oeis.org

0, 1, 2, 4, 7, 12, 21, 37, 66, 119, 216, 394, 722, 1330, 2464, 4590, 8591, 16143, 30435, 57550, 109115, 207389, 395046, 754028, 1441972, 2762765, 5303467, 10200386, 19656529, 37948282, 73384081, 142115377, 275551756, 534790473, 1038702981, 2018626773, 3924923938, 7634733313
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2015

Keywords

Comments

Also, for n >= 1, the number of steps to reach 0 when starting from 2^n and iterating the map x -> x minus A005811(x), the number of runs in binary representation of x.

Crossrefs

One more than A255061.
First differences: A255071 (after the zero term).
Analogous sequences: A213710 (A218600), A219665.

Programs

Formula

a(n) = A255072(A000225(n)).
a(0) = 0, a(1) = 1; for n > 1, a(n) = a(n-1) + A255071(n-1).
Other identities. For all n >= 1:
a(n) = A255072(A000079(n)). [See the Comments section.]
a(n) = 1 + A255061(n).

A213710 Number of steps to reach 0 when starting from 2^n and iterating the map x -> x - (number of 1's in binary representation of x): a(n) = A071542(2^n) = A218600(n)+1.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 22, 39, 69, 123, 221, 400, 730, 1344, 2494, 4656, 8728, 16406, 30902, 58320, 110299, 209099, 397408, 757297, 1446946, 2771952, 5323983, 10250572, 19780123, 38243221, 74058514, 143592685, 278661809, 541110612, 1051158028, 2042539461, 3969857206
Offset: 0

Views

Author

Antti Karttunen, Oct 26 2012

Keywords

Comments

Conjecture: A179016(a(n))= 2^n for all n apart from n=2. This is true if all powers of 2 except 2 itself occur in A179016 as in that case they must occur at positions given by this sequence.
This is easy to prove: It suffices to note that after 3 no integer of form (2^k)+1 can occur in A005187, thus for all k >= 2, A213725((2^k)+1) = 1 or equally: A213714((2^k)+1) = 0. - Antti Karttunen, Jun 12 2013

Crossrefs

One more than A218600, which is the partial sums of A213709, thus the latter also gives the first differences of this sequence.
Analogous sequences: A219665, A255062.

Formula

a(n) = A071542(A000079(n)) = A071542(2^n).
a(n) = 1 + A218600(n).

Extensions

a(29)-a(36) from Alois P. Heinz, Jul 03 2022

A219661 Number of steps to go from (n+1)!-1 to n!-1 with map x -> x - (sum of digits in factorial base representation of x).

Original entry on oeis.org

1, 2, 5, 19, 83, 428, 2611, 18473, 150726, 1377548, 13851248, 152610108, 1835293041, 23925573979, 335859122743, 5049372125352, 80942722123544, 1378487515335424, 24858383452927384, 473228664468684846
Offset: 1

Views

Author

Antti Karttunen, Dec 03 2012

Keywords

Examples

			(1!)-1 (0) is reached from (2!)-1 (1) with one step by subtracting A034968(1) from 1.
(2!)-1 (1) is reached from (3!)-1 (5) with two steps by first subtracting A034968(5) from 5 -> 2, and then subtracting A034968(2) from 2 -> 1.
(3!)-1 (5) is reached from (4!)-1 (23) with five steps by repeatedly subtracting the sum of digits in factorial expansion as: 23 - 6 = 17, 17 - 5 = 12, 12 - 2 = 10, 10 - 3 = 7, 7 - 2 = 5.
Thus a(1)=1, a(2)=2 and a(3)=5.
		

Crossrefs

Row sums of A230420 and A230421.
Cf. also A213709 (analogous sequence for base-2), A261234 (for base-3).

Programs

  • Mathematica
    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 *)
  • Scheme
    (define (A219661 n) (if (zero? n) n (let loop ((i (-1+ (A000142 (1+ n)))) (steps 1)) (cond ((isA000142? (1+ (A219651 i))) steps) (else (loop (A219651 i) (1+ steps)))))))
    (define (isA000142? n) (and (> n 0) (let loop ((n n) (i 2)) (cond ((= 1 n) #t) ((not (zero? (modulo n i))) #f) (else (loop (/ n i) (1+ i)))))))
    ;; Alternative definition:
    (define (A219661 n) (- (A219652 (-1+ (A000142 (1+ n)))) (A219652 (-1+ (A000142 n)))))

Formula

a(n) = A219652((n+1)!-1) - A219652(n!-1).
a(n) = A219662(n) + A219663(n).

Extensions

Terms a(16) - a(20) computed with Hiroaki Yamanouchi's Python-program by Antti Karttunen, Jun 27 2016

A226061 Partial sums of A219661.

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

Views

Author

Antti Karttunen, May 28 2013

Keywords

Comments

a(n) tells the position of (n!)-1 in A219666.

Crossrefs

One less than A219665.
Analogous sequence for binary system: A218600.
Cf. also A230410, A231719.

Programs

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

Formula

a(n) = a(n-1) + A219661(n-1) with a(1) = 0.
a(n) = A219652(n!-1).
a(n) = A219665(n) - 1.

Extensions

Terms a(16) - a(21) computed from the new terms of A219661 by Antti Karttunen, Jun 27 2016

A230431 After the first zero, integers from 0 to A219661(n)-1 followed by integers from 0 to A219661(n+1)-1, etc.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44
Offset: 0

Views

Author

Antti Karttunen, Oct 22 2013

Keywords

Crossrefs

Cf. A219661, A219665, A230411. Used to compute A230432.
Analogous sequence for binary system: A218601.

Programs

Formula

a(0) = a(1) = 0, and for n > 1, a(n) = n - A219665(A230411(n+1)-1).
Showing 1-7 of 7 results.