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.

A078826 Number of distinct primes contained as binary substrings in binary representation of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 08 2002

Keywords

Comments

A143792(n) <= a(n) for n > 0. - Reinhard Zumkeller, Sep 08 2008
For n > 1: number of primes in n-th row of A165416, lengths in n-th row of A225243. - Reinhard Zumkeller, Jul 17 2015, Aug 14 2013

Examples

			n=7 -> '111' contains 2 different binary substrings which are primes: '11' (11b or b11) and '111' itself, therefore a(7)=2.
		

Crossrefs

Programs

  • Haskell
    a078826 n | n <= 1 = 0
              | otherwise = length $ a225243_row n
    -- Reinhard Zumkeller, Aug 14 2013
  • Mathematica
    a[n_] := (bits = IntegerDigits[n, 2]; lg = Length[bits]; Reap[Do[If[PrimeQ[p = FromDigits[bits[[i ;; j]], 2]], Sow[p]], {i, 1, lg-1}, {j, i+1, lg}]][[2, 1]] // Union // Length); a[0] = a[1] = 0; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, May 23 2013 *)

A078830 Numbers having in binary representation exactly one binary substring representing a prime.

Original entry on oeis.org

2, 3, 4, 8, 9, 16, 32, 33, 64, 65, 128, 129, 256, 512, 513, 1024, 1025, 2048, 2049, 4096, 4097, 8192, 8193, 16384, 16385, 32768, 32769, 65536, 131072, 131073, 262144, 262145, 524288, 524289, 1048576, 1048577, 2097152, 2097153, 4194304, 4194305
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 08 2002

Keywords

Comments

A078827(a(n)) = 1; subsequence of A078829 and of A078831;
for k>2 also floor(a(k)/2) belongs to the sequence.

Examples

			p=2 -> '10' is the only prime contained exactly once in 2^k, k>0.
		

Crossrefs

Extensions

Extended by Ray Chandler, Nov 03 2008

A078831 Numbers n with unique occurrence of all binary substrings representing primes in binary representation of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 11, 12, 13, 16, 17, 19, 24, 25, 32, 33, 35, 48, 49, 64, 65, 67, 96, 97, 128, 129, 131, 192, 193, 256, 257, 259, 384, 385, 512, 513, 515, 768, 769, 1024, 1025, 1027, 1536, 1537, 2048, 2049, 2051, 3072, 3073, 4096, 4097, 4099, 6144, 6145
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 08 2002

Keywords

Comments

A078826(a(n)) = A078827(a(n)); A078830 is a subsequence.

Examples

			n=12 -> '1100' contains two substrings representing distinct primes: '10'=2 and '11'=3, therefore 12 is a term.
		

Crossrefs

Extensions

Extended by Ray Chandler, Nov 03 2008

A078828 Product of all primes contained as binary substrings in binary representation of n.

Original entry on oeis.org

1, 1, 2, 3, 2, 10, 6, 63, 2, 2, 20, 330, 6, 390, 126, 1323, 2, 34, 4, 114, 20, 100, 660, 159390, 6, 6, 780, 12870, 126, 237510, 2646, 861273, 2, 2, 68, 102, 4, 740, 228, 2394, 20, 820, 200, 141900, 660, 42900, 318780, 157317930, 6, 102, 12, 342, 780, 206700
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 08 2002

Keywords

Examples

			n=7: product of the A078827(7)=3 primes as binary substrings in binary representation of 7 -> '111': a(7) = '11'*'11'*'111' = 3*3*7 = 63.
		

Crossrefs

Showing 1-4 of 4 results.