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-10 of 15 results. Next

A082880 Largest value of A075860(j) when j runs through composite numbers between n-th and (n+1)-th primes. That is, the largest fixed-point[=prime] reached by iteration of A008472(=sum of prime factors) initiated with composite values between two consecutive primes.

Original entry on oeis.org

0, 2, 5, 7, 5, 3, 5, 13, 5, 7, 19, 7, 5, 13, 7, 31, 7, 7, 19, 5, 7, 43, 13, 19, 7, 13, 2, 5, 7, 61, 7, 19, 3, 73, 7, 7, 7, 43, 13, 19, 7, 13, 5, 7, 2, 103, 109, 3, 5, 31, 61, 7, 13, 19, 13, 31, 7, 139, 19, 2, 73, 151, 7, 5, 3, 43, 13, 31, 19, 13, 181, 19, 13, 7, 193, 23, 199, 29, 103, 73
Offset: 1

Views

Author

Labos Elemer, Apr 16 2003

Keywords

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; sopf[x_] := Apply[Plus, ba[x]]; Table[Max[0, Table[FixedPoint[sopf, w], {w, 1+Prime[n], Prime[n+1]-1}]], {n, 80}]

Formula

a(n) = Max_{x=1+prime(n)..prime(n+1)-1} A075860(x).

A082881 Least value of A075860(j) when j runs through composite numbers between n-th and (n+1)-th primes. That is, the smallest fixed-point[=prime] reached by iteration of function A008472(=sum of prime factors) initiated with composite values between two consecutive primes.

Original entry on oeis.org

0, 2, 5, 2, 5, 2, 5, 7, 2, 7, 2, 2, 5, 2, 2, 2, 7, 2, 2, 5, 2, 3, 2, 5, 3, 13, 2, 5, 3, 2, 2, 2, 3, 2, 7, 5, 3, 13, 2, 3, 7, 2, 5, 3, 2, 2, 2, 2, 5, 7, 2, 7, 2, 2, 2, 2, 7, 2, 3, 2, 2, 2, 2, 5, 2, 2, 5, 2, 19, 2, 2, 2, 5, 2, 2, 3, 2, 3, 2, 2, 17, 2, 5, 5, 2, 2, 2, 7, 23, 2, 2, 3, 3, 3, 5, 2, 2, 19, 2, 5, 2, 3, 2
Offset: 1

Views

Author

Labos Elemer, Apr 16 2003

Keywords

Examples

			Between p(23)=83 and p(24)=89, the relevant fixed points are {5,13,2,2,13}, of which the smallest is 2=a(24).
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; sopf[x_] := Apply[Plus, ba[x]]; Table[Min[Table[FixedPoint[sopf, w], {w, 1+Prime[n], Prime[n+1]-1}]], {n, 2, 103}]

Formula

a(n) = Min_{x=1+prime(n)..prime(n+1)-1} A075860(x).

A082882 Number of distinct values of A075860(j) when j runs through composite numbers between n-th and (n+1)-th primes. That is, the counts of different fixed-points[=prime] reached by iteration of function A008472(=sum of prime factors) initiated with composite values between two consecutive primes.

Original entry on oeis.org

0, 1, 1, 3, 1, 2, 1, 2, 3, 1, 4, 2, 1, 3, 3, 5, 1, 4, 3, 1, 3, 3, 3, 3, 2, 1, 1, 1, 3, 8, 3, 2, 1, 6, 1, 2, 3, 3, 3, 5, 1, 5, 1, 2, 1, 7, 4, 2, 1, 2, 4, 1, 5, 3, 4, 4, 1, 5, 3, 1, 6, 6, 2, 1, 2, 7, 3, 4, 1, 3, 4, 6, 3, 3, 3, 4, 6, 3, 5, 5, 1, 6, 1, 3, 3, 4, 5, 1, 1, 2, 6, 4, 3, 4, 3, 2, 6, 1, 8, 3, 6, 4, 5, 1, 4
Offset: 1

Views

Author

Labos Elemer, Apr 16 2003

Keywords

Comments

This count is smaller than A001223[n]-1 and albeit not frequently but it can be one even if primes of borders are not twin primes. Such primes are collected into A082883.

