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.

A158974 a(n) is the number of numbers k <= n such that not all proper divisors of k are divisors of n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 1, 3, 3, 5, 1, 6, 5, 6, 6, 9, 6, 10, 7, 10, 11, 13, 7, 14, 14, 15, 14, 18, 12, 19, 16, 19, 20, 21, 16, 24, 23, 24, 20, 27, 22, 28, 25, 25, 29, 31, 23, 32, 30, 33, 32, 36, 31, 36, 32, 38, 39, 41, 31, 42, 41, 39, 40, 44, 41, 47, 44, 47, 43, 50, 40, 51, 50, 49, 50
Offset: 1

Views

Author

Jaroslav Krizek, Apr 01 2009

Keywords

Examples

			For n = 8 we have the following proper divisors for k <= n: {1}, {1}, {1}, {1, 2}, {1}, {1, 2, 3}, {1}, {1, 2, 4}. Only k = 6 has a proper divisor that is not a divisor of 8, viz. 3. Hence a(8) = 1.
		

Crossrefs

Programs

  • Magma
    [ #[ k: k in [1..n] | exists(t){ d: d in Divisors(k) | d ne k and d notin Divisors(n) } ]: n in [1..76] ];
    
  • Maple
    f:= proc(n) local d;
       d:= numtheory:-divisors(n);
       nops(remove(t -> (numtheory:-divisors(t) minus {t}) subset d, [$4..n-1]))
    end proc:
    map(f, [$1..100]); # Robert Israel, Mar 30 2020
  • Mathematica
    a[n_] := Select[Most[Divisors[#]]& /@ Range[n], AnyTrue[#, !Divisible[n, #]&]&] // Length;
    Array[a, 100] (* Jean-François Alcover, Jul 17 2020 *)
  • PARI
    a(n) = my(dn = divisors(n)); sum(k=1, n, my(dk=setminus(divisors(k), Set(k))); #setintersect(dk, dn) != #dk); \\ Michel Marcus, Aug 27 2020

Formula

For primes p, a(p) = p - A036234(p) = p - A000720(p) - 1.

Extensions

Edited and extended by Klaus Brockhaus, Apr 06 2009

A159070 Count of numbers k in the range 1 < k <= n such that set of proper divisors of k is a subset of the set of proper divisors of n.

Original entry on oeis.org

0, 1, 2, 3, 3, 5, 4, 6, 5, 6, 5, 10, 6, 8, 8, 9, 7, 11, 8, 12, 10, 10, 9, 16, 10, 11, 11, 13, 10, 17, 11, 15, 13, 13, 13, 19, 12, 14, 14, 19, 13, 19, 14, 18, 19, 16, 15, 24, 16, 19, 17, 19, 16, 22, 18, 23, 18, 18, 17, 28, 18, 20, 23, 23, 20, 24, 19, 23, 21, 26, 20, 31, 21, 23, 25, 25
Offset: 1

Views

Author

Jaroslav Krizek, Apr 04 2009

Keywords

Comments

Here proper divisors include 1 but not the argument (k or n, respectively) in the divisor set, as defined in A032741.

Examples

			a(8) = 6 admits the following 6 k: 2 {1}, 3 {1}, 4 {1, 2}, 5 {1}, 7 {1}, 8 {1, 2, 4} with subsets of the proper divisors {1, 2, 4} for n = 8.
		

Crossrefs

Formula

a(n) = A158973(n) - 1.
If p = prime, element of A000040, a(p) = A158973(p) - 1 = A036234(p) - 1 = A000720(p).

Extensions

Edited and extended by R. J. Mathar, Apr 06 2009
Showing 1-2 of 2 results.