login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087207 A binary representation of the primes that divide a number, shown in decimal. 44

%I #131 Apr 28 2020 02:34:05

%S 0,1,2,1,4,3,8,1,2,5,16,3,32,9,6,1,64,3,128,5,10,17,256,3,4,33,2,9,

%T 512,7,1024,1,18,65,12,3,2048,129,34,5,4096,11,8192,17,6,257,16384,3,

%U 8,5,66,33,32768,3,20,9,130,513,65536,7,131072,1025,10,1,36,19,262144,65,258

%N A binary representation of the primes that divide a number, shown in decimal.

%C The binary representation of a(n) shows which prime numbers divide n, but not the multiplicities. a(2)=1, a(3)=10, a(4)=1, a(5)=100, a(6)=11, a(10)=101, a(30)=111, etc.

%C For n > 1, a(n) gives the (one-based) index of the column where n is located in array A285321. A008479 gives the other index. - _Antti Karttunen_, Apr 17 2017

%C From _Antti Karttunen_, Jun 18 & 20 2017: (Start)

%C A268335 gives all n such that a(n) = A248663(n); the squarefree numbers (A005117) are all the n such that a(n) = A285330(n) = A048675(n).

%C For all n > 1 for which the value of A285331(n) is well-defined, we have A285331(a(n)) <= floor(A285331(n)/2), because then n is included in the binary tree A285332 and a(n) is one of its ancestors (in that tree), and thus must be at least one step nearer to its root than n itself.

%C Conjecture: Starting at any n and iterating the map n -> a(n), we will always reach 0 (see A288569). This conjecture is equivalent to the conjecture that at any n that is neither a prime nor a power of two, we will eventually hit a prime number (which then becomes a power of two in the next iteration). If this conjecture is false then sequence A285332 cannot be a permutation of natural numbers. On the other hand, if the conjecture is true, then A285332 must be a permutation of natural numbers, because all primes and powers of 2 occur in definite positions in that tree. This conjecture also implies the conjectures made in A019565 and A285320 that essentially claim that there are neither finite nor infinite cycles in A019565.

%C If there are any 2-cycles in this sequence, then both terms of the cycle should be present in A286611 and the larger one should be present in A286612.

%C (End)

%H N. J. A. Sloane, <a href="/A087207/b087207.txt">Table of n, a(n) for n = 1..10000</a> [First 1000 terms from _T. D. Noe_]

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F Additive with a(p^e) = 2^(i-1) where p is the i-th prime. - _Vladeta Jovovic_, Oct 29 2003

%F a(n) gives the m such that A019565(m) = A007947(n). - _Naohiro Nomoto_, Oct 30 2003

%F A000120(a(n)) = A001221(n); a(n) = Sum(2^(A049084(p)-1): p prime-factor of n). - _Reinhard Zumkeller_, Nov 30 2003

%F G.f.: Sum_{k>=1} 2^(k-1)*x^prime(k)/(1-x^prime(k)). - _Franklin T. Adams-Watters_, Sep 01 2009

%F From _Antti Karttunen_, Apr 17 2017, Jun 19 2017 & Dec 06 2018: (Start)

%F a(n) = A048675(A007947(n)).

%F a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A028234(n)).

%F A000035(a(n)) = 1 - A000035(n). [a(n) and n are of opposite parity.]

%F A248663(n) <= a(n) <= A048675(n). [XOR-, OR- and +-variants.]

%F a(A293214(n)) = A218403(n).

%F a(A293442(n)) = A267116(n).

%F A069010(a(n)) = A287170(n).

%F A007088(a(n)) = A276379(n).

%F A038374(a(n)) = A300820(n) for n >= 1.

%F (End)

%F From _Peter Munn_, Jan 08 2020: (Start)

%F a(A059896(n,k)) = a(n) OR a(k) = A003986(a(n), a(k)).

%F a(A003961(n)) = 2*a(n).

%F a(n^2) = a(n).

%F a(n) = A267116(A225546(n)).

%F a(A225546(n)) = A267116(n).

%F (End)

%e a(38) = 129 because 38 = 2*19 = prime(1)*prime(8) and 129 = 2^0 + 2^7 (in binary 10000001).

%e a(140) = 13, binary 1101 because 140 is divisible by the first, third and fourth primes and 2^(1-1) + 2^(3-1) + 2^(4-1) = 13.

%t a[n_] := Total[ 2^(PrimePi /@ FactorInteger[n][[All, 1]] - 1)]; a[1] = 0; Table[a[n], {n, 1, 69}] (* _Jean-François Alcover_, Dec 12 2011 *)

%o (Haskell)

%o a087207 = sum . map ((2 ^) . (subtract 1) . a049084) . a027748_row

%o -- _Reinhard Zumkeller_, Jul 16 2013

%o (PARI) a(n) = {if (n==1, 0, my(f=factor(n), v = []); forprime(p=2, vecmax(f[,1]), v = concat(v, vecsearch(f[,1], p)!=0);); fromdigits(Vecrev(v), 2));} \\ _Michel Marcus_, Jun 05 2017

%o (PARI) A087207(n)=vecsum(apply(p->1<<primepi(p-1),factor(n)[,1])) \\ Significantly faster than using sum(...). - _M. F. Hasler_, Jun 23 2017

%o (Python)

%o from sympy import factorint, primepi

%o def a(n):

%o return sum(2**primepi(i - 1) for i in factorint(n))

%o print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Jun 06 2017

%o (Scheme)

%o (definec (A087207 n) (if (= 1 n) 0 (+ (A000079 (+ -1 (A055396 n))) (A087207 (A028234 n))))) ;; This uses memoization-macro definec

%o (define (A087207 n) (A048675 (A007947 n))) ;; Needs code from A007947 and A048675. - _Antti Karttunen_, Jun 19 2017

%Y For partial sums see A288566.

%Y Cf. A000040, A000120, A001221, A005117, A008479, A019565, A055396, A285320, A285321, A285329, A285330, A285332.

%Y Sequences with related definitions: A007947, A008472, A027748, A048675, A248663, A276379 (same sequence shown in base 2), A288569, A289271, A297404.

%Y Cf. A286608 (numbers n for which a(n) < n), A286609 (n for which a(n) > n), and also A286611, A286612.

%Y A003986, A003961, A059896 are used to express relationship between terms of this sequence.

%Y Related to A267116 via A225546.

%Y Positions of particular values are: A000079\{1} (1), A000244\{1} (2), A033845 (3), A000351\{1} (4), A033846 (5), A033849 (6), A143207 (7), A000420\{1} (8), A033847 (9), A033850 (10), A033851 (12), A147576 (14), A147571 (15), A001020\{1} (16), A033848 (17).

%K nonn,base,nice

%O 1,3

%A Mitch Cervinka (puritan(AT)planetkc.com), Oct 26 2003

%E More terms from _Don Reble_, _Ray Chandler_ and _Naohiro Nomoto_, Oct 28 2003

%E Name clarified by _Antti Karttunen_, Jun 18 2017

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)