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.

A365451 Odd composite numbers k such that A349494(k) = A000120(k).

Original entry on oeis.org

15, 27, 51, 63, 85, 95, 111, 119, 123, 125, 187, 219, 221, 255, 335, 365, 411, 447, 485, 511, 629, 655, 685, 697, 771, 831, 879, 959, 965, 1011, 1139, 1241, 1285, 1405, 1535, 1563, 1649, 1731, 1779, 1791, 1799, 1923, 1983, 2005, 2019, 2031, 2043, 2045, 2227, 2605, 2735, 2815, 2827, 2885, 3099
Offset: 1

Views

Author

Robert Israel, Sep 03 2023

Keywords

Comments

Odd composite numbers k such that for all divisors d of k, A000120(d) * A000120(k/d) = A000120(k).

Examples

			a(4) = 63 is a term because 63 = 3 * 21 = 7 * 9 with A000120(63) = 6, A000120(3) * A000120(21) = 2 * 3 = 6 and A000120(7) * A000120(9) = 3 * 2 = 6.
		

Crossrefs

Includes x^3 for x in A019434.
Includes all members of A235040 except 1.

Programs

  • Maple
    g:= proc(n) convert(convert(n, base, 2), `+`) end proc:
    filter:= proc(n) local d, t;
      if isprime(n) then return false fi;
      t:= g(n);
      andmap(d -> g(d) * g(n/d) = t, select(d -> d^2 <= n, numtheory:-divisors(n)))
    end proc:
    select(filter, [seq(i,i=3..10000,2)]);
  • Mathematica
    q[n_] := CompositeQ[n] && Ordering[(d = DigitCount[Divisors[n], 2, 1])*Reverse[d], -1][[1]] == Length[d]; Select[Range[3, 3100, 2], q] (* Amiram Eldar, Sep 04 2023 *)
  • PARI
    is(n) = if(n%2 != 1 || isprime(n), return(0)); my(h=hammingweight(n), d=divisors(n), i); for(i=2,(#d+1)\2, if(hammingweight(d[i]) * hammingweight(d[#d+1-i]) > h, return(0))); n > 1 \\ David A. Corneth, Sep 04 2023

A365476 a(n) is the minimum of A000120(k)*A000120(A071904(n)/k) for divisors k of the n-th odd composite number A071904(n) other than 1 and A071904(n).

Original entry on oeis.org

4, 4, 6, 4, 4, 6, 6, 6, 4, 9, 4, 6, 6, 6, 6, 8, 6, 9, 4, 4, 8, 9, 10, 6, 4, 6, 6, 8, 6, 6, 9, 6, 6, 8, 9, 8, 10, 9, 8, 6, 4, 10, 8, 12, 4, 9, 6, 6, 10, 10, 6, 6, 6, 4, 6, 12, 6, 6, 9, 8, 8, 15, 6, 6, 6, 6, 10, 10, 6, 6, 9, 8, 12, 8, 9, 8, 8, 8, 9, 9, 10, 8, 9, 4, 6, 10, 4, 12, 12, 8, 10, 10, 6
Offset: 1

Views

Author

Robert Israel, Sep 04 2023

Keywords

Comments

a(n) = 4 iff A071904(n) is the product of two (not necessarily distinct) members of A000051.
a(n) >= A000120(A071904(n)) because A000120(x) * A000120(y) >= A000120(x*y).
a(n) <= A349494(A071904(n)).

Examples

			a(9) = 4 because A071904(9) = 45 = 3 * 15 = 5 * 9 with A000120(3) * A000120(15) = 2 * 4 = 8 and A000120(5) * A000120(9) = 2 * 2 = 4.
		

Crossrefs

Programs

  • Maple
    g:= proc(n) convert(convert(n, base, 2), `+`) end proc:
    f:= proc(n) local t, r;
          min(seq(g(t)*g(n/t), t = numtheory:-divisors(n) minus {1,n}))
        end proc:
    map(f, remove(isprime, [seq(i,i=3..1000,2)]));
  • Python
    from sympy import primepi, divisors
    def A365476(n):
        if n == 1: return 4
        m, k = n, primepi(n) + n + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n + (k>>1)
        return min(int(d).bit_count()*int(m//d).bit_count() for d in divisors(m,generator=True) if 1Chai Wah Wu, Aug 02 2024
Showing 1-2 of 2 results.