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.

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

A261073 Semiprimes whose prime factors are of equal binary length and which differ from each other in one bit position only.

Original entry on oeis.org

6, 35, 323, 437, 713, 899, 1763, 1961, 2021, 2537, 3233, 4757, 5561, 5609, 6497, 7313, 9797, 10403, 10961, 11009, 18209, 19043, 21353, 22499, 23393, 26969, 27221, 29177, 37001, 38021, 39203, 45113, 71273, 72899, 79523, 87953, 95477, 98201, 99221, 106793, 114857, 114929, 123353
Offset: 1

Views

Author

Antti Karttunen, Sep 22 2015

Keywords

Examples

			6 = 2*3 is present, as 2 in binary is "10" and 3 in binary is "11", so both have two (significant) bits and they differ only in one bit-position from each other.
35 = 5*7 is present, as 5 in binary is "101" and 7 in binary is "111", which both have three bits, differing only in the middle position from each other.
		

Crossrefs

Cf. also A261074, A261075.
Cf. A071697 (a subsequence).
Intersection of A085721 and A261077.

Programs

  • Mathematica
    Select[Range[10^6], And[Length@ # == 2, IntegerLength[#1, 2] == IntegerLength[#2, 2] & @@ #, Total@ BitXor[IntegerDigits[#1, 2], IntegerDigits[#2, 2]] == 1 & @@ #] &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ #] &] (* Michael De Vlieger, Oct 08 2016 *)
  • PARI
    A000523 = n -> logint(n, 2);
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    isA261073(n) = { my(a,b); if(bigomega(n)!=2, 0, a=A020639(n); b = (n/a); ((A000523(a) == A000523(b)) && (1 == norml2(binary(bitxor(a,b)))))); };
    i=0; n=0; while(i < 5000, n++; if(isA261073(n), i++; write("b261073.txt", i, " ", n)));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A261073 (MATCHING-POS 1 1 (lambda (n) (and (= 2 (A001222 n)) (= (A000523 (A020639 n)) (A000523 (A006530 n))) (= 1 (A101080bi (A020639 n) (A006530 n)))))))

A261074 Semiprimes whose prime factors are of equal binary length and which differ from each other in exactly two bit positions.

Original entry on oeis.org

143, 391, 493, 589, 667, 1517, 1739, 1927, 2257, 2419, 2501, 2773, 2867, 3599, 4891, 5293, 5767, 5893, 6499, 6901, 7081, 7169, 7171, 7387, 7811, 7957, 8137, 8453, 8611, 9379, 9991, 10033, 10057, 10379, 10573, 11021, 11227, 11413, 11663, 13081, 13589, 13843, 17947, 19781, 21509, 21877, 22657, 23449, 23701, 23707, 25217, 25283, 26069, 26441, 27029
Offset: 1

Views

Author

Antti Karttunen, Sep 22 2015

Keywords

Examples

			143 = 11*13 is included because 11 ("1011" in binary) and 13 ("1101" in binary) differ from each other in exactly two bit-positions.
56153 = 233 * 241 is included (as term a(119)) because 233 ("11101001" in binary) and 241 ("11110001" in binary) differ from each other in exactly two bit-positions.
		

Crossrefs

Cf. also A261073, A261075.
Subsequence of A085721.

Programs

  • Mathematica
    Select[Range[10^5], And[Length@ # == 2, IntegerLength[#1, 2] == IntegerLength[#2, 2] & @@ #, Total@ BitXor[IntegerDigits[#1, 2], IntegerDigits[#2, 2]] == 2 & @@ #] &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ #] &] (* Michael De Vlieger, Oct 08 2016 *)
  • PARI
    A000523 = n -> logint(n, 2);
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    isA261074(n) = { my(a,b); if(bigomega(n)!=2, 0, a = A020639(n); b = (n/a); ((A000523(a) == A000523(b)) && (2 == norml2(binary(bitxor(a,b)))))); };
    i=0; n=0; while(i < 10000, n++; if(isA261074(n), i++; write("b261074.txt", i, " ", n)));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A261074 (MATCHING-POS 1 1 (lambda (n) (and (= 2 (A001222 n)) (= (A000523 (A020639 n)) (A000523 (A006530 n))) (= 2 (A101080bi (A020639 n) (A006530 n)))))))

A266346 Numbers that can be represented as a product of two numbers with an equal number of significant digits (bits) in binary system.

Original entry on oeis.org

0, 1, 4, 6, 9, 16, 20, 24, 25, 28, 30, 35, 36, 42, 49, 64, 72, 80, 81, 88, 90, 96, 99, 100, 104, 108, 110, 112, 117, 120, 121, 126, 130, 132, 135, 140, 143, 144, 150, 154, 156, 165, 168, 169, 180, 182, 195, 196, 210, 225, 256, 272, 288, 289, 304, 306, 320, 323, 324, 336, 340, 342, 352, 357, 360, 361, 368, 374, 378, 380, 384, 391
Offset: 0

Views

Author

Antti Karttunen, Dec 28 2015

Keywords

Comments

Indexing starts from zero as a(0) = 0 is a special case in this sequence.

Examples

			1 can be represented as 1*1 (1 being "1" also in base-2 system), thus it is included.
4 can be represented as 2*2, and like any square, is included.
6 can be represented as 2*3, and both "10" and "11" require two bits in binary system, thus 6 is included.
		

Crossrefs

Positions of nonzeros in A266342.
Cf. A266347 (complement).
Cf. A000290, A085721, A261073, A261074, A261075 (subsequences).
Cf. also A266342.

Programs

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