Examples

			Between p(23)=83 and p(24)=89, the relevant fixed points are
{5,13,2,2,13}, i.e., four are distinct from the 5 values, a(24)=4;
between p(2033)=17707 and p(2034)=170713, the fixed-point set is {5,5,5,5,5}, so a(2033)=1, so a(88)=1.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] sopf[x_] := Apply[Plus, ba[x]] Table[Length[Union[Table[FixedPoint[sopf, w], {w, 1+Prime[n], Prime[n+1]-1}]]], {n, 1, 1000}]

Formula

a(n) = Card(Union(A075860(x)); x=1+p(n), ..., -1+p(n+1)).

A082883 Primes p(x) satisfying the following conditions: [1]# A082882(x)=1; [2]# {p(x),p(x+1)} are not twin primes; [3]# values of A075860(j) for j composites between these two non-twin primes are identical. See also A075860, A082880-A082882.

Original entry on oeis.org

103, 457, 1009, 1663, 2953, 3079, 6043, 12007, 17707, 20749, 21499, 25579, 28537, 30703, 41227, 54367, 55663, 59443, 66973, 70309, 81547, 83557, 90019, 97003, 101359, 102559, 105367, 108499, 116239, 120847, 126019, 129733, 133873, 138403
Offset: 1

Views

Author

Labos Elemer, Apr 16 2003

Keywords

Examples

			p[2033]=17007 is here because next prime is 17013;
for the five j inter-prime composites
i.e. if j is from {17008,..,17012} the values
of A075860 are identical: {7,7,7,7,7}, so A082882(2033)=1;
Smallest such example is a(1)=103 with this sophisticated
property:for i={104,105,106} the fixed points of A008472(i)
i.e. values of A075860(i) are uniformly equal to 2.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] sopf[x_] := Apply[Plus, ba[x]] Do[s=Length[Union[tik=Table[FixedPoint[sopf, j], {j, 1+Prime[n], -1+Prime[n+1]}]]]; If[Equal[s, 1]&&!PrimeQ[2+Prime[n]], Print[Prime[n]]], {n, 1, 100000}]

A376070 a(n) is the number of distinct terms reached by iterating the function x->2+A075860(x), starting from x=n, with n>0.

Original entry on oeis.org

3, 2, 4, 1, 3, 4, 3, 2, 3, 4, 4, 4, 3, 4, 2, 2, 6, 4, 5, 4, 4, 3, 5, 4, 4, 2, 4, 4, 6, 4, 5, 2, 4, 5, 4, 4, 3, 4, 2, 4, 4, 4, 3, 3, 2, 4, 5, 4, 4, 4, 4, 2, 3, 4, 2, 4, 3, 5, 6, 4, 5, 4, 4, 2, 4, 2, 3, 5, 2, 4, 4, 4, 3, 2, 2, 4, 4, 4, 5, 4, 4, 3, 4, 4, 3, 2, 2, 3, 5, 4, 4, 4, 5, 4, 4, 4, 5, 4, 4, 4, 4
Offset: 1

Views

Author

Rafik Khalfi, Sep 08 2024

Keywords

Comments

The sequence has another definition: a(n)= The number of distinct elements in the set A(n)={f^{k}(n);k>=0}, where f^{k} is the k-th iteration of the function f defined by f(n)=2+A075860(n), f^{0}(n)=n and n>0.
For all n>0, the set A(n) contains either the fixed point 4 or a cyclic component {5,7,9}.
For all n>1 and h in A(n)\{n}, h-2 is a prime number.
a(n)=1 if and only if n=4.
If (p,p+2) is a twin prime pair with p>7, then a(p+2)=a(p)-1.

Examples

			For n=3, 3->5->7->9->5->7->9-> ... and {5,7,9} is a cyclic component, then a(n)=number of distinct terms = 4.
For n=66, 66->4->4->4-> ... and 4 is a fixed point, then a(n)= number of distinct terms = 2.
For n=25, 25->7->9->5->7->9->5->7->9->... and {5,7,9} is a cyclic component, then a(n)=number of distinct terms = 4.
		

Crossrefs

Cf. A075860.

