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 12 results. Next

A082084 a(n)=A029908[n! ]=A029908[A000142[n]] Fixed points of iterated A001414 function if started at factorials as initial values.

Original entry on oeis.org

0, 2, 5, 5, 5, 19, 5, 7, 7, 11, 13, 13, 23, 13, 19, 101, 61, 5, 19, 5, 11, 5, 5, 7, 23, 7, 5, 7, 283, 293, 5, 5, 7, 367, 379, 389, 23, 7, 463, 5, 13, 11, 29, 5, 23, 7, 7, 19, 5, 5, 5, 5, 61, 7, 73, 47, 857, 7, 947, 5, 29, 7, 13, 5, 5, 19, 137, 7, 5, 7, 11, 23, 353, 53, 11, 1471, 1489
Offset: 1

Views

Author

Labos Elemer, Apr 08 2003

Keywords

Examples

			Fixed point seems to be always a prime:tested for 1<n<201
n=20!=2432902008176640000: a(20)=5 with fixed-point-list=
{2432902008176640000,154,20,9,6,5,5}
		

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]}] ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] slog[x_] := Apply[Plus, ba[x]*ep[x]] Table[FixedPoint[slog, w! ], {w, 1, 128}]

A084931 Consider trajectory of n under repeated applications of the function f(x) = 'Sum of the prime factors of x (with multiplicity)' (see A029908). Sequence gives composite numbers n that end at a prime m that divides n and m is greater than any m's seen already.

Original entry on oeis.org

15, 21, 182, 494, 1219, 2852, 3182, 9782, 19339, 19982, 22454, 72836, 76814, 102134, 156782, 192182, 423182, 750979, 758894, 1364534, 1465454, 1548782, 2376182, 3379982, 4066934, 4204982
Offset: 1

Views

Author

Sven Simon, Jun 12 2003

Keywords

Comments

