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

A082083 a(n)=A082081[n! ]=A082081[A000142[n]] Fixed points of iterated A008475 function initiated at factorials as initial values.

Original entry on oeis.org

0, 2, 5, 11, 16, 7, 37, 149, 7, 27, 11, 11, 23, 2389, 49, 11, 31, 19, 67, 109, 13, 8, 25, 8, 461, 179, 1319, 9, 193, 16, 7, 4931, 121, 7, 9, 8, 7, 8, 2895630887, 25, 19, 13, 19, 41, 2209493509721, 32, 5939, 23, 43, 11
Offset: 1

Views

Author

Labos Elemer, Apr 08 2003

Keywords

Examples

			Fixed point is always a prime or a true power of prime:
a term from A000961.
n=20!=2432902008176640000, a(20)=109 because
fixed point list={2432902008176640000,269439,214,109}}
		

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}]

A029908 Starting with n, repeatedly sum prime factors (with multiplicity) until reaching 0 or a fixed point. Then a(n) is the fixed point (or 0).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

That is, the sopfr function (see A001414) applied repeatedly until reaching 0 or a fixed point.
For n > 1, the sequence reaches a fixed point which is either 4 or a prime.
A002217(n) is number of terms in sequence from n to a(n). - Reinhard Zumkeller, Apr 08 2003
Because sopfr(n) <= n (with equality at 4 and the primes), the first appearance of all primes is in the natural order: 2,3,5,7,11,... . - Zak Seidov, Mar 14 2011
The terms 0, 2, 3 and 4 occur exactly once, because no number > 5 can have factors that sum to be < 5, and therefore can never enter a trajectory that will drop below 5. - Christian N. K. Anderson, May 19 2013
For all primes p, where p is contained in A001359, then a(p^2) = p + 2. (A006512). Proof: p^2 has prime factors (p, p). This sums to 2p. 2p has factors (2, p). This sums to p + 2. Since p was the lesser of a twin prime, then p + 2 is the greater of a twin prime. - Ryan Bresler, Nov 04 2021

Examples

			20 -> 2+2+5 = 9 -> 3+3 = 6 -> 2+3 = 5, so a(20)=5.
		

Crossrefs

Cf. A001414 (sum of prime factors of n).

Programs

  • Maple
    f:= proc(n) option remember;
    if isprime(n) then n
    else `procname`(add(x[1]*x[2], x = ifactors(n)[2]))
    fi
    end proc:
    f(1):= 0: f(4):= 4:
    map(f, [$1..100]); # Robert Israel, Apr 27 2015
  • 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_] := slog[x_] := Apply[Plus, ba[x]*ep[x]] Table[FixedPoint[slog, w], {w, 1, 128}]
    f[n_] := Plus @@ Flatten[ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@n]; Array[ FixedPoint[f, # ] &, 87] (* Robert G. Wilson v, Jan 18 2006 *)
    fz[n_]:=Plus@@(#[[1]]*#[[2]]&/@FactorInteger@n); Array[FixedPoint[fz,#]&,1000] (* Zak Seidov, Mar 14 2011 *)
  • Python
    from sympy import factorint
    def a(n, pn):
        if n == pn:
            return n
        else:
            return a(sum(p*e for p, e in factorint(n).items()), n)
    print([a(i, None) for i in range(1, 100)]) # Gleb Ivanov, Nov 05 2021

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

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}]

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

A082085 Fixed points when A008475 is iterated started at factorials of prime numbers.

Original entry on oeis.org

2, 5, 16, 37, 11, 23, 31, 67, 25, 193, 7, 7, 19, 19, 5939, 27, 13, 11, 11, 503, 15889, 37, 11, 4651, 52960025378359863409578953, 8, 13, 11, 25, 79, 19, 25, 56707367, 7, 103, 23, 9, 61
Offset: 1

Views

Author

Labos Elemer, Apr 08 2003

Keywords

Examples

			n=25: p(25)=97, start with 97!, end at a large prime: 52960025378359863409578953=a(25); it seems difficult to predict magnitude of fixed point.
		

Crossrefs

Formula

a(n) = A082081(A000142(A000040(n))).
Showing 1-6 of 6 results.