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

A128555 a(n) = the smallest positive multiple of d(n) that does not occur earlier in the sequence, where d(n) is the number of positive divisors of n.

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 10, 12, 9, 16, 14, 18, 20, 24, 28, 5, 22, 30, 26, 36, 32, 40, 34, 48, 15, 44, 52, 42, 38, 56, 46, 54, 60, 64, 68, 27, 50, 72, 76, 80, 58, 88, 62, 66, 78, 84, 70, 90, 21, 96, 92, 102, 74, 104, 100, 112, 108, 116, 82, 120, 86, 124, 114, 7, 128, 136, 94, 126
Offset: 1

Views

Author

Leroy Quet, Mar 10 2007

Keywords

Comments

This sequence is a permutation of the positive integers.
a(2^(p+1)) = p, where p is prime. - Michael De Vlieger, Dec 07 2022

Examples

			8 has 4 positive divisors. So a(8) is the smallest positive multiple of 4 that has yet to appear in the sequence. 4 and 8 occur among the first 7 terms of the sequence, but 12 does not. So a(8) = 12.
		

Crossrefs

Cf. A000005, A128556, A358820 (inverse).

Programs

  • Maple
    A128555 := proc(nmin) local a,n,d,k ; a := [1,2] ; while nops(a) < nmin do n := nops(a)+1 ; d := numtheory[tau](n) ; k := 1; while k*d in a do k := k+1 ; od; a := [op(a),k*d] ; od: RETURN(a) ; end: A128555(80) ; # R. J. Mathar, Oct 09 2007
  • Mathematica
    a = {1}; Do[AppendTo[a, Min[Complement[Range[Max[a] + 1]*DivisorSigma[0,n], a]]], {n, 2, 68}]; a (* Ivan Neretin, May 03 2015 *)
    nn = 120; c[] = False; q[] = 1; Do[d = DivisorSigma[0, n]; m = q[d]; While[c[m d], m++]; If[m == q[d], While[c[m d], m++]; q[d] = m]; Set[{a[n], c[m d]}, {m d, True}], {n, nn}]; Array[a, nn] (* Michael De Vlieger, Dec 07 2022 *)
  • Python
    from itertools import count, islice
    from sympy import divisor_count as d
    def agen():
        seen = set()
        for n in count(1):
            dn = d(n)
            m = dn
            while m in seen: m += dn
            yield m
            seen.add(m)
    print(list(islice(agen(), 68))) # Michael S. Branicky, Dec 08 2022

Extensions

More terms from R. J. Mathar, Oct 09 2007

A358916 a(1) = 1. Thereafter a(n) is the least novel k != n such that A007947(k)|n.

Original entry on oeis.org

1, 4, 9, 2, 25, 3, 49, 16, 27, 5, 121, 6, 169, 7, 45, 8, 289, 12, 361, 10, 63, 11, 529, 18, 125, 13, 81, 14, 841, 15, 961, 64, 99, 17, 175, 24, 1369, 19, 117, 20, 1681, 21, 1849, 22, 75, 23, 2209, 32, 343, 40, 153, 26, 2809, 36, 275, 28, 171, 29, 3481, 30, 3721
Offset: 1

Views

Author

David James Sycamore, Dec 05 2022

Keywords

Comments

In other words, a(1) = 1, then for n > 1, a(n) is the least number k, not occurring earlier, whose squarefree kernel (rad(k)) is a divisor of n.
A permutation of the positive integers. - Robert Israel, Dec 11 2022
From Michael De Vlieger, Dec 06 2022, corrected by Robert Israel, Dec 11 2022: (Start)
Some consequences of definition:
Prime n = p implies a(p) = p^2, comprising maxima.
n = 2p implies a(2p) = p, n = 4p implies a(4p) = 2p.
n = 2^e with e >= 1 implies a(2^e) = 2^(e+1) if e is odd, 2^(e-1) if e is even.
n = p^e with e >= 1 and p an odd prime implies a(n) = p^(e+1).
Composite squarefree 2n implies a(2n) = n, comprising minima.
gcd(n, n +/- 1) = 1 implies gcd(a(n), a(n +/- 1)) = 1.
Let K = rad(n); a(n) is an element of R_K, the list of K-regular numbers, 1 and those whose prime divisors are restricted to p | K. For example, if K = 6, then a(n) != n is in A003586, and if K = 10, then a(n) != n is in A003592. (End)

Examples

			a(5) = 25 because rad(25) = 5  and there is no smaller number not equal to 5 which has this property.
		

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    R:= map(NumberTheory:-Radical, [$1..N^2]):
    A[1]:= 1:
    Agenda:= [$2..N^2]:
    for n from 2 to N do
      if isprime(R[n]) then
        if R[n] = 2 and padic:-ordp(n,2)::even then A[n]:= n/2
        else A[n]:= R[n]*n
        fi;
        if A[n] <= N then Agenda:= subs(A[n]=NULL,Agenda) fi;
        next
      fi;
      found:= false;
      for j from 1 to nops(Agenda) do
        x:= Agenda[j];
        if x <> n  and n mod R[x] = 0 then
          A[n]:= x; Agenda:= subsop(j=NULL,Agenda); found:= true; break
        fi
      od;
      if not found then break fi;
    od:
    convert(A,list); # Robert Israel, Dec 11 2022
  • Mathematica
    nn = 120; c[] = False; f[n] := f[n] = Times @@ FactorInteger[n][[All, 1]]; a[1] = 1; c[1] = True; u = 2; Do[Which[PrimeQ[n], k = n^2, PrimePowerQ[n], Set[{p, k}, {f[n], 1}]; While[Nand[! c[p^k], p^k != n], k++]; k = p^k, True, k = u; While[Nand[! c[k], k != n, Divisible[n, f[k]]], k++]]; Set[{a[n], c[k]}, {k, True}]; If[k == u, While[c[u], u++]], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Dec 06 2022 *)

Formula

For n = p^k, where p is prime and k >= 1, a(n) = p^(k+1). In particular, a(p) = p^2 (records).

Extensions

More terms from Michael De Vlieger, Dec 07 2022

A359036 a(1) = 1. Thereafter a(n) is the least unused k distinct from n such that d(k) = d(n), where d is the divisor counting function, A000005.

Original entry on oeis.org

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

Views

Author

David James Sycamore, Dec 13 2022

Keywords

Comments

A self-inverse permutation of the natural numbers.

Examples

			a(16) = 81 because this is the smallest unused k != 16, having the same number (5) of divisors as 16.
		

Crossrefs

Programs

Formula

a(a(n)) = n.
a(prime(k)^(p-1)) = prime(k-1)^(p-1) for even k and prime p else prime(k+1)^(p-1). - Michael De Vlieger, Dec 20 2022

Extensions

More terms from Michael S. Branicky, Dec 13 2022
Showing 1-3 of 3 results.