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

A014673 Smallest prime factor of greatest proper divisor of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 2, 3, 5, 1, 2, 1, 7, 5, 2, 1, 3, 1, 2, 7, 11, 1, 2, 5, 13, 3, 2, 1, 3, 1, 2, 11, 17, 7, 2, 1, 19, 13, 2, 1, 3, 1, 2, 3, 23, 1, 2, 7, 5, 17, 2, 1, 3, 11, 2, 19, 29, 1, 2, 1, 31, 3, 2, 13, 3, 1, 2, 23, 5, 1, 2, 1, 37, 5, 2, 11, 3, 1, 2, 3, 41, 1, 2, 17, 43, 29, 2, 1, 3, 13, 2, 31, 47
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 24 2003

Keywords

Comments

For n > 1: a(n) = 1 iff n is prime; a(A001358(n)) = A084127(n); a(A025475(n)) = A020639(A025475(n)). [corrected by Peter Munn, Feb 19 2017]
When n is composite, this is the 2nd factor when n is written as a product of primes in nondecreasing order. For example, 12 = 2*2*3, so a(12) = 2. - Peter Munn, Feb 19 2017
For all sufficiently large n the median value of a(1), a(2), ... a(n) is A281889(2) = 7. - Peter Munn, Jul 12 2019

Crossrefs

Programs

  • Mathematica
    PrimeFactors[ n_ ] := Flatten[ Table[ # [ [ 1 ] ], {1} ] & /@ FactorInteger[ n ] ]; f[ n_ ] := Block[ {gpd = Divisors[ n ][ [ -2 ] ]}, If[ gpd == 1, 1, PrimeFactors[ gpd ][ [ 1 ] ] ] ]; Table[ If[ n == 1, 1, f[ n ] ], {n, 1, 95} ]
    (* Second program: *)
    Table[If[Or[PrimeQ@ n, n == 1], 1, FactorInteger[n/SelectFirst[Prime@ Range@ PrimePi[Sqrt@ n], Divisible[n, #] &]][[1, 1]] ], {n, 94}] (* Michael De Vlieger, Aug 14 2017 *)
  • PARI
    lpf(n)=if(n>1,factor(n)[1,1],1)
    a(n)=lpf(n/lpf(n)) \\ Charles R Greathouse IV, May 09 2013
    
  • PARI
    a(n)=if(n<4||isprime(n),return(1)); my(f=factor(n)); if(f[1,2]>1, f[1,1], f[2,1]) \\ Charles R Greathouse IV, May 09 2013
    
  • Scheme
    (define (A014673 n) (A020639 (/ n (A020639 n)))) ;; Code for A020639 given under that entry - Antti Karttunen, Aug 12 2017

Formula

a(n) = A020639(A032742(n)).
A117357(n) = A020639(A054576(n)); A117358(n) = A032742(A054576(n)) = A054576(n)/A117357(n). - Reinhard Zumkeller, Mar 10 2006
If A001222(n) >= 2, a(n) = A027746(n,2), otherwise a(n) = 1. - Peter Munn, Jul 13 2019

A054576 Largest proper factor of the largest proper factor of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 4, 1, 3, 1, 5, 1, 1, 1, 6, 1, 1, 3, 7, 1, 5, 1, 8, 1, 1, 1, 9, 1, 1, 1, 10, 1, 7, 1, 11, 5, 1, 1, 12, 1, 5, 1, 13, 1, 9, 1, 14, 1, 1, 1, 15, 1, 1, 7, 16, 1, 11, 1, 17, 1, 7, 1, 18, 1, 1, 5, 19, 1, 13, 1, 20, 9, 1, 1, 21, 1, 1, 1, 22, 1, 15, 1, 23, 1, 1, 1, 24
Offset: 1

Views

Author

Henry Bottomley, Apr 11 2000

Keywords

Comments

Here a "proper factor of n" means 1 if n = 1, and otherwise any d that divides n with 1 <= d < n. - N. J. A. Sloane, Dec 26 2022

Examples

			The largest proper factor of 8 is 4, the largest proper factor of 4 is 2, so a(8) = 2. - _N. J. A. Sloane_, Dec 26 2022
		

Crossrefs

Programs

Formula

a(n) = A053598(A053598(n))
a(n) = A032742(A032742(n)); A117357(n) = A020639(a(n)); A117358(n) = A032742(a(n)) = a(n) / A117357(n); a(A037143(n)) = 1, a(A033942(n)) > 1. - Reinhard Zumkeller, Mar 10 2006

Extensions

Deleted an incorrect comment and link. - N. J. A. Sloane, Dec 26 2022

A117356 Number of rooted trees with total weight n, where the weight of a node at height k is k (with the root considered to be at level 0).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 5, 6, 8, 12, 16, 22, 31, 41, 56, 78, 104, 142, 194, 260, 353, 478, 641, 864, 1164, 1560, 2095, 2810, 3757, 5028, 6722, 8966, 11963, 15945, 21223, 28244, 37551, 49871, 66210, 87829, 116411, 154222, 204162, 270084, 357117, 471881, 623146
Offset: 0

Views

Author

Keywords

Comments

Equivalently, number of forests of total weight n, when the roots are considered to be at height 1; so this is the Euler transform of A117357. - Franklin T. Adams-Watters, Oct 03 2009

Examples

			a(3) = 2; there is one tree with 3 nodes at height 1 and one with 1 node at height 1 and 1 at height 2.
		

Crossrefs

Programs

  • Maple
    g:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i g(n, n, 1):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 16 2013
  • Mathematica
    g[n_, i_, k_] := g[n, i, k] = If[n == 0, 1, If[i < k, 0, Sum[Binomial[g[i - k, i - k, k + 1] + j - 1, j] g[n - i j, i - 1, k], {j, 0, n/i}]]];
    a[n_] := g[n, n, 1];
    a /@ Range[0, 60] (* Jean-François Alcover, Nov 05 2020, after Alois P. Heinz *)

Formula

If a(n) is the equivalent of this sequence with the root node considered to be at level k, then a(n) is the Euler transform of a(n) shifted right k places. To compute N terms, take k so that (k+1)*(k+2)/2 > N, approximate a(n) by 1 if n=k, 0 otherwise and apply this rule repeatedly. Formula from Christian G. Bower.
Showing 1-3 of 3 results.