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

A075158 Prime factorization of n+1 encoded with the run lengths of binary expansion.

Original entry on oeis.org

0, 1, 2, 3, 5, 4, 10, 7, 6, 11, 21, 8, 42, 20, 9, 15, 85, 12, 170, 23, 22, 43, 341, 16, 13, 84, 14, 40, 682, 19, 1365, 31, 41, 171, 18, 24, 2730, 340, 86, 47, 5461, 44, 10922, 87, 17, 683, 21845, 32, 26, 27, 169, 168, 43690, 28, 45, 80, 342, 1364, 87381, 39, 174762
Offset: 0

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

a(2n) = 1 or 2 mod 4 and a(2n+1) = 0 or 3 mod 4 for all n > 1

Examples

			a(1) = 1 as 2 = 2^1, a(2) = 2 (10 in binary) as 3 = 3^1 * 2^0, a(3) = 3 (11) as 4 = 2^2, a(4) = 5 (101) as 5 = 5^1 * 3^0 * 2^0, a(5) = 4 (100) as 6 = 3^1 * 2^1, a(8) = 6 (110) as 9 = 3^2 * 2^0, a(11) = 8 (1000) as 12 = 3^1 * 2^2, a(89) = 35 (100011) as 90 = 5^1 * 3^2 * 2^1, a(90) = 90 (1011010) as 91 = 13^1 * 11^0 * 7^1 * 5^0 * 3^0 * 2^0.
The binary expansion of a(n) begins from the left with as many 1's as is the exponent of the largest prime present in the factorization of n+1 and from then on follows runs of ej+1 zeros and ones alternatively, where ej are the corresponding exponents of the successively lesser primes (0 if that prime does not divide n+1).
		

Crossrefs

Inverse of A075157. a(n) = A075160(n+1)-1. a(A006093(n)) = A000975(n). Cf. A059884.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a075158 = fromJust . (`elemIndex` a075157_list)
    -- Reinhard Zumkeller, Aug 04 2014

A075159 Run lengths in the binary expansion of n-1 gives the vector of exponents in prime factorization of a(n), with the least significant run corresponding to the exponent of the least prime, 2.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 9, 8, 12, 15, 7, 10, 18, 25, 27, 16, 24, 45, 35, 30, 14, 11, 21, 20, 36, 75, 49, 50, 54, 125, 81, 32, 48, 135, 175, 90, 70, 77, 105, 60, 28, 33, 13, 22, 42, 55, 63, 40, 72, 225, 245, 150, 98, 121, 147, 100, 108, 375, 343, 250, 162, 625, 243, 64, 96, 405
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

To make this a permutation of nonnegative integers, we subtract one from each run count except for the most significant run, e.g. a(12) = 10, as 12-1 = 11 = 1011 and 10 = 5^1 * 3^(1-1) * 2^(2-1).

Crossrefs

Inverse of A075160. a(n) = A075157(n-1)+1.
Showing 1-2 of 2 results.