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

A345874 a(n) is the number of distinct pairs of positive integers (u, v) such that A065157(u, v) = n.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jun 27 2021

Keywords

Comments

If A065157(u, v) = n then u is a divisor of n.

Examples

			For n = 10:
- the table A065157(u, v) begins (with terms > 10 replaced by dots):
  u\v|   1   2   3  4  5  6  7  8  9  10
  ---+----------------------------------
    1|   1   2   3  4  5  6  7  8  9  10
    2|   2   4  10  8  .  .  .  .  .  .
    3|   3   6  .   .  .  .  .  .  .  .
    4|   4   8  .   .  .  .  .  .  .  .
    5|   5  10  .   .  .  .  .  .  .  .
    6|   6  .   .   .  .  .  .  .  .  .
    7|   7  .   .   .  .  .  .  .  .  .
    8|   8  .   .   .  .  .  .  .  .  .
    9|   9  .   .   .  .  .  .  .  .  .
   10|  10  .   .   .  .  .  .  .  .  .
- the value 10 appears 4 times,
- so a(10) = 4.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) <= A000005(n).
a(n) >= 2 for any n > 1 (as A065157(1, n) = A065157(n, 1) = n).
a(2^k) = k + 1 for any k >= 0.
a(2^k - 1) = A000005(k) for any k > 0.

A065159 Binary string self-substitutions: a(n) is obtained by substituting the binary expansion of n for each 1-bit in the binary expansion of n.

Original entry on oeis.org

0, 1, 4, 15, 16, 85, 108, 511, 64, 585, 660, 5819, 816, 7085, 7644, 65535, 256, 4369, 4644, 78451, 5200, 87381, 91564, 1531639, 6336, 105625, 109876, 1825659, 118384, 1961821, 2029500, 33554431, 1024, 33825, 34884, 1149155, 37008, 1217189, 1250124, 41056743
Offset: 0

Views

Author

Marc LeBrun, Oct 18 2001

Keywords

Examples

			a(5): 5 = 101 -> (101)0(101) = 1010101 = 85.
		

Crossrefs

Programs

  • Mathematica
    bss[n_]:=Module[{idn2=IntegerDigits[n,2]},FromDigits[Flatten[idn2/.{1-> idn2}],2]]; Array[bss,40,0] (* Harvey P. Dale, Aug 15 2017 *)
  • Python
    def a(n): b = bin(n)[2:]; return int(b.replace("1", b), 2)
    print([a(n) for n in range(40)]) # Michael S. Branicky, Aug 05 2022

Formula

a(0) = 0. a(2^n) = 4^n. a(4n+2) = (4n+2)*(1+a(4n+1)/(4n+1)).
a(n) = A065157(n,n) = A065158(n,n)*n = A065160(n)*n.
a(n) =z(n, n) with z(u, v) = if u=0 then 0 else if u mod 2 = 0 then z(u/2, v)*2 else z([u/2], v)*A062383(v)+v. - Reinhard Zumkeller, Feb 15 2004

Extensions

Name clarified by Michael S. Branicky, Aug 05 2022

A065158 Table of reduced binary string substitutions: a(i,j) is obtained by substituting i for each 1-bit in j, then dividing by i.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 5, 4, 1, 2, 5, 4, 5, 1, 2, 9, 4, 9, 6, 1, 2, 9, 4, 9, 10, 7, 1, 2, 9, 4, 17, 10, 21, 8, 1, 2, 9, 4, 17, 18, 21, 8, 9, 1, 2, 17, 4, 17, 18, 73, 8, 17, 10, 1, 2, 17, 4, 17, 18, 73, 8, 17, 18, 11, 1, 2, 17, 4, 33, 18, 73, 8, 33, 18, 37, 12, 1, 2, 17, 4, 33, 34, 73, 8, 33
Offset: 1

Views

Author

Marc LeBrun, Oct 18 2001

Keywords

Comments

Table origin is a(1,1). a(1,n)=n. a(n,1)=1. By convention a(0,n)=a(n,0)=0. a(i,j)=A065157(i,j)/i. a(n,n)=A065160(n)=A065159(n)/n.

Examples

			a(3,5): 5=101->(3)0(3)=(11)0(11)=11011=27; 27/3=9. a(5,3): 3=11->(5)(5)=(101)(101)=101101=45; 45/5=9
		

Crossrefs

A065160 Reduced binary string self-substitutions: a(n) is obtained by substituting n for each 1-bit in the binary expansion of n, then dividing by n.

Original entry on oeis.org

1, 2, 5, 4, 17, 18, 73, 8, 65, 66, 529, 68, 545, 546, 4369, 16, 257, 258, 4129, 260, 4161, 4162, 66593, 264, 4225, 4226, 67617, 4228, 67649, 67650, 1082401, 32, 1025, 1026, 32833, 1028, 32897, 32898, 1052737, 1032, 33025, 33026, 1056833, 33028, 1056897
Offset: 1

Views

Author

Marc LeBrun, Oct 18 2001

Keywords

Comments

By convention a(0)=0. a(2^n)=2^n. a(4n+2)=1+a(4n+1). a(n)=A065158(n,n)=A065157(n,n)/n=A065159(n)/n.

Examples

			a(5): 5=101->(101)0(101)=1010101=85; 85/5=17.
		

Crossrefs

Cf. A065157, A065158. Equals A065159(n)/n.

Formula

a(2^n)=2^n. a(4n+2)=1+a(4n+1). a(n)=A065158(n, n)=A065157(n, n)/n=A065159(n)/n.
a(n)=z(n, A062383(n)) with z(u, v) = if u=0 then 0 else if u mod 2 = 0 then z(u/2, v)*2 else z([u/2], v)*v+1. - Reinhard Zumkeller, Feb 15 2004
Showing 1-4 of 4 results.