Programs

  • Maple
    f := proc(n) option remember:
        if isprime(n) then
            n
        else
            procname(convert(numtheory:-factorset(n), `+`))
        end if
    end proc:
    f(1) := 0:
    g := proc(n)
        2 + f(n)
    end proc:
    A376070 := proc(n)
        local k, result:
        k := 1:
        result := n:
        while not (result = 4 or result = 5 or result = 7 or result = 9) do
            result := g(result):
            k := k + 1:
        end do:
        if result = 5 or result = 7 or result = 9 then
            return k + 2;
        else
            return k:
        end if
    end proc:
    map(A376070, [$1..200]);
  • Python
    from sympy import  primefactors
    def a(n, pn):
        if n == pn:
            return n
        else:
            return a(sum(primefactors(n)), n)
    def A376070(n):
        k = 1
        result = n
        while result not in {4, 5, 7, 9}:
            result = 2 + a(result, None)
            k += 1
        if result in {5, 7, 9}:
            return k + 2
        else:
            return k
    print([A376070(i) for i in range(1, 200)])

A369558 a(n) is the minimum value of k > 0 such that A075860(n) = A075860(n+k) with n > 1.

Original entry on oeis.org

2, 6, 4, 1, 6, 3, 7, 5, 10, 110, 6, 9, 13, 1, 10, 193, 6, 15, 1, 9, 22, 250, 1, 10, 6, 1, 5, 370, 8, 27, 7, 23, 34, 1, 6, 398, 2, 6, 9, 610, 4, 39, 13, 7, 2, 730, 6, 1, 1, 9, 3, 850, 11, 9, 6, 28, 58, 1586, 3, 57, 8, 13, 2, 7, 3, 818, 25, 5, 11, 1210, 5, 69, 1, 11
Offset: 2

Views

Author

Rafik Khalfi, Jan 25 2024

Keywords

Examples

			For n=5, A075860(5) = A075860(5+1), so a(5)=1.
For n=15, A075860(15) = A075860(15+1), so a(15)=1.
		

Crossrefs

Cf. A075860.

Programs

  • Maple
    f := proc(n) option remember;
        if isprime(n) then
            n;
        else
            procname(convert(numtheory:-factorset(n), `+`));
        fi;
    end proc:
    g := proc(n)
        local k;
        for k from 1 do
            if f(n+k) = f(n) then
                return k;
            fi;
        end do;
    end proc:
    map(g, [$2..100]);
  • PARI
    fp(n, pn) = if (n == pn, n, fp(vecsum(factor(n)[, 1]), n));
    f(n) = if (n==1, 0, fp(n, 0));
    a(n) = my(k=1, fn=f(n)); while(f(n+k) != fn, k++); k; \\ Michel Marcus, Feb 20 2024

A371058 Numbers k divisible by A075860(k).

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 21, 23, 25, 26, 27, 29, 31, 32, 33, 35, 37, 41, 43, 47, 49, 52, 53, 59, 61, 63, 64, 65, 66, 67, 71, 73, 74, 79, 81, 83, 86, 89, 91, 95, 97, 99, 101, 103, 104, 106, 107, 109, 110, 113, 121, 125, 127, 128, 131, 132, 134, 137, 138, 139
Offset: 1

Views

Author

Rafik Khalfi, Mar 09 2024

Keywords

Crossrefs

Cf. A075860.

