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.

A323077 Number of iterations of map x -> (x - (largest divisor d < x)) needed to reach 1 or a prime, when starting at x = n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

When iteration is started from n, the first noncomposite reached is A006530(n), from which follows the new formula a(n) = A064097(A052126(n)) = A064097(n/A006530(n)), as A064097 is completely additive sequence. - Antti Karttunen, May 15 2020

Crossrefs

Cf. A334198 (positions of the records, also the first occurrence of each n).
Differs from A334201 for the first time at n=169, where a(169) = 5, while A334201(169) = 6.

Programs

  • Mathematica
    Nest[Append[#1, If[PrimeOmega[#2] <= 1, 0, 1 + #1[[Max@ Differences@ Divisors[#2] ]] ]] & @@ {#, Length@ # + 1} &, {}, 105] (* Michael De Vlieger, May 26 2020 *)
  • PARI
    A060681(n) = (n-if(1==n,n,n/vecmin(factor(n)[,1])));
    A323077(n) = if(1>=bigomega(n),0,1+A323077(A060681(n)));

Formula

If A001222(n) <= 1 [when n is 1 or a prime], a(n) = 0, otherwise a(n) = 1 + a(A060681(n)).
a(n) <= A064097(n).
a(n) = A064097(n) - A334202(n) = A064097(A052126(n)). - Antti Karttunen, May 13 2020
a(A334198(n)) = n for all n >= 0. - Antti Karttunen, May 19 2020

A358730 Positions of first appearances in A358729 (number of nodes minus node-height).

Original entry on oeis.org

1, 4, 8, 16, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366, 59049
Offset: 1

Views

Author

Gus Wiseman, Dec 01 2022

Keywords

Comments

First differs from A334198 in having 13122 instead of 12005.
Node-height is the number of nodes in the longest path from root to leaf.
After initial terms, this appears to become A038754.

Examples

			The terms together with their corresponding rooted trees begin:
      1: o
      4: (oo)
      8: (ooo)
     16: (oooo)
     27: ((o)(o)(o))
     54: (o(o)(o)(o))
     81: ((o)(o)(o)(o))
    162: (o(o)(o)(o)(o))
    243: ((o)(o)(o)(o)(o))
    486: (o(o)(o)(o)(o)(o))
    729: ((o)(o)(o)(o)(o)(o))
		

Crossrefs

Positions of first appearances in A358729.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height.
A055277 counts rooted trees by nodes and leaves.
MG differences: A358580, A358724, A358726, A358729.

Programs

  • Mathematica
    MGTree[n_]:=If[n==1,{},MGTree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    rd=Table[Count[MGTree[n],_,{0,Infinity}]-(Depth[MGTree[n]]-1),{n,10000}];
    Table[Position[rd,k][[1,1]],{k,Union[rd]}]
Showing 1-2 of 2 results.