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

A085721 Semiprimes whose prime factors have an equal number of digits in binary representation.

Original entry on oeis.org

4, 6, 9, 25, 35, 49, 121, 143, 169, 289, 323, 361, 391, 437, 493, 527, 529, 551, 589, 667, 713, 841, 899, 961, 1369, 1517, 1591, 1681, 1739, 1763, 1849, 1927, 1961, 2021, 2173, 2183, 2209, 2257, 2279, 2419, 2491, 2501, 2537, 2623, 2773, 2809
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 20 2003

Keywords

Comments

A138510(A174956(a(n))) <= 2. - Reinhard Zumkeller, Dec 19 2014

Examples

			A078972(35) = 527 = 17*31 -> 10001*11111, therefore 527 is a term;
A078972(37) = 533 = 13*41 -> 1101*101001, therefore 533 is not a term;
A001358(1920) = 7169 = 67*107 -> 1000011*1101011: therefore 7169 a term, but not of A078972.
		

Crossrefs

Cf. A261073, A261074, A261075 (subsequences).
Intersection of A001358 and A266346.

Programs

  • Haskell
    a085721 n = a085721_list !! (n-1)
    a085721_list = [p*q | (p,q) <- zip a084126_list a084127_list,
                          a070939 p == a070939 q]
    -- Reinhard Zumkeller, Nov 10 2013
  • Mathematica
    fQ[n_] := Block[{fi = FactorInteger@ n}, Plus @@ Last /@ fi == 2 && IntegerLength[ fi[[1, 1]], 2] == IntegerLength[ fi[[-1, 1]], 2]]; Select[ Range@ 2866, fQ] (* Robert G. Wilson v, Oct 29 2011 *)
    Select[Range@ 3000, And[Length@ # == 2, IntegerLength[#1, 2] == IntegerLength[#2, 2] & @@ #] &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ #] &] (* Michael De Vlieger, Oct 08 2016 *)
  • PARI
    is(n)=bigomega(n)==2&&#binary(factor(n)[1,1])==#binary(n/factor(n)[1,1]) \\ Charles R Greathouse IV, Nov 08 2011
    

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

A266342 a(n) = number of ways n can be expressed as a product of two natural numbers that have same number of significant digits in base-2 representation (up to the ordering of unequal factors).

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 2
Offset: 1

Views

Author

Antti Karttunen, Dec 27 2015

Keywords

Examples

			For n=1 we have one possibility, 1*1 = 1, thus a(1) = 1.
For n=2 we have no choices, as the binary representation of 1 which is "1" is shorter than the binary representation of 2 which is "10", thus a(2) = 0 (and likewise for any prime).
For n=120 we have two choices, either 8*15 (in binary "1000" * "1111") or 10*12 ("1010" * "1100"), thus a(120) = 2. (15*8 and 8*15 are not counted separately.)
		

Crossrefs

Cf. A000523.
Cf. A266346 (positions of nonzeros), A266347 (positions of zeros).
Cf. A266343 (positions of records).
Cf. also A266344.

Programs

  • Mathematica
    Map[Length, Table[Flatten@ Map[Differences@ IntegerLength[#, 2] &, Transpose@ {#, n/#}] &@ TakeWhile[Divisors@ n, # <= Sqrt@ n &], {n, 120}] /. k_ /; k > 0 -> Nothing] (* Michael De Vlieger, Dec 30 2015, Version 7.0 *)
  • PARI
    A000523(n) = if(n<1,0,#binary(n) - 1);
    A266342(n) = sumdiv(n, d, ((d <= (n/d)) && (A000523(d)==A000523(n/d))));
    for(n=1, 32768, write("b266342.txt", n, " ", A266342(n)));

Formula

a(n) = Sum_{d|n} [(d <= (n/d)) and (A000523(d) = A000523(n/d))].
(In the above formula [ ] stands for Iverson bracket, resulting in 1 only if d is less than or equal to n/d and the binary lengths of d and n/d are equal, and 0 otherwise.)

A266347 Numbers that cannot be represented as the product of two numbers with an equal number of significant digits (bits) in their binary representations.

Original entry on oeis.org

2, 3, 5, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 26, 27, 29, 31, 32, 33, 34, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 97, 98, 101, 102, 103, 105
Offset: 1

Views

Author

Antti Karttunen, Dec 28 2015

Keywords

Comments

All primes p are in the sequence since the only pair of divisors of p is {1, p} and since the smallest p = 2 has more bits than 1; all larger primes written in binary will require at least 2 bits to represent p. Thus A000040 is a subsequence of this sequence. - Michael De Vlieger, Dec 30 2015

Examples

			From _Michael De Vlieger_, Dec 30 2015: (Start)
Consider pairs of divisors {d, d'} of n, both integers such that d * d' = n:
2 is a term, since the only pair of divisors of 2 written in binary are {1, 10}, with unequal numbers of bits.
3 is a term, since the only pair of divisors of 3 written in binary are {1, 11}, with unequal numbers of bits.
8 is a term, since the pair of divisors of 8 written in binary are {1, 100} and {10, 100}, both with unequal numbers of bits.
12 is a term, since the elements of {1, 1100}, {10, 110}, and {11, 100} are both unequal in length in all cases.
...
(End)
		

Crossrefs

Positions of zeros in A266342.
Cf. A266346 (complement).
Cf. A000040 (a subsequence).

Programs

  • Mathematica
    Position[#, k_ /; k == 0] &@ Map[Length, Table[Flatten@ Map[Differences@ IntegerLength[#, 2] &, Transpose@ {#, n/#}] &@ TakeWhile[Divisors@ n, # <= Sqrt@ n &], {n, 100}] /. k_ /; k > 0 -> Nothing] // Flatten (* Michael De Vlieger, Dec 30 2015 *)
Showing 1-3 of 3 results.