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-6 of 6 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

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)))))))

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

Original entry on oeis.org

527, 551, 1591, 2173, 2491, 2623, 3127, 5183, 5963, 6059, 6557, 6767, 6887, 7031, 7373, 7571, 7597, 7739, 7979, 8051, 8249, 8549, 8633, 8881, 9017, 9523, 9701, 10541, 10807, 11303, 11639, 12091, 12317, 12827, 14351, 19519, 20413, 20989, 21823, 22331, 23213, 24047, 24613, 24881, 24883, 25777, 25807, 26549, 26671, 26827, 26989, 27661, 28199, 28459, 28757, 29329
Offset: 1

Views

Author

Antti Karttunen, Sep 22 2015

Keywords

Examples

			291311 = 523 * 557 is included (as term a(334)) because 523 ("1000001011" in binary) and 557 ("1000101101" in binary) differ in exactly three bit-positions.
		

Crossrefs

Cf. also A261073, A261074.
Subsequence of A085721.

Programs

  • Mathematica
    Select[Range@ 30000, And[Length@ # == 2, IntegerLength[#1, 2] == IntegerLength[#2, 2] & @@ #, Total@ BitXor[IntegerDigits[#1, 2], IntegerDigits[#2, 2]] == 3 & @@ #] &@ 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]));
    isA261075(n) = { my(a,b); if(bigomega(n)!=2, 0, a = A020639(n); b = (n/a); ((A000523(a) == A000523(b)) && (3 == norml2(binary(bitxor(a,b)))))); };
    i=0; n=0; while(i < 10000, n++; if(isA261075(n), i++; write("b261075.txt", i, " ", n)));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A261075 (MATCHING-POS 1 1 (lambda (n) (and (= 2 (A001222 n)) (= (A000523 (A020639 n)) (A000523 (A006530 n))) (= 3 (A101080bi (A020639 n) (A006530 n)))))))

A261077 Semiprimes whose prime factors differ from each other in one bit position only.

Original entry on oeis.org

6, 21, 33, 35, 57, 65, 161, 185, 201, 323, 377, 393, 437, 473, 497, 713, 899, 1529, 1577, 1763, 1769, 1841, 1961, 2021, 2537, 3233, 3473, 3497, 3737, 4553, 4601, 4757, 5561, 5609, 5753, 6497, 7217, 7313, 9593, 9797, 10265, 10403, 10841, 10961, 11009, 12297, 14129, 15689, 17513, 18209, 19043, 19337, 21353, 22499, 23129, 23393, 26969, 27221, 27233, 29177
Offset: 1

Views

Author

Antti Karttunen, Sep 22 2015

Keywords

Examples

			21 = 3*7 is present because 3 in binary is "11" ("011" when extended with a leading zero) and 7 in binary is "111", and these differ only in the bit-position 2 (with indexing where the least significant bit is in the position 0).
33 = 3*11 is present because 3 in binary is "11" ("0011" when extended with two leading zeros) and 11 in binary is "1011", and these differ only in the bit-position 3.
		

Crossrefs

Cf. also A261073, A261080 (subsequences).
Subsequence of A261078.
Gives the positions of ones in A260737.

Programs

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

A261078 Semiprimes p*q such that q = p + 2^k for some k >= 0.

Original entry on oeis.org

6, 15, 21, 33, 35, 57, 65, 77, 143, 161, 185, 201, 209, 221, 323, 377, 393, 437, 473, 497, 713, 899, 1073, 1457, 1517, 1529, 1577, 1763, 1769, 1841, 1961, 2021, 2537, 2993, 3233, 3473, 3497, 3599, 3713, 3737, 3953, 4553, 4601, 4757, 5183, 5561, 5609, 5753, 6497, 6557, 7217, 7313, 8633, 8777, 9593, 9797, 10001, 10265, 10403, 10841, 10961, 11009, 11021
Offset: 1

Views

Author

Antti Karttunen, Sep 22 2015

Keywords

Comments

Terms ending with digit 5 (in decimal) are very rare, because terms of A123250 are rare.

Examples

			6 = 2*3 is present as 3 = 2 + 2^0.
15 = 3*5 is present as 5 = 3 + 2^1.
35 = 5*7 is present as 7 = 5 + 2^1.
		

Crossrefs

Cf. also A261073, A261077 (subsequences).

Programs

  • PARI
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    isA261078(n) = { my(d); if(bigomega(n)!=2, return(0), d = (n/A020639(n)) - A020639(n); (d && !bitand(d,d-1))); };
    i=0; n=0; while(i < 10000, n++; if(isA261078(n), i++; write("b261078.txt", i, " ", n)));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A261078 (MATCHING-POS 1 1 (lambda (n) (and (= 2 (A001222 n)) (pow2? (- (A006530 n) (A020639 n)))))))
    (define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1))))) ;; A004198bi implements bitwise-AND (Cf. A004198)
Showing 1-6 of 6 results.