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.

A241006 Number of positive numbers

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Aug 07 2014

Keywords

Comments

Note that a different sequence could be defined by "Number of positive numbers < n that do not have any anti-divisor as a factor," which gives A066452. Consider for example n=10 with anti-divisors {3,4,7} and the number 2. 2 is not coprime to the anti-divisor 4 and does not contribute to a(10), whereas 2 does not have 4 as a factor and contributes to A066452.

Examples

			10 has anti-divisors {3,4,7}. The positive integers that are <10 and coprime to
all of them are {1,5}, so a(10)=2. The integers 2, 3, 4, 6, 7, 8 and 9
are not coprime to all of {3,4,7} and do not contribute to the count.
		

Crossrefs

Cf. A066452.

Programs

  • Maple
    A241006 :=proc(n)
        local a,ad,i,isco ;
        a := 0 ;
        ad := antidivisors(n) ; # implemented in A066272
        for i from 1 to n-1 do
            isco := true;
            for adiv in ad do
                if igcd(adiv,i) > 1 then
                    isco := false;
                    break;
                end if;
            end do:
            if isco then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: