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-10 of 14 results. Next

A066272 Number of anti-divisors of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 31 2001

Keywords

Comments

Anti-divisors are the numbers that do not divide a number by the largest possible margin. E.g. 20 has anti-divisors 3, 8 and 13. An alternative name for anti-divisor is unbiased non-divisors.
Definition: If an odd number i in the range 1 < i <= n divides N where N is any one of 2n-1, 2n or 2n+1 then d = N/i is called an anti-divisor of n. The numbers 1 and 2 have no anti-divisors.
Equivalently, an anti-divisor of n is a number d in the range [2,n-1] which does not divide n and is either a (necessarily odd) divisor of 2n-1 or 2n+1, or a (necessarily even) divisor of 2n.
Thus an anti-divisor of n is an integer d in [2,n-1] such that n == (d-1)/2, d/2, or (d+1)/2 (mod d), the class of d being -1, 0, or 1, respectively.
k is an anti-divisor of n if and only if 1 < k < n and | (n mod k) - k/2 | < 1. - Max Alekseyev, Jul 21 2007
The number of even anti-divisors of n is one less than the number of odd divisors of n; specifically, all but the largest odd divisor multiplied by the power of two dividing 2n (i.e., 2^A001511(n)). For example, the odd divisors of 18 are 1, 3, and 9, so the even anti-divisors of 18 are 1*4 = 4 and 3*4 = 12. - Franklin T. Adams-Watters, Sep 11 2009
2n-1 and 2n+1 are twin primes if and only if n has no odd anti-divisors (e.g., n=15 has no odd anti-divisors so 29 and 31 are twin primes). - Jon Perry, Sep 02 2012
Records are in A066464. - Robert G. Wilson v, Sep 03 2012

Examples

			For example, n = 18: 2n-1, 2n, 2n+1 are 35, 36, 37 with odd divisors > 1 {5,7,35}, {3,9}, {37} and quotients 7, 5, 1, 12, 4, 1, so the anti-divisors of 18 are 4, 5, 7, 12. Therefore a(18) = 4.
		

Crossrefs

See A130799 for the anti-divisors.

