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-6 of 6 results.

A080372 a(n) is the smallest x such that the quotient d(x)/d(x+1) equals n, where d = A000005.

Original entry on oeis.org

2, 6, 12, 30, 112, 60, 192, 210, 180, 240, 13312, 420, 12288, 2112, 1008, 1320, 2162688, 1800, 786432, 2160, 4800, 15360, 62914560, 2520, 6480, 61440, 6300, 8640, 3489660928, 12240, 3221225472, 7560, 64512, 1376256, 58320, 12600, 206158430208, 8650752, 184320, 15120
Offset: 1

Views

Author

Labos Elemer, Feb 24 2003

Keywords

Comments

a(41) > 10^12. - Donovan Johnson, Sep 02 2013

Examples

			n = 17: a(17) = 2162688 = m, d(m) = 68, d(m+1) = 4, quotient = 17.
		

Crossrefs

Programs

  • Mathematica
    t = Table[ 0, {50}]; Do[ s = DivisorSigma[0, n] / DivisorSigma[0, n+1]; If[ s < 51 && t[[s]] == 0, t[[s]] = n], {n, 1, 45000000}]; t
  • PARI
    {a(n) = my(k=1); while(numdiv(k)!=n*numdiv(k+1), k++); k} \\ Seiichi Manyama, Jan 17 2021

Formula

a(n)=Min{x : d[x]/d[x+1]=n}

Extensions

More terms from Robert G. Wilson v, Feb 27 2003
a(23), a(29) and a(31) from Donovan Johnson, Jun 02 2010
a(37), a(39)-a(40) from Donovan Johnson, Sep 02 2013

A340799 a(n) is the smallest prime p such that p + 1 has 2n divisors.

Original entry on oeis.org

2, 5, 11, 23, 47, 59, 191, 167, 179, 239, 5119, 359, 20479, 2111, 719, 839, 1114111, 1259, 786431, 3023, 2879, 15359, 348127231, 3359, 22031, 266239, 6299, 6719, 22280142847, 5039, 559419490303, 7559, 156671, 7798783, 25919, 10079, 1168231104511, 5505023
Offset: 1

Views

Author

Jaroslav Krizek, Jan 21 2021

Keywords

Comments

The only prime p such that p+1 has an odd number of divisors is 3, because every number with an odd number of divisors is a square. - Robert Israel, Jan 12 2025

Examples

			a(4) = 23 because 23 is the smallest prime p such that p + 1 has 2*4 divisors; tau(24) = 8.
		

Crossrefs

Cf. A000005 (tau), A003680, A080371.

Programs

  • Magma
    Ax:=func; [Ax(n): n in[1..20]];
  • Maple
    g:= proc(n,k) # lists of integers > k whose product is n
          option remember;
          local F,m;
          if n = 1 then return [[]]
          elif k >= n then return []
          fi;
          F:= select(`>`,numtheory:-divisors(n),k);
          [seq(op(map(t -> [m,op(t)], procname(n/m,m-1))), m=F)]
    end proc:
    children:= proc(t) local m,nt,S,i,qs,t3s,t1s;
        nt:= nops(t[3]);
        S:= select(i -> t[3][i] <> 2, [$1..nt]);
        if S = [] then m:= nt else m:= min(S) fi;
        qs:= [seq(nextprime(t[3][i]),i=1..m)];
        t3s:= [seq(subsop(i = qs[i], t[3]), i = 1..m)];
        t1s:= [seq(t[1]*(qs[i]/t[3][i])^t[2][i], i=1..m)];
        [seq([t1s[i],t[2],t3s[i]],i=1..m)]
    end proc:
    f:= proc(d) local pq,s,t,i; uses priqueue;
      initialize(pq);
      for t in g(2*d,1) do insert([-mul(2^(t[i]-1),i=1..nops(t)),t -~ 1, [2$nops(t)]],pq) od;
      do
         t:= extract(pq);
         if nops(convert(t[3],set)) = nops(t[3]) and isprime(-t[1]-1) then return -t[1]-1 fi;
      for s in children(t) do insert(s,pq) od
      od:
    end proc:
    map(f, [$1..40]); # Robert Israel, Jan 12 2025

Formula

A000005(a(n) + 1) = 2n.

A343020 a(n) is the smallest prime p such that tau(p+1) = 2^n.

Original entry on oeis.org

2, 5, 23, 167, 839, 7559, 128519, 1081079, 20540519, 397837439, 8031343319, 188972783999, 3212537327999, 125568306863999, 2888071057871999, 190487121512687999, 4381203794791823999, 215961289494494543999, 13283916764437951631999, 540119185025730854543999, 26465840066260811872655999, 1356699703068812438127791999
Offset: 1

