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.

A143766 a(n+1) = a(n)^2 + 3*n*a(n) + n^2, a(1) = 1.

Original entry on oeis.org

1, 5, 59, 4021, 16216709, 262981894041341, 69159476593575838635509822455, 4783033202697364284917104840982811414253511628131328498629, 22877406618105405861781317490149379589769149890660405723416585348109182559037843469373513563751798569651299138846801
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 01 2008

Keywords

Comments

Let f(n+1,k) = f(n,k)^2 + k*n*f(n,k) + n^2, f(1, k) = 1:
f(n,0)=A143760(n), f(n,-1)=A143761(n), f(n,+1)=A143762(n),
f(n,-2)=A143763(n), f(n,+2)=A143764(n), f(n,-3)=A143765(n), f(n,+3)=a(n).

Examples

			Contribution from _Reinhard Zumkeller_, Sep 11 2008: (Start)
a(4)=A000040(556);
a(5)=19*199*4289;
a(6)=3686299*71340359;
a(7)=5*89*23581*36190079671*182112572569;
A055642(a(8))=58; A001221(a(8))=A001222(a(8))=3;
A055642(A020639(a(8)))=4, A020639(a(8))=2459;
A055642(A006530(a(8)))=43, A006530(a(8))=1145781805709434583439407716589323093429591;
A055642(a(9))=116; A001221(a(9))=A001222(a(9))=3;
A055642(A020639(a(9)))=5, A020639(a(9))=52291;
A055642(A087039(a(9)))=39, A087039(a(9))=823717865733493312451872329574156137131;
A055642(A006530(a(9)))=72, A006530(a(9))=531130643259166452223939782963931943654770628199012648274446497807560081;
factorizations made with Dario Alpern's ECM applet. (End)
		

Programs

  • Mathematica
    RecurrenceTable[{a[n+1] == a[n]^2 + 3*n*a[n] + n^2, a[1] == 1}, a, {n, 1, 10}] (* Vaclav Kotesovec, Dec 18 2014 *)

Formula

a(n) ~ c^(2^n), where c = 1.68000796750332615134775696497253700657744224375254906378714756508286... . - Vaclav Kotesovec, Dec 18 2014

A087040 2nd largest prime factor of n-th composite number.

Original entry on oeis.org

2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 2, 2, 5, 2, 3, 2, 3, 2, 3, 2, 5, 3, 2, 3, 2, 3, 2, 3, 2, 2, 7, 5, 3, 2, 3, 5, 2, 3, 2, 3, 2, 3, 2, 5, 3, 2, 3, 5, 3, 2, 5, 2, 7, 3, 2, 3, 2, 3, 5, 2, 3, 2, 3, 7, 2, 3, 2, 5, 2, 7, 3, 5, 3, 2, 5, 2, 3, 5, 3, 2, 3, 5, 2, 3, 2, 7, 3, 11, 2, 3, 2, 5, 3, 2, 3, 5, 3, 7, 2, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 01 2003

Keywords

Comments

a(n) = A087039(A002808(n));
a(n) = A006530(A002808(n)/A052369(n)).

Crossrefs

Programs

  • Maple
    f:= proc(n) local F;
      if isprime(n) then return NULL fi;
      F:= sort(ifactors(n)[2],(a,b) -> a[1]>b[1]);
      if F[1][2] >= 2 then F[1][1] else F[2][1] fi
    end proc:
    map(f, [$2..200]); # Robert Israel, Feb 20 2024
  • Mathematica
    Table[l=FactorInteger[ResourceFunction["Composite"][n]];If[Last[l][[2]]>1,Last[l][[1]],First[Part[l,-2]]],{n,102}] (* James C. McMahon, Feb 20 2024 *)

A378680 a(n) = numerator(Sum_{k=1..n} 1/P_2(k)), where P_2(k) = A087040(k) is the second largest prime dividing the k-th composite number.

Original entry on oeis.org

1, 1, 3, 11, 7, 17, 10, 11, 25, 9, 5, 16, 35, 19, 98, 211, 221, 118, 41, 87, 271, 143, 146, 151, 317, 109, 57, 176, 367, 377, 196, 407, 2879, 2921, 997, 516, 1583, 1604, 3313, 3383, 1744, 593, 1221, 3733, 1919, 388, 395, 811, 275, 1389, 4237, 2171, 2192, 4489
Offset: 1

Views

Author

Amiram Eldar, Dec 03 2024

Keywords

Examples

			Fractions begin: 1/2, 1, 3/2, 11/6, 7/3, 17/6, 10/3, 11/3, 25/6, 9/2, 5, 16/3, ...
		

Crossrefs

Cf. A006530, A087039, A087040, A378681 (denominators).

