login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066376 Number of "divisors" d < n such that there is another d' < n with d*d' = n. 2
0, 1, 1, 2, 1, 3, 2, 3, 1, 3, 1, 5, 1, 5, 4, 4, 1, 3, 1, 5, 2, 3, 1, 7, 1, 3, 3, 8, 1, 9, 7, 5, 1, 3, 1, 5, 1, 3, 1, 7, 1, 5, 1, 5, 3, 3, 3, 9, 1, 3, 3, 5, 1, 7, 3, 11, 1, 3, 3, 14, 3, 15, 13, 6, 1, 3, 1, 5, 1, 3, 1, 7, 2, 3, 1, 5, 1, 3, 1, 9, 1, 3, 1, 8, 4, 3, 1, 7, 1, 7, 3, 5, 1, 7, 5, 11, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

Define "+" as binary bitwise inclusive-OR and then implement "*" as shift-and-"+". Note that * is commutative and associative and distributes over +.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..1000

EXAMPLE

14 has 5 "divisors": 1, 2, 3, 6, 7, since for example 2*7 = 10*111 = 1110 OR 0000 = 1110; 3*6 = 11*110 = 1100 OR 0110 = 1110.

PROG

(Haskell)

import Data.Bits (Bits, (.|.), shiftL, shiftR)

a066376 :: Int -> Int

a066376 n = length [d | d <- [1..n-1], any ((== n) . (orm d)) [1..n]] where

   orm 1 v = v

   orm u v = orm (shiftR u 1) (shiftL v 1) .|. if odd u then v else 0

-- Reinhard Zumkeller, Mar 01 2013

CROSSREFS

Cf. A067139 ("primes").

Sequence in context: A293390 A189231 A107337 * A151682 A318928 A159918

Adjacent sequences:  A066373 A066374 A066375 * A066377 A066378 A066379

KEYWORD

nonn,easy,nice

AUTHOR

Marc LeBrun, Dec 22 2001

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 17 13:20 EDT 2021. Contains 348049 sequences. (Running on oeis4.)