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-7 of 7 results.

A072085 a(n) = A072084(A072084(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 4, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 4, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 4, 1, 2, 2, 2, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 14 2002

Keywords

Crossrefs

Cf. A072086.

Programs

  • Haskell
    a072085 = a072084 . a072084  -- Reinhard Zumkeller, Feb 10 2013
  • Mathematica
    b[n_] := Times @@ Power @@@ (FactorInteger[n] /. {p_Integer, e_} :> {DigitCount[p, 2, 1], e}); a[n_] := b[b[n]]; Array[a, 100] (* Jean-François Alcover, Feb 09 2018 *)

A072086 Number of steps to reach 1, starting with n and applying the A072084-map repeatedly.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jun 14 2002

Keywords

Examples

			n=21: '11'*'111' -> '10'*'11' -> '11'*'1' -> '1'; i.e., 21=3*7 -> 6=2*3 -> 2*1 -> 1*1=1, therefore a(21)=3.
		

Crossrefs

Cf. A072085.

Programs

  • Haskell
    a072086 n = fst $
       until ((== 1) . snd) (\(i, x) -> (i + 1, a072084 x)) (0, n)
    -- Reinhard Zumkeller, Feb 10 2013
  • Maple
    A072086 := proc(n) local c,i,j; c :=0; i := n;
    while i > 1 do i:=A072084(i); c:=c+1 od; c end:
    # Note that this gives A072086(0)=0 if desired
    # without any additional case discrimination.
    # Peter Luschny, Jan 16 2010
  • Mathematica
    b[1] = 1; b[n_] := Times @@ Power @@@ (FactorInteger[n] /. {p_Integer, e_} :> {DigitCount[p, 2, 1], e}); a[n_] := Length[FixedPointList[b, n]] - 2; Array[a, 100] (* Jean-François Alcover, Feb 09 2018 *)

A072087 Least k such that A072084(k) = n.

Original entry on oeis.org

1, 3, 7, 9, 31, 21, 127, 27, 49, 93, 3583, 63, 8191, 381, 217, 81, 131071, 147, 524287, 279, 889, 10749, 14680063, 189, 961, 24573, 343, 1143, 1073479679, 651, 2147483647, 243, 25081, 393213, 3937, 441, 266287972351, 1572861, 57337, 837
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 14 2002

Keywords

Comments

If p is a Mersenne prime then a(p) = 2^p - 1 (A000120(2^n-1)=n), for other primes p: a(p) > 2^p - 1.

Crossrefs

Programs

  • Haskell
    a072087 1 = 1
    a072087 n = product $ map a061712 $ a027746_row n
    -- Reinhard Zumkeller, Feb 10 2013
  • Mathematica
    s[n_] := s[n] = Module[{p = 2}, While[DigitCount[p, 2, 1] != n, p = NextPrime[p]]; p]; f[p_, e_] := s[p]^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 22] (* Amiram Eldar, Nov 02 2023 *)

Formula

Completely multiplicative with a(p) = A061712(p). - David W. Wilson, Aug 03 2005
Sum_{n>=1} 1/a(n) = Product_{p prime} 1/(1 - 1/A061712(p)) = 1.82343415954263449963... . - Amiram Eldar, Nov 02 2023

Extensions

More terms from David W. Wilson, Aug 03 2005

A014499 Number of 1's in binary representation of n-th prime.

Original entry on oeis.org

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

Views

Author

Ingemar Assarsjo (ingemar(AT)binomen.se)

Keywords

Comments

a(n) is the rank of prime(n) in the base-2 dominance order on the natural numbers. - Tom Edgar, Mar 25 2014

Examples

			From _M. F. Hasler_, Mar 03 2023: (Start)
a(n) = 1 only for p(n = 1) = 2, the only prime equal to a power of 2.
a(n) = 2 for n in A159611 = A000720(A019434) = {2, 3, 7, 55, 6543} (probably complete), the Fermat primes F[k] = 2^2^k + 1 with k = 0, 1, 2, 3, 4. (On the graph one can distinctly see a(6543) = 2 corresponding to F[4] = 65537.)
a(n) = 3 for n in A000720(A081091) = (4, 5, 6, 8, 12, 13, 19, 21, 25, 32, 33, 44, 98, 106, 116, 136, 174, 191, 310, 313, 319, 565, 568, ...). (End)
		

Crossrefs

Cf. A180024. - Reinhard Zumkeller, Aug 08 2010
Cf. A072084.
Cf. A159611 (indices of 2s), A000720(A081091) (indices of 3s). - M. F. Hasler, Mar 03 2023

Programs

  • Haskell
    a014499 = a000120 . a000040  -- Reinhard Zumkeller, Feb 10 2013
    
  • Magma
    [&+Intseq(NthPrime(n), 2): n in [1..100] ]; // Vincenzo Librandi, Mar 25 2014
    
  • Mathematica
    Table[Plus @@ IntegerDigits[Prime[n], 2], {n, 1, 100}] (* Vincenzo Librandi, Mar 25 2014 *)
  • PARI
    A014499(n)=hammingweight(prime(n)) \\ M. F. Hasler, Nov 20 2009, updated Mar 03 2023
    
  • Python
    from sympy import prime
    def A014499(n): return prime(n).bit_count() # Chai Wah Wu, Mar 22 2023
  • Sage
    [sum(i.digits(base=2)) for i in primes_first_n(200)] # Tom Edgar, Mar 25 2014
    

Formula

a(n) = A000120(A000040(n)).
a(A049084(A061712(n))) = n. - Reinhard Zumkeller, Feb 10 2013
a(n) = [x^prime(n)] (1/(1 - x))*Sum_{k>=0} x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Mar 27 2018

A349494 a(n) is the maximum of A000120(k)*A000120(n/k) for divisors k of n.

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, 4, 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, 4, 6, 3, 6, 4, 5, 4, 5, 5, 6, 1, 6, 6, 3, 2, 8, 6, 4, 4, 3, 3, 8, 3, 9, 6, 5, 2, 8, 3, 4, 6, 4, 4, 8, 3, 4, 8, 9, 4, 10, 5, 6, 2, 3, 9, 6
Offset: 1

Views

Author

Robert Israel, Sep 03 2023

Keywords

Comments

First differs from A072084 at n = 27.

Examples

			a(45) = 8 because 45 = 3 * 15 with A072084(3) * A072084(15) = 2 * 4 = 8, and the other factorizations 1 * 45 and 5 * 9 have A072084(k) * A072084(45/k) = 4.
		

Crossrefs

Programs

  • Maple
    g:= proc(n) convert(convert(n,base,2),`+`) end proc:
    f:= proc(n) local t,r;
          max(seq(g(t)*g(n/t), t = numtheory:-divisors(n)))
        end proc:
    map(f, [$1..100]);
  • Mathematica
    a[n_] := Max[(d = DigitCount[Divisors[n], 2, 1]) * Reverse[d]]; Array[a, 100] (* Amiram Eldar, Sep 03 2023 *)

Formula

a(n) = a(2*n).

A071785 In prime factorization of n replace each prime with the sum of its decimal digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 12, 4, 14, 15, 16, 8, 18, 10, 20, 21, 4, 5, 24, 25, 8, 27, 28, 11, 30, 4, 32, 6, 16, 35, 36, 10, 20, 12, 40, 5, 42, 7, 8, 45, 10, 11, 48, 49, 50, 24, 16, 8, 54, 10, 56, 30, 22, 14, 60, 7, 8, 63, 64, 20, 12, 13, 32, 15, 70, 8, 72
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 06 2002

Keywords

Examples

			a(143) = a(11*13) = a(11)*a(13) = (1+1)*(1+3) = 2*4 = 8.
		

Crossrefs

Cf. A002473 (fixed points), A007953, A072084 (binary variant).

Programs

  • Maple
    a:= n-> mul(add(j, j=convert(i[1], base, 10))^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..72);  # Alois P. Heinz, Oct 22 2021
  • Mathematica
    a[n_] := Product[{p, e} = pe; Total[IntegerDigits[p]]^e, {pe, FactorInteger[n]}];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 22 2021 *)
  • PARI
    a(n, base=10) = my (f=factor(n)); prod(i=1, #f~, sumdigits(f[i,1], base)^f[i,2]) \\ Rémy Sigrist, Feb 19 2019

Formula

Multiplicative with a(p) = A007953(p), p prime.
a(n) = n iff n is 7-smooth (A002473).

A324391 Fully multiplicative with a(p^e) = A070939(p)^e, where A070939(p) gives the length of the binary representation of p.

Original entry on oeis.org

1, 2, 2, 4, 3, 4, 3, 8, 4, 6, 4, 8, 4, 6, 6, 16, 5, 8, 5, 12, 6, 8, 5, 16, 9, 8, 8, 12, 5, 12, 5, 32, 8, 10, 9, 16, 6, 10, 8, 24, 6, 12, 6, 16, 12, 10, 6, 32, 9, 18, 10, 16, 6, 16, 12, 24, 10, 10, 6, 24, 6, 10, 12, 64, 12, 16, 7, 20, 10, 18, 7, 32, 7, 12, 18, 20, 12, 16, 7, 48, 16, 12, 7, 24, 15, 12, 10, 32, 7, 24, 12, 20, 10, 12
Offset: 1

Views

Author

Antti Karttunen, Mar 05 2019

Keywords

Crossrefs

Programs

  • PARI
    A070939(n) = if(!n,1,#binary(n));
    A324391(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = A070939(f[i, 1])); factorback(f); };

Formula

For all n >= 1, a(A000668(n)) = A000043(n).
Showing 1-7 of 7 results.