Programs

  • Mathematica
    p2[c_] := Module[{f = FactorInteger[c]}, If[f[[-1, 2]] > 1, f[[-1, 1]], f[[-2, 1]]]]; Numerator@ Accumulate[Table[1/p2[c], {c, Select[Range[100], CompositeQ]}]]
  • PARI
    lista(nmax) = {my(s = 0); forcomposite(n = 1, nmax, f = factor(n); s += if(f[#f~, 2] > 1, 1/f[#f~, 1], 1/f[#f~ - 1, 1]); print1(numerator(s), ", "));}

Formula

a(n)/A378681(n) = Sum_{k=1..m} c_k * n/log(n)^k + O(n/log(n)^(m+1)) for any integer m >= 1, where c_k are constants. c_1 = Sum_{k>=1} (1/k)*Sum_{p prime > P(k)} 1/p^2 = Sum_{p prime} (1/p^2)*Product_{primes q < p} (1/(1-1/q)) = 1.254435359..., where P(k) = A006530(k) is the greatest prime dividing k for k >= 2, and P(1) = 1.

A378681 a(n) = denominator(Sum_{k=1..n} 1/P_2(k)), where P_2(k) = A087040(k) is the second largest prime dividing the k-th composite number.

Original entry on oeis.org

2, 1, 2, 6, 3, 6, 3, 3, 6, 2, 1, 3, 6, 3, 15, 30, 30, 15, 5, 10, 30, 15, 15, 15, 30, 10, 5, 15, 30, 30, 15, 30, 210, 210, 70, 35, 105, 105, 210, 210, 105, 35, 70, 210, 105, 21, 21, 42, 14, 70, 210, 105, 105, 210, 210, 210, 105, 35, 70, 210, 210, 105, 105, 210
Offset: 1

Views

Author

Amiram Eldar, Dec 03 2024

Keywords

Comments

See A378680 for more details.

Crossrefs

Cf. A087039, A087040, A378680 (numerators).

Programs

  • Mathematica
    p2[c_] := Module[{f = FactorInteger[c]}, If[f[[-1, 2]] > 1, f[[-1, 1]], f[[-2, 1]]]]; Denominator@ Accumulate[Table[1/p2[c], {c, Select[Range[50], CompositeQ]}]]
  • PARI
    lista(nmax) = {my(s = 0); forcomposite(n = 1, nmax, f = factor(n); s += if(f[#f~, 2] > 1, 1/f[#f~, 1], 1/f[#f~ - 1, 1]); print1(denominator(s), ", "));}

A189172 Largest prime number tried when factoring n using trial division.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 5, 3, 3, 2, 5, 3, 5, 2, 3, 3, 5, 3, 5, 3, 3, 2, 5, 3, 5, 3, 3, 3, 5, 2, 7, 5, 3, 3, 7, 3, 5, 2, 3, 5, 7, 3, 7, 5, 3, 2, 5, 3, 7, 3, 3, 5, 7, 3, 7, 5, 5, 3, 7, 3, 7, 2, 3, 5, 7, 3, 5, 5, 5, 3, 7, 3, 7, 3, 5, 5, 5, 2, 7, 7, 3, 5
Offset: 1

Views

Author

Dan Uznanski, May 02 2011

Keywords

Comments

When factoring a number via trial division, one generally continues trying primes until it is certain that the remaining portion of n is prime. Sometimes, it is already clear that the remaining portion is prime before that portion is found; in this case, the last prime tried is the second to last prime factor.

Examples

			A(22) is 3, because after 3 is tried, it is clear that 11 is prime and no more factorization can be done.
A(18) is 3, because despite the largest prime factor (3) being obviously prime, it is not obviously the last factor until the first 3 is factored out.
		

Crossrefs

Like A059396 but also works on composites; uses A006530, A087039, A000040.

Programs

  • JavaScript
    prime(k), not shown, gives A000040[k].
    function a(n) {
      var k = 1;
      while (Math.pow(prime(k),2) <= n) {
        var p = prime(k);
        if (n % p == 0) {
          n /= p;
        } else {
          k += 1;
        }
      }
      return p;
    }
  • Mathematica
    a[n_] := Module[{m = n, k = 1, p = 1, q}, While[q = Prime[k]; q^2 <= m, p = q; m = m/p^IntegerExponent[m, p]; k++]; p]; Array[a,100] (* T. D. Noe, May 04 2011 *)

Formula

a(n) = max(A087039(n), A007917(A000196(A006530(n)))).

A215776 Second-largest prime factor of the n-th number that is a product of exactly n primes.

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 5, 2, 3, 3, 3, 3, 2, 5, 5, 2, 3, 3, 2, 3, 7, 3, 3, 3, 5, 5, 5, 3, 2, 3, 2, 5, 5, 3, 3, 3, 7, 2, 3, 3, 3, 7, 5, 2, 5, 5, 5, 3, 2, 3, 5, 3, 7, 3, 5, 2, 5, 5, 3, 3, 2, 3, 7, 3, 3, 3, 3, 5, 7, 2, 5, 7, 11, 2, 7, 3, 5, 5, 5, 3, 3, 3
Offset: 1

Views

Author

Jonathan Vos Post, Aug 23 2012

Keywords

Comments

This is to A215405 as 2nd largest prime factor is to largest (greatest) prime factor. Technically, the prime numbers are "1-almost prime."

Examples

			a(2) = 2 because the 2nd number that is a product of exactly 2 primes
(semiprime) is 6 = 2*3, so 2 is the 2nd largest of those two prime factors.
a(4) = 2 because the 4th number that is a product of exactly 4 primes is 40 = 2*2*2*5, so 2 is the 2nd largest of those two distinct prime factors {2,5}. This requires clarity in "distinct prime factors" versus merely "prime factors."
a(87) = 3 because the 87th number that is a product of 87 primes is 5048474222710691433572990976 = 2^84 3^2 29, and 3 is the 2nd largest prime factor.
		

Crossrefs

Programs

Formula

a(n) = A087039(A101695(n)).

Extensions

Corrected by R. J. Mathar, Sep 14 2012
More terms from Lars Blomberg, Mar 02 2016
Showing 1-6 of 6 results.