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

A373285 Numbers k that are composite and not a powers of a prime k such that sopf^{h+1}(k) divides sopf^{h}(k), with sopf^{0}(k)=k, for h=0..A321944(k)-1, where sopf^{h} is the h-th iteration of sopf and sopf = A008472.

Original entry on oeis.org

528, 1056, 1275, 1584, 2112, 2275, 2565, 3168, 3213, 3825, 3850, 3861, 4224, 4590, 4752, 5152, 5808, 6336, 6375, 6688, 7072, 7695, 7700, 8448, 9065, 9180, 9504, 9639, 10304, 10878, 11328, 11375, 11475, 11583, 11616, 12672, 12825, 13376, 13770, 14144, 14256, 15400, 15925, 16709, 16896
Offset: 1

Views

Author

Rafik Khalfi, May 30 2024

Keywords

Examples

			For k = 11475 = 3^3 * 5^2 * 17, sopf(k)=25 divides k and sopf(sopf(k))=5 divides sopf(k).
		

Crossrefs

Cf. A008472 (sopf), A321944.

Programs

  • Maple
    f := proc (n)
        add(d, d = numtheory[factorset](n))
    end proc:
    h := proc (n)
        option remember;
        if isprime(n) then
            1
        else
            1+h(convert(numtheory[factorset](n), `+`))    end if:
    end proc:
    checkDivisibility := proc (n)
        local k, fk, fk1, result:
        result := true:
        fk := n;
        for k from 0 to h(n)-1 do
            fk1 := f(fk);
            if fk1 = 0 or `mod`(fk, fk1) <> 0 then
                result := false:
                break:
            end if:
            fk := fk1:
        end do:
        return result:
    end proc:
    g := proc (n)
        nops(numtheory[factorset](n)):
    end proc:
    findNumbers := proc (upper_limit)
        local n, results:
        results := []:
        for n from 2 to upper_limit do
            if checkDivisibility(n) and 2 <= g(n) then
                results := [op(results), n]:
            end if:
        end do:
        return results:
    end proc:
    upper_limit := 10000:
    numbers := findNumbers(upper_limit);
  • Mathematica
    s[n_] := DivisorSum[n, # &, PrimeQ[#] &]; q[n_] := !PrimePowerQ[n] && AllTrue[Ratios@ Reverse@ FixedPointList[s, n], IntegerQ]; Select[Range[2, 17000], q] (* Amiram Eldar, May 30 2024 *)

A361685 Number of iterations of sopf until reaching a prime.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 2, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 1, 3, 1, 2, 0, 2, 0, 1, 3, 1, 2, 1, 0, 3, 2, 1, 0, 2, 0, 1, 2, 2, 0, 1, 1, 1, 2, 3, 0, 1, 2, 2, 2, 1, 0, 2, 0, 4, 2, 1, 2, 2, 0, 1, 4, 3, 0, 1, 0, 3, 2, 3, 2, 2, 0, 1, 1, 1, 0, 2, 2, 3, 2, 1, 0, 2, 2, 2, 2, 2, 2, 1, 0, 2, 3, 1, 0
Offset: 2

Views

Author

J. W. Montgomery, Mar 29 2023

Keywords

Examples

			a(15) = 2 because 15 is not prime, sopf(15) = 8 is not prime, and sopf^2(15) = sopf(8) = 2 is prime.
a(16) = 1 because 16 is not prime and sopf(16) = 2 is prime.
a(17) = 0 because 17 is prime.
		

Crossrefs

Cf. A008472 (sopf), A321944.

Programs

  • MATLAB
    for n=2:101
        s = n;
        c = 0;
        while ~isprime(s)
            s = sum(unique(factor(s)));
            c = c + 1;
        end
        a(n) = c;
    end
    
  • PARI
    A008472(n) = vecsum(factor(n)[, 1]);
    A361685(n) = for(k=0,oo,if(isprime(n),return(k)); n = A008472(n)); \\ Antti Karttunen, Jan 28 2025

Formula

For n >= 2, a(n) = min{m : sopf^m(n) is prime} where sopf^m indicates m iterations of sopf, the sum of the prime factors function.
a(n) = A321944(n) - 1. - Rémy Sigrist, Mar 29 2023
Showing 1-2 of 2 results.