Views

Author

Jaroslav Krizek, Apr 02 2021

Keywords

Comments

tau(m) = the number of divisors of m (A000005).
Sequences of primes p such that tau(p+1) = 2^n for 2 <= n <= 5:
n = 2: 5, 7, 13, 37, 61, 73, 157, 193, 277, 313, 397, 421, ...
n = 3: 23, 29, 41, 53, 101, 103, 109, 113, 127, 137, 151, ...
n = 4: 167, 263, 269, 311, 383, 389, 439, 461, 509, 569, ...
n = 5: 839, 1319, 1511, 1559, 1847, 1889, 2039, 2309, 2687, ...
Conjecture: a(n) is also the smallest number m such that tau(m+1) = tau(m)^n.

Examples

			a(4) = 167 because 167 is the smallest prime p such that tau(p+1) = 16 = 2^4.
		

Crossrefs

Programs

  • Magma
    Ax:=func; [Ax(n): n in [1..7]]
    
  • Mathematica
    Do[p = 1; While[DivisorSigma[0, Prime[p] + 1] != 2^n, p++]; Print[n, " ", Prime[p]], {n, 1, 9}] (* Vaclav Kotesovec, Apr 03 2021 *)
  • PARI
    a(n) = my(t=2^n); forprime(p=2, oo, if(numdiv(p+1)==t, return(p))); \\ Jinyuan Wang, Apr 02 2021
    
  • Python
    from sympy import isprime,nextprime
    primes=[2]
    def solve(v,k,i,j):
        global record,stack,primes
        if k==0:
            if isprime(v-1):
                record=v
            return True
        sizeok=False
        cnt=True
        while cnt:
            if i>=len(primes):
                primes.append(nextprime(primes[-1]))
            if jBert Dobbelaere, Apr 11 2021

Extensions

a(11) from Jinyuan Wang, Apr 02 2021
More terms from David A. Corneth, Apr 09 2021

A343018 a(n) is the smallest number m such that tau(m+1) = tau(m) + n.

Original entry on oeis.org

2, 1, 5, 49, 11, 35, 23, 399, 47, 1849, 59, 143, 119, 1599, 167, 575, 179, 1295, 239, 4355, 629, 2303, 359, 899, 959, 9215, 1007, 39999, 719, 20735, 839, 5183, 1799, 46655, 1259, 36863, 1679, 7055, 3023, 986049, 2879, 3599, 6479, 82943, 2519, 193599, 3359, 207935
Offset: 0

Views

Author

Jaroslav Krizek, Apr 02 2021

Keywords

Comments

tau(m) = the number of divisors of m (A000005).
Sequences of numbers m such that tau(m+1) = tau(m) + n for 0 <= n <= 5:
n = 0: 2, 14, 21, 26, 33, 34, 38, 44, 57, 75, 85, 86, 93, ... (A005237).
n = 1: 1, 3, 9, 15, 25, 63, 121, 195, 255, 361, 483, 729, ... (A055927).
n = 2: 5, 7, 13, 27, 37, 51, 61, 62, 73, 74, 91, 115, 123, ... (A230115).
n = 3: 49, 99, 1023, 1681, 1935, 2499, 8649, 9603, 20449, ... (A230653).
n = 4: 11, 17, 19, 31, 39, 43, 55, 65, 67, 69, 77, 87, 97, ... (A230654).
n = 5: 35, 169, 289, 529, 961, 1369, 2809, 3135, 4489, ... (A228453).

Examples

			For n = 3; a(3) = 49 because 49 is the smallest number such that tau(50) = 6 = tau(49) + 3 = 3 + 3.
		

Crossrefs

Programs

  • Magma
    Ax:=func; [Ax(n): n in [0..50]];
    
  • Maple
    N:= 60: # for a(0)..a(N)
    V:= Array(0..N): count:=0: t:= numtheory:-tau(1):
    for m from 1 while count < N+1 do
      s:= numtheory:-tau(m+1); v:= s - t;
      if v >= 0 and v <= N and V[v] = 0 then count:= count+1; V[v]:= m; fi;
      t:= s;
    od:
    convert(V, list); # Robert Israel, Jan 03 2025
  • Mathematica
    d = Differences @ Table[DivisorSigma[0, n], {n, 1, 10^6}]; a[n_] := If[(p = Position[d, n]) != {}, p[[1, 1]], 0]; s = {}; n = 0; While[(a1 = a[n]) > 0, AppendTo[s, a1]; n++]; s (* Amiram Eldar, Apr 03 2021 *)
  • PARI
    a(n) = my(m=1); while (numdiv(m+1) != numdiv(m) + n, m++); m; \\ Michel Marcus, Apr 03 2021
    
  • Python
    from itertools import count, pairwise
    from sympy import divisor_count
    def A343018(n): return next(m+1 for m, t in enumerate(pairwise(map(divisor_count,count(1)))) if t[1] == t[0]+n) # Chai Wah Wu, Jul 25 2022

