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

A171937 Forward van Eck transform of A000005.

Original entry on oeis.org

0, 1, 2, 5, 2, 2, 4, 2, 16, 4, 2, 6, 4, 1, 6, 65, 2, 2, 4, 8, 1, 4, 6, 6, 24, 1, 6, 4, 2, 10, 6, 12, 1, 1, 3, 64, 4, 1, 7, 2, 2, 12, 4, 1, 5, 5, 6, 32, 72, 2, 4, 11, 6, 2, 2, 10, 1, 4, 2, 12, 6, 3, 5, 665, 4, 4, 4, 7, 5, 8, 2, 12, 6, 3, 1, 16, 5, 10, 4, 32, 544, 3, 6, 6, 1, 1, 4, 14, 8, 6, 2, 6, 1, 1, 11
Offset: 1

Views

Author

N. J. A. Sloane, Oct 24 2010

Keywords

Comments

Least positive k such that d(n) = d(n+k), or 0 if no such k exists (d = A000005). - Altug Alkan, Jul 29 2016

Crossrefs

Programs

  • Mathematica
    {0}~Join~Array[Block[{k = 1}, While[DivisorSigma[0, #] != DivisorSigma[0, # + k], k++]; k] &, 94, 2] (* Michael De Vlieger, Aug 19 2021 *)
  • PARI
    a(n) = if (n==1, 0, my(m=1, nd=numdiv(n)); while(numdiv(n+m) != nd, m++); m); \\ Michel Marcus, Sep 14 2021

Formula

a(n) = A079427(n) - n. - Ridouane Oudra, Sep 14 2021

A112275 Smallest number greater than n having at least as many divisors as n.

Original entry on oeis.org

2, 3, 4, 6, 6, 8, 8, 10, 10, 12, 12, 18, 14, 15, 16, 18, 18, 20, 20, 24, 22, 24, 24, 30, 26, 27, 28, 30, 30, 36, 32, 36, 34, 35, 36, 48, 38, 39, 40, 42, 42, 48, 44, 45, 48, 48, 48, 60, 50, 52, 52, 54, 54, 56, 56, 60, 58, 60, 60, 72, 62, 63, 64, 66, 66, 70, 68, 70, 70, 72, 72, 84
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 01 2005

Keywords

Comments

A000005(n) <= A000005(a(n)) and A000005(k) < A000005(n) for n
A000005(2*k-1) <= A000005(2*k) for 1<=k<=22. - Corrected by Robert Israel, Jul 23 2019

Crossrefs

Cf. A138171 (odd n for which a(n) > n+1).

Programs

  • Maple
    N:= 1000: # for all terms before the first term > N
    taus:= map(numtheory:-tau,[$1..N]):
    for n from 1 to N do
    found:= false:
    for k from n+1 to N while not found do
       if taus[k]>=taus[n] then found:= true; A[n]:= k fi
    od;
    if not found then break fi
    od:
    seq(A[i],i=1..n-1); # Robert Israel, Jul 23 2019
  • Mathematica
    kmax[n_] := 2 n;
    a[n_] := Module[{tau = DivisorSigma[0, n], k},
         For[k = n + 1, k <= kmax[n], k++,
              If[DivisorSigma[0, k] >= tau, Return[k]]];
         Print["a(n) = k not found for n = ", n]];
    Array[a, 100] (* Jean-François Alcover, Dec 15 2021 *)

A112276 Smallest number greater than n having no more divisors than n; a(1) = 1.

Original entry on oeis.org

1, 3, 5, 5, 7, 7, 11, 9, 11, 11, 13, 13, 17, 15, 17, 17, 19, 19, 23, 21, 22, 23, 29, 25, 29, 27, 29, 29, 31, 31, 37, 33, 34, 35, 37, 37, 41, 39, 41, 41, 43, 43, 47, 45, 46, 47, 53, 49, 53, 51, 53, 53, 59, 55, 57, 57, 58, 59, 61, 61, 67, 65, 65, 65, 67, 67, 71, 69, 71, 71, 73, 73
Offset: 1

Author

Reinhard Zumkeller, Sep 01 2005

Keywords

Crossrefs

A065091 (the odd primes) is a subsequence.
See A112277 for numbers m such that a(m) is composite.

Programs

  • Mathematica
    a[1] = 1; a[n_] := Module[{m = n+1, d=DivisorSigma[0, n]}, While[DivisorSigma[0, m] > d, m++]; m]; Array[a, 100] (* Amiram Eldar, Feb 03 2020 *)

Formula

A000005(a(n)) <= A000005(n) and A000005(k) > A000005(n) for n < k < a(n).

A079428 Least coprime number m > n with same number of divisors as n, a(1) = 1.

Original entry on oeis.org

1, 3, 5, 9, 7, 35, 11, 15, 25, 21, 13, 175, 17, 15, 22, 81, 19, 175, 23, 63, 22, 27, 29, 385, 49, 27, 34, 45, 31, 1001, 37, 45, 34, 35, 38, 1225, 41, 39, 46, 189, 43, 715, 47, 45, 52, 51, 53, 4375, 121, 63, 55, 63, 59, 385, 57, 135, 58, 65, 61, 7007, 67, 65, 68, 729, 69
Offset: 1

Author

Reinhard Zumkeller, Jan 08 2003

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{d = DivisorSigma[0, n], m = n + 1}, While[! CoprimeQ[m, n] || DivisorSigma[0, m] != d, m++]; m]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Mar 26 2025 *)
  • PARI
    a(n) = if(n == 1, 1, my(d = numdiv(n), m = n + 1); while(gcd(m, n) > 1 || numdiv(m) != d, m++); m); \\ Amiram Eldar, Mar 26 2025

Formula

tau(a(n)) = tau(n), where tau = A000005.
a(A000040(k)) = A079427(A000040(k)) = A000040(k+1).

A347982 a(n) is the greatest k, 0 < k < n, such that tau(k) = tau(n), or -1 if no such k exists, where tau is A000005.

Original entry on oeis.org

-1, -1, 2, -1, 3, -1, 5, 6, 4, 8, 7, -1, 11, 10, 14, -1, 13, 12, 17, 18, 15, 21, 19, -1, 9, 22, 26, 20, 23, 24, 29, 28, 27, 33, 34, -1, 31, 35, 38, 30, 37, 40, 41, 32, 44, 39, 43, -1, 25, 45, 46, 50, 47, 42, 51, 54, 55, 57, 53, -1, 59, 58, 52, -1, 62, 56, 61, 63, 65, 66, 67
Offset: 1

Author

David James Sycamore, Sep 22 2021

Keywords

Comments

a(n) = -1 if and only if n is a term in A005179.

Examples

			a(1) = -1 because there is no positive number less than 1 having 1 divisor.
a(2) = -1 because 2 is the first prime.
a(3) = 2 because 2 is the greatest prime less than 3 and all primes have 2 divisors.
		

Crossrefs

Programs

  • Mathematica
    a[1] = -1; a[n_] := Module[{k = n - 1, d = DivisorSigma[0, n]}, While[k > 0 && DivisorSigma[0, k] != d, k--]; If[k == 0, -1, k]]; Array[a, 100] (* Amiram Eldar, Sep 23 2021 *)
  • PARI
    a(n) = my(nd=numdiv(n)); forstep(k=n-1, 1, -1, if (numdiv(k)==nd, return(k))); return(-1); \\ Michel Marcus, Sep 22 2021
Showing 1-5 of 5 results.