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.

A072084 In prime factorization of n replace all primes with their numbers of 1's in binary representation.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 4, 2, 3, 2, 3, 3, 4, 1, 2, 4, 3, 2, 6, 3, 4, 2, 4, 3, 8, 3, 4, 4, 5, 1, 6, 2, 6, 4, 3, 3, 6, 2, 3, 6, 4, 3, 8, 4, 5, 2, 9, 4, 4, 3, 4, 8, 6, 3, 6, 4, 5, 4, 5, 5, 12, 1, 6, 6, 3, 2, 8, 6, 4, 4, 3, 3, 8, 3, 9, 6, 5, 2, 16, 3, 4, 6, 4, 4, 8, 3, 4, 8, 9, 4, 10, 5, 6
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 14 2002

Keywords

Comments

a(n)1.
Multiplicative with a(p^e) = A000120(p)^e. - Mitch Harris, Apr 19 2005

Examples

			a(30) = a(2*3*5) = a(2)*a(3)*a(5) = 1*2*2 = 4,
as a(2)=a('10')=1, a(3)=a('11')= 2 and a(5)=a('101')=2.
		

Crossrefs

Programs

  • Haskell
    a072084 = product . map a000120 . a027746_row
    -- Reinhard Zumkeller, Feb 10 2013
    
  • Maple
    A072084 := proc(n) local a,c; readlib(ifactors):
    a := n -> add(i,i=convert(n, base, 2));
    mul(a(c[1])^c[2],c=ifactors(n)[2]) end:
    # Peter Luschny, Jan 16 2010
  • Mathematica
    a[n_] := Times @@ Power @@@ (FactorInteger[n] /. {p_Integer, e_} :> {DigitCount[p, 2, 1], e}); Array[a, 100] (* Jean-François Alcover, Feb 09 2018 *)
  • PARI
    a(n)=my(f=factor(n)); f[,1]=apply(hammingweight, f[,1]); factorback(f) \\ Charles R Greathouse IV, Aug 06 2015
  • Sage
    A072084 = lambda n: prod(p.digits(base=2).count(1)**m for p,m in factor(n)) # D. S. McNeil, Jan 17 2011
    

Formula

Completely multiplicative with a(p) = number of 1's in binary representation of prime p.
Multiplicative with a(p^e) = A000120(p)^e

A279389 3 times Mersenne primes A000668.

Original entry on oeis.org

9, 21, 93, 381, 24573, 393213, 1572861, 6442450941, 6917529027641081853, 1856910058928070412348686333, 486777830487640090174734030864381, 510423550381407695195061911147652317181
Offset: 1

Views

Author

Omar E. Pol, Dec 20 2016

Keywords

Comments

Also sum of n-th Mersenne prime and the radical of n-th even perfect number.
The binary representation of a(n) has only two zeros, starting with "10" and ending with "01". The sequence begins: 1001, 10101, 1011101, 101111101, 101111111111101,...

Crossrefs

Subsequence of A001748, and of A147758, and of A174055, and possibly of other sequences, see below:

Formula

a(n) = 3*A000668(n) = A000668(n) + A139257(n).
a(n) = phi(M(n)) + sigma(sigma(M(n))) = A000010(A000668(n)) + A000203(A000203(A000668(n))) = A000010(A000668(n)) + A051027(A000668(n)).
Showing 1-2 of 2 results.