Formula

a(n) = A086550(n) - 1.

A343019 a(n) is the smallest number m such that tau(m+1) = tau(m) - n.

Original entry on oeis.org

2, 4, 6, 16, 12, 24, 30, 36, 84, 324, 60, 144, 192, 120, 210, 288, 180, 528, 240, 576, 480, 360, 420, 900, 1344, 960, 720, 5184, 1008, 840, 1320, 2400, 1260, 17424, 1800, 14640, 2640, 1680, 2160, 8280, 4800, 3600, 11220, 7056, 3780, 6240, 2520, 82944, 6480
Offset: 0

Views

Author

Jaroslav Krizek, Apr 02 2021

Keywords

Comments

tau(m) = the number of divisors of m (A000005).
A greedy inverse of A051950.
Sequences of numbers m such that tau(m+1) = tau(m) - n for 0 <= n <= 5:
n = 0: 2, 14, 21, 26, 33, 34, 38, 44, 57, 75, 85, 86, 93, ... (A005237).
n = 1: 4, 8, 81, 441, 625, 1089, 2024, 2401, 3025, 3968, ... (A068208).
n = 2: 6, 10, 20, 22, 32, 45, 46, 50, 58, 68, 76, 82, 92, ... (A227874).
n = 3: 16, 64, 224, 675, 1444, 2115, 3843, 5475, 6724, 9801, ...
n = 4: 12, 18, 28, 52, 54, 56, 105, 110, 114, 128, 148, 154, ...
n = 5: 24, 80, 225, 484, 1024, 1088, 1156, 1225, 1521, 2116, ...

Examples

			For n = 3; a(3) = 16 because 16 is the smallest number such that tau(17) = 2 = tau(16) - 3 = 5 - 3.
		

Crossrefs

Programs

  • Magma
    Ax:=func; [Ax(n): n in [0..50]]
    
  • Maple
    N:= 50: # for a(0)..a(N)
    V:= Array(0..N): count:=0: t:= numtheory:-tau(1):
    for m from 1 while count < N+1 do
      s:= numtheory:-tau(m+1); v:= t - s;
      if v >= 0 and v <= N and V[v] = 0 then
        count:= count+1; V[v]:= m;
      fi;
      t:= s;
    od:
    convert(V,list); # Robert Israel, Jul 03 2024
  • Mathematica
    d = Differences @ Table[DivisorSigma[0, n], {n, 1, 10^5}]; a[n_] := If[(p = Position[d, -n]) != {}, p[[1, 1]], 0]; s = {}; n = 0; While[(a1 = a[n]) > 0, AppendTo[s, a1]; n++]; s (* Amiram Eldar, Apr 03 2021 *)
  • PARI
    a(n) = my(m=1); while (numdiv(m+1) != numdiv(m) - n, m++); m; \\ Michel Marcus, Apr 03 2021
    
  • Python
    from itertools import count, pairwise
    from sympy import divisor_count
    def A343019(n): return next(m+1 for m, t in enumerate(pairwise(map(divisor_count,count(1)))) if t[1] == t[0]-n) # Chai Wah Wu, Jul 25 2022

A340715 Least positive number k such that sigma(k+1) = n * sigma(k).

Original entry on oeis.org

14, 5, 1, 37033919, 14182439039
Offset: 1

Views

Author

Seiichi Manyama, Jan 17 2021

Keywords

Examples

			  n | sigma(a(n)) | sigma(a(n)+1)
----+-------------+--------------
  1 |          24 |            24
  2 |           6 |            12
  3 |           1 |             3
  4 |    39940992 |     159763968
  5 | 14182439040 |   70912195200
		

Crossrefs

Programs

  • Mathematica
    k = 1;n = 1;Print[While[DivisorSigma[1, k + 1] != n*DivisorSigma[1, k], k;k k+]; k] (* Robert P. P. McKone, Jan 17 2021 *)
  • PARI
    {a(n) = my(k=1); while(sigma(k+1)!=n*sigma(k), k++); k}
Showing 1-6 of 6 results.