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.

A253288 Each term a(n) satisfies four properties: 1, divisible by all prime factors of n; 2, divisible by only the prime factors of n; 3, not equal to any of the terms a(1), a(2), ... a(n-1); 4, smallest number satisfying 1-3 if A005361(n) is even, or second smallest number satisfying 1-3 if A005361(n) is odd.

Original entry on oeis.org

1, 4, 9, 2, 25, 12, 49, 16, 3, 20, 121, 6, 169, 28, 45, 8, 289, 18, 361, 10, 63, 44, 529, 36, 5, 52, 81, 14, 841, 60, 961, 64, 99, 68, 175, 24, 1369, 76, 117, 50, 1681, 84, 1849, 22, 15, 92, 2209, 48, 7, 40, 153, 26, 2809, 72, 275, 98, 171, 116, 3481, 30, 3721, 124, 21, 32
Offset: 1

Views

Author

N. J. A. Sloane, Dec 29 2014

Keywords

Comments

This sequence is permutation of the positive integers.
The prime p occurs at n = p^2.
Multiples of a number x have density 1/x.
Conjecture: this permutation of positive integers is self-inverse. Compare with A358971. The principal distinction between this sequence and A358971 is that fixed points aside from A358971(1) = 1 are explicitly ruled out in the latter. - Michael De Vlieger, Dec 10 2022

References

  • Brad Klee, Posting to Sequence Fans Mailing List, Dec 21, 2014.

Crossrefs

Cf. A005361 (Product of exponents of prime factorization of n), A358971.

Programs

  • Maple
    A253288div := proc(a,n)
        local npr,d,apr ;
        npr := numtheory[factorset](n) ;
        for d in npr do
            if modp(a,d) <> 0 then
                return false;
            end if;
        end do:
        apr := numtheory[factorset](a) ;
        if apr minus npr = {} then
            true;
        else
            false;
        end if;
    end proc:
    A253288 := proc(n)
        option remember;
        local a,i,prev,act,ev ;
        if n =1 then
            1;
        else
            act := 1 ;
            if type(A005361(n),'even') then
                ev := true;
            else
                ev := false;
            end if;
            for a from 1 do
                prev := false;
                for i from 1 to n-1 do
                    if procname(i) = a then
                        prev := true;
                        break;
                    end if;
                end do:
                if not prev then
                    if A253288div(a,n) then
                        if ev or act > 1 then
                            return a;
                        else
                            act := act+1 ;
                        end if;
                    end if;
                end if;
            end do:
        end if;
    end proc:
    seq(A253288(n),n=1..80) ; # R. J. Mathar, Jan 22 2015
  • Mathematica
    nn = 1000; c[] = False; q[] = 1; f[n_] := f[n] = Map[Times @@ # &, Transpose@ FactorInteger[n]]; a[1] = 1; c[1] = True; u = 2; Do[Which[PrimeQ[n], k = n^2, PrimeQ@ Sqrt[n], k = Sqrt[n], SquareFreeQ[n], k = First@ f[n]; m = q[k]; While[Nand[! c[k m], k m != n, Divisible[k, First@ f[m]]], m++]; While[Nor[c[q[k] k], Divisible[k, First@ f[q[k]]]], q[k]++]; k *= m, True, t = 0; Set[{k, s}, {First[#], 1 + Boole@ OddQ@ Last[#]} &[f[n]]]; m = q[k]; Until[t == s, If[m > q[k], m++]; While[Nand[! c[k m], Divisible[k, First@f[m]]], m++]; t++]; If[s == 1, While[Nor[c[q[k] k], Divisible[k, First@ f[q[k]]]], q[k]++]]; k *= m]; Set[{a[n], c[k]}, {k, True}]; If[k == u, While[c[u], u++]], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Dec 10 2022 *)

Extensions

Terms beyond 361 from R. J. Mathar, Jan 22 2015

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

A358786 a(1) = 1. For n > 1, a(n) is least novel k != n such that rad(k) = rad(n) and either k | n or n | k, where rad is A007947.

Original entry on oeis.org

1, 4, 9, 2, 25, 12, 49, 16, 3, 20, 121, 6, 169, 28, 45, 8, 289, 36, 361, 10, 63, 44, 529, 48, 5, 52, 81, 14, 841, 60, 961, 64, 99, 68, 175, 18, 1369, 76, 117, 80, 1681, 84, 1849, 22, 15, 92, 2209, 24, 7, 100, 153, 26, 2809, 108, 275, 112, 171, 116, 3481, 30, 3721
Offset: 1

Views

Author

Michael De Vlieger, Dec 08 2022

Keywords

Comments

Variant of A358971 that additionally requires either k | n or n | k. This version eliminates nondivisor n and a(n) seen in a scatterplot of A358971. First differs from A358971 at n = 18.
Some consequences of definition:
There are no fixed points outside of a(1) = 1.
Prime power p^e implies a(p^e) = p^(e+1) for odd e, else p^(e-1). Hence a(p) = p^2 comprise maxima, while a(p^2) = p comprise minima.
Let lpf(m) = least prime factor of m. Squarefree m implies a(m) = lpf(m)*m and a(lpf(m)*m) = m, as seen in scatterplot in rays with slope p and 1/p, respectively. Therefore squarefree numbers are sequestered along or below a(n/2) = n/2.
Let K = rad(n); a(n) and n (such that a(n) != n) belong to the same sequence K*R_K, where R_K is 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) and n belong to 6*A003586, and if K = 10, then a(n) and n belong to 10*A003592.

Crossrefs

Programs

  • Mathematica
    nn = 61; c[] = False; q[] = 1; f[n_] := f[n] = Times @@ FactorInteger[n][[All, 1]]; a[1] = 1; c[1] = True; Do[Which[PrimePowerQ[n], k = If[OddQ[#2], #1^(#2 + 1), #1^(#2 - 1)] & @@ First@ FactorInteger[n], PrimeQ@ Sqrt[n], k = Sqrt[n], True, k = f[n]; m = q[k]; While[Nand[! c[k m], Or[Divisible[k m, n], Divisible[n, k m]], k m != n, Divisible[k, f[m]]], m++]; While[Nor[c[q[k] k], Divisible[k, f[q[k]]]], q[k]++]; k *= m]; Set[{a[n], c[k]}, {k, True}], {n, 2, nn}]; Array[a, nn]
Showing 1-3 of 3 results.