Programs

  • Maple
    antidivisors := proc(n)
        local a,k;
        a := {} ;
        for k from 2 to n-1 do
            if abs((n mod k)- k/2) < 1 then
                a := a union {k} ;
            end if;
         end do:
         a ;
    end proc:
    A066272 := proc(n)
        nops(antidivisors(n)) ;
    end proc:
    seq(A066272(n),n=1..120); # R. J. Mathar, May 24 2010
  • Mathematica
    antid[ n_ ] := Select[ Union[ Join[ Select[ Divisors[ 2n - 1 ], OddQ[ # ] && # != 1 & ], Select[ Divisors[ 2n + 1 ], OddQ[ # ] && # != 1 & ], 2n / Select[ Divisors[ 2n ], OddQ[ # ] && # != 1 & ] ] ], # < n & ]; Table[ Length[ antid[ n ] ], {n, 1, 100} ]
    f[n_] := Length@ Complement[ Sort@Join[ Select[ Union@ Flatten@ Divisors[{2 n - 1, 2 n + 1}], OddQ@ # && # < n &], Select[ Divisors[2 n], EvenQ@ # && # < n &]], Divisors@ n]; Array[f, 105] (* Robert G. Wilson v, Jul 17 2007 *)
    nd[n_]:=Count[Range[2,n-1],?(Abs[Mod[n,#]-#/2]<1&)]; Array[nd,110] (* _Harvey P. Dale, Jul 11 2012 *)
  • PARI
    al(n)=Vec(sum(k=1,n,(x^(3*k)+x*O(x^n))/(1-x^(2*k))+(x^(3*k+1)+x^(3*k+2)+x*O(x^n))/(1-x^(2*k+1)))) \\ Franklin T. Adams-Watters, Sep 11 2009
    
  • PARI
    a(n) = if(n>1, numdiv(2*n+1) + numdiv(2*n-1) + numdiv(n/2^valuation(n,2)) - 5, 0) \\ Max Alekseyev, Apr 27 2010
    
  • PARI
    antidivisors(n)=select(t->n%t && tCharles R Greathouse IV, May 12 2016
    
  • Python
    from sympy import divisors
    def A066272(n):
        return len([d for d in divisors(2*n) if n > d >=2 and n%d]) +  len([d for d in divisors(2*n-1) if n > d >=2 and n%d]) +  len([d for d in divisors(2*n+1) if n > d >=2 and n%d]) # Chai Wah Wu, Aug 11 2014

Formula

G.f.: Sum_{k>0} x^(3k) / (1 - x^(2k)) + (x^(3k+1) + x^(3k+2)) / (1 - x^(2k+1)). - Franklin T. Adams-Watters, Sep 11 2009
a(n) = A000005(2*n-1) + A000005(2*n+1) + A001227(n) - 5. - Max Alekseyev, Apr 27 2010
a(n) = Sum_{i=3..n} (i mod 2) * (3 + floor((2n-1)/i) - ceiling((2n-1)/i) + floor(2n/i) - ceiling(2n/i) + floor((2n+1)/i) - ceiling((2n+1)/i)). - Wesley Ivan Hurt, Aug 10 2014
Sum_{k=1..n} a(k) ~ (n/2) * (3*log(n) + 6*gamma - 13 + 7*log(2)), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 19 2024

Extensions

More terms from Robert G. Wilson v, Jan 02 2002
More terms from Max Alekseyev, Apr 27 2010

A130846 Replace n with the concatenation of its anti-divisors.

Original entry on oeis.org

2, 3, 23, 4, 235, 35, 26, 347, 237, 58, 2359, 349, 2610, 311, 235711, 45712, 2313, 3813, 2614, 345915, 235915, 716, 2371017, 3417, 2561118, 3581119, 2319, 41220, 237921, 35791321, 2561322, 3423, 23101423, 824, 2351525, 3457111525, 2671126, 391627
Offset: 3

Views

Author

Jonathan Vos Post, Jul 20 2007, Jul 22 2007

Keywords

Comments

Number of anti-divisors concatenated to form a(n) is A066272(n). We may consider prime values of the concatenated anti-divisor sequence and we may iterate it, i.e. n, a(n), a(a(n)), a(a(a(n))) which leads to questions of trajectory, cycles, fixed points.
See A066272 for definition of anti-divisor.
Primes in this sequence are at n=3,4,5,10,14,16,40,46,100,145,149,... - R. J. Mathar, Jul 24 2007

Examples

			3: 2, so a(3) = 2.
4: 3, so a(4) = 3.
5: 2, 3, so a(5) = 23.
6: 4, so a(6) = 4.
7: 2, 3, 5, so a(7) = 235.
17: 2, 3, 5, 7, 11, so a(17) = 235711
		

Crossrefs

Programs

  • Maple
    antiDivs := proc(n) local resul,odd2n,r ; resul := {} ; for r in ( numtheory[divisors](2*n-1) union numtheory[divisors](2*n+1) ) do if n mod r <> 0 and r> 1 and r < n then resul := resul union {r} ; fi ; od ; odd2n := numtheory[divisors](2*n) ; for r in odd2n do if ( r mod 2 = 1) and r > 2 then resul := resul union {2*n/r} ; fi ; od ; RETURN(resul) ; end: A130846 := proc(n) cat(op(antiDivs(n))) ; end: seq(A130846(n),n=3..80) ; # R. J. Mathar, Jul 24 2007
  • Python
    from sympy.ntheory.factor_ import antidivisors
    def A130846(n): return int(''.join(str(s) for s in antidivisors(n))) # Chai Wah Wu, Dec 08 2021

Extensions

More terms from R. J. Mathar, Jul 24 2007

A171487 Product of odd prime anti-factors < n, with multiplicity.

Original entry on oeis.org

1, 1, 1, 9, 9, 1, 15, 15, 1, 21, 21, 25, 675, 27, 1, 33, 1155, 35, 39, 39, 1, 45, 45, 49, 2499, 51, 55, 3135, 57, 1, 63, 4095, 65, 69, 69, 1, 75, 5775, 77, 81, 81, 85, 7395, 87, 91, 8463, 8835, 95, 99, 99, 1, 105, 105, 1, 111, 111, 115, 13455, 13923, 14399, 14883, 15375
Offset: 1

Views

Author

Daniel Forgues, Dec 10 2009

Keywords

Comments

Anti-factor is here defined as almost synonym with anti-divisor (except without the restriction of being less than n for anti-divisor.) ODD p^k is anti-factor (n) of n iff p^i, 1<=i<=k are anti-factors of n (note that this only applies to ODD anti-factors.)
In this sequence p < n, but p^k with k>=2 may be larger than n.
a(n) = 1 iff 2n-1 and 2n+1 are twin primes;
a(n) = 2n-1 iff 2n-1 is composite, 2n+1 is prime;
a(n) = 2n+1 iff 2n-1 is prime, 2n+1 is composite;
a(n) = (2n-1)(2n+1) iff 2n-1 and 2n+1 are both composite.

Examples

			3 is an anti-factor (and anti-divisor) of 5, and 3^2=9 is also an anti-factor (but not an anti-divisor since > 5) of 5.
		

Crossrefs

Formula

a(n) = {product of odd prime factors < 2n-1 of 2n-1, with multiplicity} * {product of odd prime factors < 2n+1 of 2n+1, with multiplicity}
GCD(a(n), a(n+1)) = {product of odd prime factors < 2n+1 of 2n+1, with multiplicity} (cf. A171435)

A216982 Anti-Chowla's function: sum of anti-divisors of n except the largest.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 5, 3, 2, 7, 5, 5, 10, 7, 8, 3, 17, 16, 5, 11, 8, 21, 19, 7, 22, 7, 24, 27, 5, 16, 21, 37, 26, 7, 29, 8, 25, 45, 26, 28, 14, 38, 27, 11, 56, 27, 29, 24, 39, 47, 8, 59, 53, 16, 37, 19, 36, 57, 51, 67, 16, 37, 70, 3, 41, 42, 87, 67, 8, 55
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 19 2013

Keywords

Comments

Numbers n such that Chowla's function(n) = a(n): 1, 2, 3, 10, 15, 28, 75, 88, 231, 284, 602,...
Places n where a(n) is zero: 1, 2, 3, 4, 6, 96,...
Fixed points of this sequence: 17, 53, 127, 217, 385, 2321,...
Places n where a(n) equals the largest anti-divisor: 1, 2, 7, 10, 31, 37, 39, 55, 78, 160, 482, 937, 1599, 2496,...
Numbers n such that n -/+ 1 and a(n -/+ 1) are all primes: 6, 18, 72, 102, 108, 198, 270, 432, 570, 882,...

Examples

			Anti-divisors of 7 are 2, 3, 5, so a(7) = 2 + 3 = 5.
		

Crossrefs

Programs

Formula

a(n) = A066417(n) - A066481(n).

A218767 Total number of divisors and anti-divisors of n.

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 5, 6, 5, 7, 5, 8, 6, 7, 7, 7, 7, 10, 5, 9, 7, 9, 7, 10, 8, 7, 9, 11, 5, 11, 7, 12, 9, 7, 9, 11, 7, 11, 9, 12, 6, 13, 7, 9, 13, 9, 7, 13, 9, 12, 7, 13, 9, 11, 9, 11, 9, 11, 9, 18, 6, 9, 13, 9, 9, 13, 11, 13, 7, 13, 7, 18, 9, 9, 11, 11, 13, 13, 5, 15, 11, 11, 9, 16, 12, 9
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 05 2013

Keywords

Comments

Or tau(n) + anti-tau(n), where anti-tau = A066272.
Total sum of divisors and anti-divisors of n or sigma(n) + A066417(n): 1, 3, 6, 10, 11, 16, 18, 23, 21, 32, 24, 41, 33, 40, 42, 45, 46, 67, 38, 66, 54, 72, 58, 83, 70, 66, 82, 102, 54, 108,...
Numbers n such that sigma(n) = n + anti-sigma(n): A074751.
Numbers n such that Chowla's function(n) = anti-sigma(n): 1, 2, 16, 60, 72,...
Number of divisors of n minus number of anti-divisors of n or tau(n) - anti-tau(n): 1, 2, 1, 2, 0, 3, -1, 2, 1, 1, -1, 4, -2, 1, 1, 3, -3, 2, -1, 3, 1, -1, -3, 6, -2, 1, -1, 1, -1, 5, -3, 0, -1, 1, -1, 7, -3, -3, -1, 4, -2, 3, -3, 3, -1,...
Product of number of divisors of n and number of anti-divisors of n, or tau(n)*anti-tau(n): 0, 0, 2, 3, 4, 4, 6, 8, 6, 12, 6, 12, 8, 12, 12, 10, 10, 24, 6, 18, 12, 20, 10, 16, 15, 12, 20, 30, 6, 24,...
Number of ways to write n as k*(k - m) with k divisor and m anti-divisor of n: 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0,...
Numbers which are not of the form k*(k - m), k divisor, m anti-divisor (i.e., where the number of ways is zero): 1, 2, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 19, 21, 23, 24, 25, 26, 29,

Crossrefs

Programs

Formula

a(n) = A000005(n) + A066272(n).

A074749 Smallest difference between consecutive anti-divisors of n (ordered by size).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 2, 4, 1, 1, 3, 1, 1, 4, 8, 1, 1, 1, 5, 4, 1, 1, 9, 1, 1, 1, 2, 1, 8, 1, 2, 1, 1, 1, 16, 1, 1, 1, 6, 1, 1, 1, 5, 1, 1, 1, 13, 1, 1, 4, 1, 1, 8, 1, 13, 1, 1, 1, 1, 1, 1, 1, 40, 1, 3, 1, 1, 4, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 4, 1, 1, 1, 5, 1, 1
Offset: 1

Views

Author

Jason Earls, Sep 06 2002

Keywords

Comments

See A066272 for definition of anti-divisor.

Examples

			For n=13, anti-divisors={2,3,5,9}; differences={1,2,4}; a(13) = smallest difference = 1.
		

Crossrefs

Programs

  • Mathematica
    min[s_] := If[Length[s] > 0, Min[s], 0]; min /@ Differences /@ Table[Select[Range[2, n - 1], Abs[Mod[n, #] - #/2] < 1 &], {n, 100}] (* Amiram Eldar, Feb 03 2020 after Harvey P. Dale at A066272 *)
  • PARI
    A074749(n) = { my(pad=0,md=0); for(k=2,n,if((n%k) && (!((2*n)%k) || !((2*n-1)%k) || !((2*n+1)%k)), if(pad, md=if(md,min(k-pad,md),k-pad)); pad = k)); (md); }; \\ Antti Karttunen, Jan 15 2025

Extensions

More terms from Amiram Eldar, Feb 03 2020

A120660 Trajectory of 5 under map "replace k with concatenation of anti-divisors of k".

Original entry on oeis.org

5, 23, 235915, 231058199290237132541627094366157277
Offset: 1

Views

Author

M. F. Hasler, Jul 26 2007

Keywords

Comments

The next term is very large!

Crossrefs

A120661 Trajectory of 7 under map "replace k with concatenation of anti-divisors of k".

Original entry on oeis.org

7, 235, 237106794157, 23515118109417094519614036454677229711469381810493772727748015786693526280375184463161423922194842717663158071196105
Offset: 1

Views

Author

M. F. Hasler, Jul 26 2007

Keywords

Crossrefs

A130874 Anti-divisorial numbers: the product of all anti-divisors of all integers less than or equal to n.

Original entry on oeis.org

2, 6, 36, 144, 4320, 64800, 777600, 65318400, 2743372800, 109734912000, 29628426240000, 3199870033920000, 383984404070400000, 12671485334323200000, 29271131122286592000000, 49175500285441474560000000, 3835689022264435015680000000, 1196734974946503724892160000000
Offset: 3

Views

Author

Jonathan Vos Post, Jul 25 2007

Keywords

Comments

Different from the anti-primorial, which is the partial products of anti-primes.

Examples

			a(11) = (anti-divisors of 3) * (anti-divisors of 4) * ... * (anti-divisors) of 11 = (2) * (3) * (2 * 3) * (4) * (2 * 3 * 5) * (3 * 5) * (2 * 6) * (3 * 4 * 7) * (2 * 3 * 7) = 2743372800.
		

Crossrefs

Programs

  • Maple
    A130874 :=  proc(n)
        mul( A091507(i),i=1..n) ;
    end proc:
    seq(A130874(n),n=3..20) ; # R. J. Mathar, Jan 24 2022
  • Python
    from sympy.ntheory.factor_ import antidivisors
    def A130874():
        sum = 1
        i = 2 #(offset-1)
        while True:
            i += 1
            for j in antidivisors(i):
                sum *= j
            yield sum
            if i == 50:#Generator stops after calculating a(50)
                break
    for i in A130874():
        print(i) # Hakan Icoz, Dec 26 2021

Formula

a(n) = Product_{k=3..n} {anti-divisors(k)} = Product_{k=3..n} Product_{j=1..A066272(k)} (j-th element of k-th row of A130799) = partial products of A091507.

Extensions

More terms from Hakan Icoz, Dec 25 2021

A226445 Smallest k such that n is the n-th largest anti-divisor of k.

Original entry on oeis.org

5, 10, 18, 32, 45, 94, 220, 175, 325, 247, 630, 578, 637, 1012, 2712, 3867, 4851, 2993, 10230, 2363, 6435
Offset: 2

Views

Author

Juri-Stepan Gerasimov, Jun 06 2013

Keywords

Examples

			a(7) = 94 because the sorted anti-divisors of 94 are (63, 38, 27, 21, 10, 9, 7, 3, 2) and 7 is the 7th anti-divisor.
		

Crossrefs

Programs

  • Maple
    antidivisors := proc(n)
        local a, k;
        a := {} ;
        for k from 2 to n-1 do
            if abs((n mod k)- k/2) < 1 then
                a := a union {k} ;
            end if;
        end do:
        convert(a,list) ;
    end proc:
    A226445 := proc(n)
        local k,adv;
        for k from 3 do
            adv := sort(antidivisors(k)) ;
            if nops(adv) >= n then
            if op(-n,adv) = n then
                return k;
            end if;
            end if;
        end do:
    end proc: # R. J. Mathar, Jun 18 2013
Showing 1-10 of 14 results. Next