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

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

A287841 Number of iterations of number of distinct prime factors (A001221) needed to reach 1 starting at n (n is counted).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Jun 01 2017

Keywords

Examples

			If n = 6 the trajectory is {6, 2, 1}. Its length is 3, thus a(6) = 3.
		

Crossrefs

Cf. A001221, A036430, A036459, A049108, A073855, A115658 (first occurrence), A246655 (positions of 2).

Programs

  • Mathematica
    f[n_] := Length[NestWhileList[ PrimeNu, n, # != 1 &]]; Array[f, 105]
    a[1] = 1; a[n_] := a[n] = a[PrimeNu[n]] + 1; Table[a[n], {n, 105}]
  • PARI
    A287841(n) = if(1==n,n,1+A287841(omega(n))); \\ Antti Karttunen, Nov 23 2017
    
  • Python
    from sympy import primefactors
    def a(n): return 1 if n==1 else a(len(primefactors(n))) + 1 # Indranil Ghosh, Jun 03 2017

Formula

a(n) = a(omega(n)) + 1 for n > 1, where omega() is the number of distinct prime factors.
Showing 1-2 of 2 results.