With a prime triple (p,p+4,p+6), the number a(n) = 2*p*(p+6) is always in the sequence, f( f( 2*p*(p+6) )) = f( 2*(p+4) ) = p+6. Such prime triples can be found in sequence A022005.
As long as two successive triples (p1,p1 + 4,p1 + 6) and (p2,p2 + 4,p2 + 6) of A022005 have p2 < 1.2*p1, no other numbers occur in the sequence between a(n1) and a(n2), this holds at least for larger p1 > 500. Other types of prime sets occurring in the sequence: (p,p+4,3p-4) with F( F( (p+4)*(3p-4))) = F( 4p ) = p + 4 (p,p+6,p+8) with F( F( 4*p*(p+8) )) = F( 2*(p+6) ) = p + 8.
Large examples of (p,p+4,++6)-triples: (108748629354*4436*3251#*(4436*3251#+1)+210)*(4436*3251#-1)/35 + 7, + 11, + 13 (4135 digits, David Broadhurst) (18599651274*4436*3251#*(4436*3251#+1)+210)*(4436*3251#-1)/35 + 7, + 11, +13 (4134 digits, David Broadhurst) Record examples of prime triples can be found on Tony Forbes's web site. There are triples of type (p,p+4,p+6) too.

Examples

			a(10) = 19982: f(f(19982)) = f(f(2*97*103)) = f(2+97+103) = f(202) = f(2*101) = 2+101 = 103.
		

Crossrefs

Cf. A022005, A048133, A084932 (primes reached).

A075860 a(n) is the fixed point reached when the map x -> A008472(x) is iterated, starting from x = n, with the convention a(1)=0.

Original entry on oeis.org

0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 5, 13, 3, 2, 2, 17, 5, 19, 7, 7, 13, 23, 5, 5, 2, 3, 3, 29, 7, 31, 2, 3, 19, 5, 5, 37, 7, 2, 7, 41, 5, 43, 13, 2, 5, 47, 5, 7, 7, 7, 2, 53, 5, 2, 3, 13, 31, 59, 7, 61, 3, 7, 2, 5, 2, 67, 19, 2, 3, 71, 5, 73, 2, 2, 7, 5, 5, 79, 7, 3, 43, 83, 5, 13, 2, 2, 13, 89
Offset: 1

Views

Author

Joseph L. Pe, Oct 15 2002

Keywords

Comments

For n>1, the sequence reaches a fixed point, which is prime.
From Robert Israel, Mar 31 2020: (Start)
a(n) = n if n is prime.
a(n) = n/2 + 2 if n is in A108605.
a(n) = n/4 + 2 if n is in 4*A001359. (End)

Examples

			Starting with 60 = 2^2 * 3 * 5 as the first term, add the prime factors of 60 to get the second term = 2 + 3 + 5 = 10. Then add the prime factors of 10 = 2 * 5 to get the third term = 2 + 5 = 7, which is prime. (Successive terms of the sequence will be equal to 7.) Hence a(60) = 7.
		

Crossrefs

Cf. A008472 (sum of prime divisors of n), A029908.

Programs

  • Maple
    f:= proc(n) option remember;
      if isprime(n) then n
      else procname(convert(numtheory:-factorset(n), `+`))
      fi
    end proc:
    f(1):= 0:
    map(f, [$1..100]); # Robert Israel, Mar 31 2020
  • Mathematica
    f[n_] := Module[{a}, a = n; While[ !PrimeQ[a], a = Apply[Plus, Transpose[FactorInteger[a]][[1]]]]; a]; Table[f[i], {i, 2, 100}]
    (* Second program: *)
    a[n_] := If[n == 1, 0, FixedPoint[Total[FactorInteger[#][[All, 1]]]&, n]];
    Array[a, 100] (* Jean-François Alcover, Apr 01 2020 *)
  • PARI
    fp(n, pn) = if (n == pn, n, fp(vecsum(factor(n)[, 1]), n));
    a(n) = if (n==1, 0, fp(n, 0)); \\ Michel Marcus, Sep 02 2023
  • Python
    from sympy import primefactors
    def a(n, pn):
        if n == pn:
            return n
        else:
            return a(sum(primefactors(n)), n)
    print([a(i, None) for i in range(1, 100)]) # Gleb Ivanov, Nov 05 2021
    

Extensions

Better description from Labos Elemer, Apr 09 2003
Name clarified by Michel Marcus, Sep 02 2023

A002217 Starting with n, repeatedly calculate the sum of prime factors (with repetition) of the previous term, until reaching 0 or a fixed point: a(n) is the number of terms in the resulting sequence.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			20 -> 2+2+5 = 9 -> 3+3 = 6 -> 2+3 = 5, so a(20) = length of sequence {20,9,6,5} = 4.
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001414 (sum of prime factors of n), A029908 (fixed point that is reached).

Programs

  • Mathematica
    sopfr[n_] := Times @@@ FactorInteger[n] // Total;
    a[1] = 2; a[n_] := Length[ FixedPointList[sopfr, n]] - 1;
    Array[a, 105] (* Jean-François Alcover, Feb 09 2018 *)

Extensions

More terms and better description from Reinhard Zumkeller, Apr 08 2003
Incorrect comment removed by Harvey P. Dale, Aug 16 2011

A082081 a(n) = fixed point when the pseudo-log function A008475[ ] is iterated.

Original entry on oeis.org

0, 2, 3, 4, 5, 5, 7, 8, 9, 7, 11, 7, 13, 9, 8, 16, 17, 11, 19, 9, 7, 13, 23, 11, 25, 8, 27, 11, 29, 7, 31, 32, 9, 19, 7, 13, 37, 7, 16, 13, 41, 7, 43, 8, 9, 25, 47, 19, 49, 27, 9, 17, 53, 29, 16, 8, 13, 31, 59, 7, 61, 9, 16, 64, 11, 16, 67, 7, 8, 9, 71, 17, 73, 16, 11, 23, 11, 11, 79, 7, 81
Offset: 1

Views

Author

Labos Elemer, Apr 08 2003

Keywords

Comments

Fixed point is always a prime or a power of prime: fixed points are terms of A000961.

Examples

			n=10!=3628800:list to fixed point={3628800,369,50,27}.
		

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]}] ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] sex[x_] := Apply[Plus, ba[x]^ep[x]] Table[FixedPoint[sex, w], {w, 1, 128}]

A036430 Number of iterations needed to reach 1 under the map n -> Omega(n).

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			16 -> 4 -> 2 -> 1 and thus a(16) = 3.
		

Crossrefs

Programs

Formula

a(n) = a(bigomega(n)) + 1 for n > 1. - Vladeta Jovovic, Jul 10 2004
a(n) = O(log* n). - Charles R Greathouse IV, Apr 25 2012

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 21 2003
Formula corrected by Charles R Greathouse IV, Apr 25 2012

A029909 Starting with n (but omitting the primes), repeatedly sum prime factors (counted with multiplicity) until reaching a limit.

Original entry on oeis.org

0, 4, 5, 5, 5, 7, 7, 5, 5, 5, 5, 5, 7, 13, 5, 7, 5, 5, 11, 7, 7, 5, 19, 7, 7, 7, 5, 11, 7, 5, 11, 7, 11, 5, 7, 5, 17, 11, 5, 13, 13, 31, 7, 5, 13, 7, 5, 5, 7, 5, 5, 7, 5, 13, 23, 5, 5, 13, 7, 43, 5, 13, 11, 7, 17, 13, 5, 5, 19, 5, 5, 13, 5, 17, 5, 13, 19, 5, 5, 13, 5, 11, 5, 5, 11, 5
Offset: 1

Views

Author

Keywords

Comments

Is this sequence generating ALL prime numbers (greater than 3) ? Also how many times each prime (greater than 3)is generated in this sequence? - Alexander R. Povolotsky, Nov 05 2008
Records appear to correspond to A006512 (n>2). - Bill McEachen, Jun 10 2025

Examples

			20 -> 2+2+5 = 9 -> 3+3 = 6 -> 2+3 = 5.
		

Crossrefs

Cf. A029908.

A081758 Sum of prime factors (with repetition) of sum of prime factors (with repetition) of n.

Original entry on oeis.org

2, 3, 4, 5, 5, 7, 5, 5, 7, 11, 7, 13, 6, 6, 6, 17, 6, 19, 6, 7, 13, 23, 6, 7, 8, 6, 11, 29, 7, 31, 7, 9, 19, 7, 7, 37, 10, 8, 11, 41, 7, 43, 8, 11, 10, 47, 11, 9, 7, 9, 17, 53, 11, 8, 13, 13, 31, 59, 7, 61, 14, 13, 7, 8, 8, 67, 10, 15, 9, 71, 7, 73, 16, 13, 23, 8, 8, 79, 13, 7, 43, 83, 9, 13, 11
Offset: 2

Views

Author

Reinhard Zumkeller, Apr 08 2003

Keywords

Comments

a(n) = A001414(A001414(n)). For further iterations see: A029908, A002217;
a(n)=n iff n is prime or 4.

Examples

			18 = 2*3*3 -> 2+3+3 = 2*2*2 -> 2+2+2 = 6: a(18) = 6.
		

Programs

  • Mathematica
    spf[n_]:=Flatten[Table[#[[1]],#[[2]]]&/@FactorInteger[n]]; Table[Nest[Total[spf[#]]&,n,2],{n,2,90}] (* Harvey P. Dale, May 31 2025 *)

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).

A082086 Fixed points when A001414 is iterated and started at factorials of prime numbers.

Original entry on oeis.org

2, 5, 5, 5, 13, 23, 61, 19, 5, 283, 5, 23, 13, 29, 7, 61, 947, 29, 137, 11, 353, 23, 199, 5, 47, 2381, 5, 103, 359, 13, 5, 5, 7, 5, 47, 19, 577, 7, 5, 29, 5, 5, 5, 41, 11, 23, 239, 7, 11, 5, 11, 5, 23, 11821, 31, 5, 5, 13669, 7, 193, 5, 991, 89, 7, 13, 18199, 131, 113, 20849
Offset: 1

Views

Author

Labos Elemer, Apr 08 2003

Keywords

Examples

			n=100, prime(100) = 541, start at 541!, the list is: {541!,...,46374,195,21,10,7} so a(100)=7.
		

Crossrefs

Programs

  • Mathematica
    sopfr[n_] := Total[Times @@@ FactorInteger[n]]; a[n_] := FixedPoint[sopfr, Prime[n]!]; Array[a, 100] (* Jean-François Alcover, May 06 2017 *)

Formula

a(n) = A029908(A000142(A000040(n))) = A029908(prime(n)!).
Showing 1-10 of 12 results. Next