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.

A143792 a(n) = the number of distinct prime divisors, p, of n that, when p is represented in binary, each p occurs at least once in the binary representation of n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Sep 01 2008

Keywords

Comments

a(2^k * p) = 2, where k = any positive integer and p = any odd prime.
a(p) = 1, where p = any prime.
a(2^k) = 1, where k = any positive integer.
a(n) <= A078826(n). - Reinhard Zumkeller, Sep 08 2008
Size of intersection of n-th rows of tables A225243 and A027748. - Reinhard Zumkeller, Aug 14 2013

Examples

			60 in binary is 111100. The distinct primes dividing 60 are 2 (which is 10 in binary), 3 (11 in binary) and 5 (101) in binary. The string 10 does occur within 111100 like so: 111(10)0. The string 11 also occurs (multiple times) within 111100, in one way like so: (11)1100. But the string 101 does not occur in 111100. Since 2 and 3 occur within 60 (when each of these numbers is written in binary), but 5 does not, then a(60) = 2.
		

Crossrefs

Cf. A143791.

Programs

  • Haskell
    import Data.List (intersect)
    a143792 n = length $ a225243_row n `intersect` a027748_row (fromIntegral n)
    -- Reinhard Zumkeller, Aug 14 2013
  • Mathematica
    f[n_] := Block[{nb = ToString@ FromDigits@ IntegerDigits[n, 2], psb = ToString@ FromDigits@ IntegerDigits[ #, 2] & /@ First@ Transpose@ FactorInteger@ n, c = 0, k = 1}, lmt = 1 + Length@ psb; While[k < lmt, If[ StringCount[nb, psb[[k]]] > 0, c++ ]; k++ ]; c]; f[1] = 0; Array[f, 105] (* Robert G. Wilson v, Sep 22 2008 *)

Extensions

More terms from Robert G. Wilson v, Sep 22 2008

A145195 Odd composite numbers n with property that at least one prime divisor p of n is a substring of the binary representation of n.

Original entry on oeis.org

15, 27, 39, 45, 51, 55, 57, 63, 75, 85, 87, 91, 93, 95, 99, 105, 111, 117, 119, 123, 125, 135, 141, 147, 153, 155, 159, 165, 171, 175, 177, 183, 185, 187, 189, 195, 201, 205, 207, 213, 215, 219, 221, 225, 231, 235, 237, 243, 245, 247, 249, 255, 267, 279, 285
Offset: 1

Views

Author

Robert G. Wilson v, Oct 03 2008

Keywords

Comments

It is obvious that all even numbers and all prime numbers would meet this criterion.

Examples

			15 is 1111_2 and 15=3*5 where 3 is 11_2, so 15 is a term.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{nb = ToString@ FromDigits@ IntegerDigits[n, 2], psb = ToString@ FromDigits@ IntegerDigits[ #, 2] & /@ First@ Transpose@ FactorInteger@n, c = 0, k = 1}, lmt = 1 + Length@ psb; While[k < lmt, If[ StringCount[nb, psb[[k]]] > 0, c++ ]; k++ ]; c]; f[1] = 0; Select[ Range@ 286, !PrimeQ@ # && OddQ@ # && f@# > 0 &]
Showing 1-2 of 2 results.