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.

Previous Showing 31-40 of 142 results. Next

A191647 Numbers n with property that the concatenation of their anti-divisors is a prime.

Original entry on oeis.org

3, 4, 5, 10, 14, 16, 40, 46, 100, 145, 149, 251, 340, 373, 406, 424, 439, 466, 539, 556, 571, 575, 617, 619, 628, 629, 655, 676, 689, 724, 760, 779, 794, 899, 901, 941, 970, 989, 1019, 1055, 1070, 1076, 1183, 1213, 1226, 1231, 1258, 1270, 1285, 1331, 1340
Offset: 1

Views

Author

Paolo P. Lava, Jun 10 2011

Keywords

Comments

Similar to A120712 which uses the proper divisors of n.

Examples

			The anti-divisors of 40 are 3, 9, 16, 27, and 391627 is prime, hence 40 is in the sequence.
		

Crossrefs

Programs

  • Maple
    P:=proc(i) local a,b,c,d,k,n,s,v; v:=array(1..200000);
    for n from 3 by 1 to i do k:=2; b:=0;
    while k0 and (2*n mod k)=0 then b:=b+1; v[b]:=k; fi;
         else
         if (n mod k)>0 and (((2*n-1) mod k)=0 or ((2*n+1) mod k)=0) then
    b:=b+1; v[b]:=k; fi; fi; k:=k+1; od; a:=v[1];
    for s from 2 to b do a:=a*10^floor(1+evalf(log10(v[s])))+v[s]; od;
    if isprime(a) then print(n); fi;
    od; end: P(10^6);
  • Mathematica
    antiDivisors[n_Integer] := Cases[Range[2, n - 1], _?(Abs[Mod[n, #] - #/2] < 1 &)]; a191647[n_Integer] := Select[Range[n],
    PrimeQ[FromDigits[Flatten[IntegerDigits /@ antiDivisors[#]]]] &]; a191647[1350] (* Michael De Vlieger, Aug 09 2014, "antiDivisors" after Harvey P. Dale at A066272 *)
  • Python
    from sympy import isprime
    [n for n in range(3,10**4) if isprime(int(''.join([str(d) for d in range(2,n) if n%d and 2*n%d in [d-1,0,1]])))] # Chai Wah Wu, Aug 08 2014

Extensions

a(618) corrected in b-file by Paolo P. Lava, Feb 28 2018

A192274 Numbers which are both Zumkeller numbers and anti-Zumkeller numbers.

Original entry on oeis.org

42, 70, 78, 88, 126, 160, 176, 228, 234, 258, 270, 280, 308, 342, 350, 368, 378, 380, 390, 396, 402, 438, 448, 462, 468, 490, 500, 522, 532, 540, 552, 558, 560, 572, 580, 588, 608, 618, 620, 630, 644, 650, 690, 702, 732, 756, 770, 780, 798, 812, 822, 852, 858
Offset: 1

Views

Author

Paolo P. Lava, Jun 28 2011

Keywords

Comments

Numbers n whose sets of divisors and anti-divisors can each be partitioned into two disjoint sets whose sums are sigma(n)/2 for the sets in the divisors partition and sigma*(n)/2 for the anti-divisors partition, where sigma*(n) is the sum of the anti-divisors of n.

Examples

			270-> divisors: 1,2,3,5,6,9,10,15,18,27,30,45,54,90,135,270; sigma(270)/2=360; 1+2+3+5+6+9+10+15+18+27+30+45+54+135=90+270=360.
270-> anti-divisors: 4,7,11,12,20,36,49,60,77,108,180; sigma*(270)/2=282; 4+7+11+20+60+180=12+36+49+77+108=282.
		

Crossrefs

Programs

  • Maple
    with(combstruct);
    with(numtheory);
    P:=proc(i)
    local S,R,Stop,Comb,a,b,c,d,k,m,n,s;
    for n from 3 to i do
      a:={};
      for k from 2 to n-1 do if abs((n mod k)- k/2) < 1 then a:=a union {k}; fi; od;
      b:=nops(a); c:=op(a); s:=0;
       if b>1 then for k from 1 to b do s:=s+c[k]; od;
       else s:=c;
      fi;
      if (modp(s,2)=0 and 2*n<=s) then
         S:=1/2*s-n; R:=select(m->m<=S,[c]); Stop:=false; Comb:=iterstructs(Combination(R));
         while not (finished(Comb) or Stop) do Stop:=add(d,d=nextstruct(Comb))=S; od;
         if Stop then
            s:=sigma(n);
            if (modp(s,2)=0 and 2*n<=s) then
              S:=1/2*s-n; R:=select(m->m<=S,divisors(n)); Stop:=false;       Comb:=iterstructs(Combination(R));
              while not (finished(Comb) or Stop) do Stop:=add(d,d=nextstruct(Comb))=S; od;
              if Stop then print(n); fi;
            fi;
         fi;
      fi;
    od;
    end:
    P(10000);
  • Python
    from sympy import divisors
    from sympy.combinatorics.subsets import Subset
    def antidivisors(n):
        return [2*d for d in divisors(n) if n > 2*d and n % (2*d)] + \
               [d for d in divisors(2*n-1) if n > d >=2 and n % d] + \
               [d for d in divisors(2*n+1) if n > d >=2 and n % d]
    for n in range(1, 10**3):
        d = divisors(n)
        s = sum(d)
        if not s % 2 and max(d) <= s/2:
            for x in range(1, 2**len(d)):
                if sum(Subset.unrank_binary(x, d).subset) == s/2:
                    d = antidivisors(n)
                    s = sum(d)
                    if not s % 2 and max(d) <= s/2:
                        for x in range(1, 2**len(d)):
                            if sum(Subset.unrank_binary(x, d).subset) == s/2:
                                print(n, end=', ')
                                break
                    break
    # Chai Wah Wu, Aug 14 2014
    
  • Python
    from sympy import divisors
    import numpy as np
    A192274 = []
    for n in range(3,10**3):
        d = divisors(n)
        s = sum(d)
        if not s % 2 and 2*n <= s:
            d.remove(n)
            s2, ld = int(s/2-n), len(d)
            z = np.zeros((ld+1,s2+1),dtype=int)
            for i in range(1,ld+1):
                y = min(d[i-1],s2+1)
                z[i,range(y)] = z[i-1,range(y)]
                z[i,range(y,s2+1)] = np.maximum(z[i-1,range(y,s2+1)],z[i-1,range(0,s2+1-y)]+y)
                if z[i,s2] == s2:
                    d2 = [2*x for x in d if n > 2*x and n % (2*x)] + \
                    [x for x in divisors(2*n-1) if n > x >=2 and n % x] + \
                    [x for x in divisors(2*n+1) if n > x >=2 and n % x]
                    s, dmax = sum(d2), max(d2)
                    if not s % 2 and 2*dmax <= s:
                        d2.remove(dmax)
                        s2, ld = int(s/2-dmax), len(d2)
                        z = np.zeros((ld+1,s2+1),dtype=int)
                        for i in range(1,ld+1):
                            y = min(d2[i-1],s2+1)
                            z[i,range(y)] = z[i-1,range(y)]
                            z[i,range(y,s2+1)] = np.maximum(z[i-1,range(y,s2+1)],z[i-1,range(0,s2+1-y)]+y)
                            if z[i,s2] == s2:
                                A192274.append(n)
                            break
                    break
    # Chai Wah Wu, Aug 19 2014

Extensions

Corrected entries and comment by Chai Wah Wu, Aug 13 2014

A192282 Numbers n such that n and n+1 have same sum of anti-divisors.

Original entry on oeis.org

1, 8, 17, 120, 717, 729, 957, 8097, 10785, 12057, 35817, 44817, 52863, 58677, 59757, 76759, 95397, 102957, 114117, 119337, 182157, 206097, 215997, 230037, 253977, 263877, 269277, 271797, 295377, 321417, 402657, 435477, 483117, 485637, 510837, 586797, 589317
Offset: 1

Views

Author

Paolo P. Lava, Jul 27 2011

Keywords

Comments

Like A002961 but using anti-divisors.
Curiously 957 and 958 have same sum of divisors and same sum of anti-divisors.

Examples

			Anti-divisors of 717 are 2, 5, 6, 7, 35, 41, 205, 287, 478 and their sum is 1066.
Anti-divisors of 718 are  3, 4, 5, 7, 35, 41, 205, 287, 479 and their sum is 1066.
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    P:=proc(n)
    local a,b,i,k;
    b:=2;
    for i from 4 to n do
      a:=0;
      for k from 2 to i-1 do
        if abs((i mod k)- k/2) < 1 then a:=a+k; fi;
      od;
      if a=b then print(i-1); fi;
      b:=a;
    od;
    end:
    P(200000);

Extensions

Initial term a(1)=1 inserted, a(2)=9 through a(20)=119337 verified, and a(21)-a(28) added by John W. Layman, Aug 04 2011

A192284 Numbers n such that the average of the anti-divisors of n is an integer.

Original entry on oeis.org

3, 4, 6, 8, 9, 11, 15, 16, 18, 19, 20, 26, 29, 30, 34, 36, 37, 38, 47, 49, 51, 63, 64, 68, 69, 82, 93, 94, 95, 96, 106, 117, 120, 121, 131, 134, 135, 141, 155, 169, 174, 186, 187, 190, 191, 197, 200, 203, 206, 224, 226, 244, 252, 257, 271, 272, 274, 276, 289
Offset: 1

Views

Author

Paolo P. Lava, Jul 20 2011

Keywords

Comments

Like A003601 but using anti-divisors.

Examples

			Anti-divisors of 38 are 7: 3, 4, 5, 7, 11, 15, 25. Their sum is 70 and 70/7=10 that is an integer.
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    P:=proc(n)
    local a,b,i,k;
    for i from 3 to n do
      a:=0; b:=0;
      for k from 2 to i-1 do
        if abs((i mod k)- k/2) < 1 then a:=a+k; b:=b+1; fi;
      od;
      if trunc(a/b)=a/b then print(i); fi;
    od;
    end:
    P(1000);

A192291 Couple of numbers a, b for which sigma*(a)=b and sigma(b)-b=a, where sigma*(n) is the sum of the anti-divisors of n.

Original entry on oeis.org

10, 14, 32, 58, 154, 182, 382, 758, 3830, 5962, 67815454, 94941602, 7172169026, 8196764584, 18624907238, 34790550682, 30033199624, 31387575416, 38857270202, 48571587730
Offset: 1

Views

Author

Paolo P. Lava, Jun 29 2011

Keywords

Comments

a(21) > 10^11. - Hiroaki Yamanouchi, Sep 28 2015

Examples

			sigma*(10) = 3+4+7 = 14.
sigma(14)-14 = 1+2+7 = 10.
sigma*(32)= 3+5+7+9+13+21 = 58.
sigma(58)-58 = 1+2+29 = 32.
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    P:= proc(n)
    local a,b,c,i,ks;
    for i from 3 to n do
       a:={};
       for k from 2 to i-1 do
         if abs((i mod k)- k/2) < 1 then
           a:=a union {k};
         fi;
       od;
       b:=nops(a); c:=op(a); s:=0;
       for k from 1 to b do
           s:=s+c[k];
       od;
       if sigma(s)-s=i then
          print(i,s);
       fi;
    od;
    end:
    P(10000);

Extensions

a(11)-a(20) from Hiroaki Yamanouchi, Sep 28 2015

A192292 Pairs of numbers a, b for which sigma*(a)=b and sigma(b)-b-1=a, where sigma*(n) is the sum of the anti-divisors of n.

Original entry on oeis.org

7, 10, 14, 16, 45, 86, 2379, 2324, 4213, 5866, 27323, 33604, 1303227, 1737628, 3722831, 4208308, 15752651, 18706108, 6094085371, 8114352508, 30090695519, 40119052564
Offset: 1

Views

Author

Paolo P. Lava, Jun 29 2011

Keywords

Comments

Betrothed numbers mixed with anti-divisors.
a(23) > 10^11. - Hiroaki Yamanouchi, Sep 28 2015

Examples

			sigma*(45)= 2+6+7+10+13+18+30 = 86.
sigma(86)-86-1 = 2+43 = 45.
sigma*(2379) = 2+6+26+67+71+78+122+366+1586 = 2374.
sigma(2324)-2324-1 = 2+4+7+14+28+83+166+332+581+1162 = 2379.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:= proc(n) local b,c,i,j,k;
    for i from 3 to n do k:=0; j:=i;
    while j mod 2 <> 1 do k:=k+1; j:=j/2; od;
    b:=sigma(2*i+1)+sigma(2*i-1)+sigma(i/2^k)*2^(k+1)-6*i-2;
    if sigma(b)-b-1=i then print(i); print(b); fi;
    od; end: P(10^9);

Extensions

a(13)-a(14) from Paolo P. Lava, Dec 03 2014
a(7)-a(8) swapped and a(15)-a(22) added by Hiroaki Yamanouchi, Sep 28 2015

A195150 Number of divisors d of n such that d-1 does not divide n.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Sep 19 2011

Keywords

Comments

Define "subdivisor" of n to be the positive integer b such that b = d - 1, if d divides n and b does not divide n. For the list of subdivisors of n see A195153.
First occurrence of k is given in A173569. - Robert G. Wilson v, Sep 23 2011

Examples

			a(24) = 4 since the divisors of 24 are 1,2,3,4,6,8,12,24, so the subdivisors of 24 are 5,7,11,23 because 6-1 = 5, 8-1 = 7, 12-1 = 11 and 24-1 = 23. Note that the positive integers 1,2,3 are not subdivisors of 24 because they are divisors of 24.
		

Crossrefs

Programs

  • Haskell
    a195150 n = length [d | d <- [3..n], mod n d == 0, mod n (d-1) /= 0]
    -- Reinhard Zumkeller, Sep 23 2011
  • Mathematica
    f[n_] := Module[{d = Divisors[n]}, Length[Select[Rest[d-1], Mod[n, #] > 0 &]]]; Table[f[n], {n, 100}] (* T. D. Noe, Sep 22 2011 *)

Formula

a(n) = A137921(n) - 1. - Robert G. Wilson v, Sep 23 2001
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 3), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 18 2024

A210732 Numbers n for which sigma*(n)=sigma*(x)+sigma*(y), where n=x+y and sigma*(n) is the sum of the anti-divisors of n.

Original entry on oeis.org

6, 9, 15, 18, 21, 24, 27, 30, 31, 33, 37, 39, 43, 44, 46, 47, 53, 56, 57, 62, 65, 66, 70, 73, 74, 75, 76, 78, 81, 83, 86, 88, 90, 91, 92, 93, 97, 99, 102, 103, 106, 107, 109, 110, 114, 116, 117, 118, 119, 121, 122, 123, 125, 126, 127, 129, 131, 133, 135, 136
Offset: 3

Views

Author

Paolo P. Lava, May 10 2012

Keywords

Comments

Similar to A211223 but using anti-divisors.

Examples

			sigma*(127)=sigma*(45)+sigma*(82) that is 212=86+126.
In more than one way:
sigma*(133)=sigma*(50)+sigma*(83)=sigma*(52)+sigma*(81) that is
204=80+124=94+110.
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    A210732:=proc(q)
    local a,b,c,i,j,k,n;
    for n from 3 to q do
      a:=0;
      for k from 2 to n-1 do if abs((n mod k)-k/2)<1 then a:=a+k; fi; od;
      for i from 1 to trunc(n/2) do
       b:=0; c:=0;
       for k from 2 to i-1 do if abs((i mod k)-k/2)<1 then b:=b+k; fi; od;
       for k from 2 to n-i-1 do if abs(((n-i) mod k)-k/2)<1 then c:=c+k; fi; od;
       if a=b+c then print(n); break; fi;
      od;
    od; end:
    A210732(10000);

A240979 Sum of unitary anti-divisors of n.

Original entry on oeis.org

0, 0, 2, 3, 5, 0, 10, 8, 2, 10, 12, 5, 19, 12, 2, 14, 28, 12, 18, 16, 2, 32, 34, 7, 29, 20, 18, 38, 24, 0, 42, 58, 20, 26, 28, 0, 50, 66, 20, 39, 41, 22, 56, 32, 22, 54, 60, 24, 58, 56, 2, 86, 88, 0, 42, 40, 30, 92, 90, 35, 57, 74, 32, 46, 48, 26, 132, 104, 2
Offset: 1

Views

Author

Paolo P. Lava, Aug 06 2014

Keywords

Comments

For unitary anti-divisors of n are intended all the anti-divisors of n which are coprime to n.

Crossrefs

Programs

Formula

Anti-divisors of 14 are 3, 4, 9. Anti-divisors coprime to 14 are 3 and 9 and therefore a(14) = 3 + 9 = 12.

A242965 Numbers whose anti-divisors are all primes.

Original entry on oeis.org

3, 4, 5, 7, 8, 11, 16, 17, 19, 29, 43, 47, 61, 64, 71, 79, 89, 101, 107, 109, 151, 191, 197, 223, 251, 271, 317, 349, 359, 421, 439, 461, 521, 569, 601, 631, 659, 673, 691, 701, 719, 811, 821, 881, 911, 919, 947, 971, 991, 1009, 1024, 1051, 1091, 1109, 1153
Offset: 1

Views

Author

Paolo P. Lava, May 28 2014

Keywords

Examples

			The anti-divisors of 191 are all primes: 2, 3, 127.
The same for 1024: 3, 23, 89, 683.
		

Crossrefs

Programs

  • Maple
    P := proc(q) local k,ok,n; for n from 3 to q do ok:=1;
    for k from 2 to n-1 do if abs((n mod k)-k/2)<1 then
    if not isprime(k) then ok:=0; break; fi; fi; od;
    if ok=1 then print(n); fi; od; end: P(10^3);
  • Python
    from sympy import divisors, isprime
    for n in range(3, 10**4):
        for d in [2*d for d in divisors(n) if n > 2*d and n % (2*d)] + \
                 [d for d in divisors(2*n-1) if n > d >= 2 and n % d] + \
                 [d for d in divisors(2*n+1) if n > d >= 2 and n % d]:
            if not isprime(d):
                break
        else:
            print(n, end=', ')
    # Chai Wah Wu, Aug 15 2014
Previous Showing 31-40 of 142 results. Next