Programs

  • Maple
    f := proc (n) option remember; if isprime(n) then n else procname(convert(numtheory:-factorset(n), `+`)) end if end proc:
    g := proc (n) if `mod`(n, f(n)) = 0 then n end if end proc:
    map(g, [$2 .. 100]);
  • Mathematica
    a[n_] := If[n == 1, 0, FixedPoint[Total[FactorInteger[#][[All, 1]]]&, n]];r=140;Select[Range[2,r], Divisible[#,Part[Array[a,r],#]]&] (* James C. McMahon, Mar 10 2024 *)

A374104 a(n) = A075860(A075860(n) + 2) + 2.

Original entry on oeis.org

4, 4, 7, 4, 9, 9, 5, 4, 7, 5, 15, 9, 4, 7, 4, 4, 21, 9, 9, 5, 5, 4, 7, 9, 9, 4, 7, 7, 33, 5, 5, 4, 7, 9, 9, 9, 4, 5, 4, 5, 45, 9, 4, 4, 4, 9, 9, 9, 5, 5, 5, 4, 4, 9, 4, 7, 4, 5, 63, 5, 9, 7, 5, 4, 9, 4, 4, 9, 4, 7, 75, 9, 4, 4, 4, 5, 9, 9, 5, 5, 7, 4, 15, 9, 4, 4, 4, 4, 9, 5, 5, 9
Offset: 1

Views

Author

Rafik Khalfi, Jun 28 2024

Keywords

Comments

(p,p+2) is a twin prime pair if and only if a(p)=p+4.
For all positive integers n, there exists a positive integer m such that a(n)

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember;
        if isprime(n) then n
       else procname(convert(numtheory:-factorset(n), `+`))
        fi
     end proc:
     g(1):= 0:
    seq(2+g(2+g(i)),i=1..140);
  • PARI
    fp(n, pn) = if (n == pn, n, fp(vecsum(factor(n)[, 1]), n));
    f(n) = if (n==1, 0, fp(n, 0)); \\ A075860
    a(n) = f(f(n)+2)+2; \\ Michel Marcus, Jun 28 2024

A374330 a(n) is the number of numbers k <= prime(n)^2 such that A075860(k) = prime(n).

Original entry on oeis.org

2, 2, 6, 8, 2, 10, 3, 14, 6, 8, 22, 7, 8, 21, 9, 14, 12, 45, 14, 17, 45, 17, 21, 20, 18, 17, 64, 21, 54, 28, 25, 22, 22, 72, 37, 82, 26, 28, 31, 43, 36, 93, 44, 95, 38, 95, 41, 38, 33, 106, 36, 49, 111, 65, 53, 53, 49, 113, 55, 68, 138, 80, 49, 50, 152, 61, 55, 43, 73, 120
Offset: 1

Author

Rafik Khalfi, Jul 04 2024

Keywords

Comments

For all n>=1, a(n)>=2.

Examples

			For n=3, prime(3)=5. The only integers k <= 5^2 such that A075860(k)=5 are 5,6,12,18,24 and 25. Therefore a(3)=6.
		

Crossrefs

Programs

  • Maple
    f := proc (n)
        option remember;
        if isprime(n) then
            return n
        else
            return procname(convert(numtheory:-factorset(n), `+`))
        end if
    end proc:
    g := proc (n)
        local count, k;
        count := 0;
        for k from ithprime(n) to ithprime(n)^2 do
            if f(k) = ithprime(n) then
                count := count + 1
            end if
        end do;
        return count
    end proc:
    map(g, [$1 .. 80]);
  • PARI
    fp(n, pn) = if (n == pn, n, fp(vecsum(factor(n)[, 1]), n));
    f(n) = if (n==1, 0, fp(n, 0)); \\ A075860
    a(n) = sum(k=1, prime(n)^2, f(k) == prime(n)); \\ Michel Marcus, Jul 04 2024

A375535 a(n) = n - A075860(n).

Original entry on oeis.org

1, 0, 0, 2, 0, 1, 0, 6, 6, 3, 0, 7, 0, 11, 13, 14, 0, 13, 0, 13, 14, 9, 0, 19, 20, 24, 24, 25, 0, 23, 0, 30, 30, 15, 30, 31, 0, 31, 37, 33, 0, 37, 0, 31, 43, 41, 0, 43, 42, 43, 44, 50, 0, 49, 53, 53, 44, 27, 0, 53, 0, 59, 56, 62, 60, 64, 0, 49, 67, 67, 0, 67, 0, 72, 73, 69, 72, 73
Offset: 1

Author

Rafik Khalfi, Aug 18 2024

Keywords

Comments

If p is a prime number, then a(p)=0.

Examples

			For n=15, a(15) = 15-2 = 13.
		

Crossrefs

Cf. A075860.

Programs

  • Maple
    f := proc(n)
        option remember:
        if isprime(n) then
            n
        else
            procname(convert(numtheory:-factorset(n), `+`))
        end if
    end proc:
    f(1) := 0:
    seq(n - f(n), n = 1..100);
  • Python
    from sympy import primefactors
    def a(n, pn):
        if n == pn:
            return n
        else:
            return a(sum(primefactors(n)), n)
    print([i-a(i, None) for i in range(1, 100)])
Showing 1-10 of 15 results. Next