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.

Previous Showing 11-12 of 12 results.

A356429 Smallest m such that A356428(m) = n, or -1 if there is no such m.

Original entry on oeis.org

2, 8, 48, 315, 320, 6664, 135450, 273000, 518661, 519440, 519622, 148830266, 558797841, 558797968, 24900609294
Offset: 1

Views

Author

Jianing Song, Aug 07 2022

Keywords

Comments

a(n) is the smallest m such that there are exactly n distinct gpf(x)'s in the iterations x -> x - gpf(x) starting at m and ending at 0, where gpf = A006530.
Conjecture: a(n) != -1 for all n. This would be true if A356428 is unbounded; otherwise, this sequence consists of entirely -1's after some point.
Since A356428(n) - A356428(n-gpf(n)) = 0 or 1, sequence is strictly increasing if no term equals -1.
If a(m) > -1 for m >= 15 then a(m) > 10^9. - David A. Corneth, Aug 09 2022

Examples

			In the following examples the numbers produced by the iterations are listed together with their GPFs.
320 (5) -> 315 (7) -> 308 (11) -> 297 (11) -> 286 (13) -> 273 (13) -> 260 (13) -> 247 (19) -> ... -> 19 (19) -> 0, the distinct gpf(x)'s are 5, 7, 11, 13, and 19. 320 is the smallest number such that the distinct gpf(x)'s in the iterations is 5, so a(5) = 320.
6664 (17) -> 6647 (23) -> 6624 (23) -> 6601 (41) -> 6560 (41) -> 6519 (53) -> 6466 (53) -> 6413 (53) -> 6360 (53) -> 6307 (53) -> 6254 (59) -> 6195 (59) -> 6136 (59) -> 6077 (103) -> ... -> 103 (103) -> 0, the distinct gpf(x)'s are 17, 23, 41, 53, 59, and 103. 6664 is the smallest number such that the distinct gpf(x)'s in the iterations is 6, so a(6) = 6664.
		

Crossrefs

Extensions

a(12) from Michael S. Branicky, Aug 08 2022
a(13)-a(14) from David A. Corneth, Aug 09 2022
a(15) from Jinyuan Wang, Jul 07 2025

A382986 a(n) is the number of iterations that n requires to reach 0 under the map k -> b(k) where b(k) = k+1 if k is even, and b(k) = k-gpf(k) if k is odd, where gpf(k) is the greatest prime dividing k.

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 6, 5, 2, 1, 8, 7, 10, 9, 2, 1, 2, 1, 4, 3, 4, 3, 2, 1, 12, 11, 2, 1, 2, 1, 4, 3, 2, 1, 4, 3, 6, 5, 2, 1, 6, 5, 14, 13, 2, 1, 2, 1, 16, 15, 4, 3, 2, 1, 4, 3, 2, 1, 2, 1, 4, 3, 4, 3, 2, 1, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1
Offset: 0

Views

Author

Jakub Buczak, Apr 11 2025

Keywords

Comments

k -> 0 occurs when k is 1 or an odd prime and this is the only way to reach 0.
At 0, a loop 0 -> 1 -> 0 occurs and there are no other loops since either 1 or 2 steps is a decrease: b(k) < k for odd k, or b(b(k)) < k for even k >= 2.
Consecutive terms can form decreasing runs starting at an even term, such as: (4, 3, 2, 1) starting at the 8th term.

Examples

			a(0) = 0, since 0 already matches the ending condition.
a(2) = 2, since (b2)=3 and then b(3)=0.
a(3) = 1, since 3 - gpf(3) = 0.
		

Crossrefs

Programs

  • PARI
    gpf(n) = if (n==1, 1, vecmax(factor(n)[,1]));
    b(m) = if (m % 2, m - gpf(m), m+1);
    a(n)= my(nb=0); while (n>1, n=b(n); nb++); nb; \\ Michel Marcus, Apr 13 2025
    
  • Python
    from sympy import factorint
    from itertools import count
    def b(n): return n - max(factorint(n), default=0) if n&1 else n + 1
    def a(n): return next(i for i in count(1) if not (n:=b(n))) if n > 1 else n
    print([a(n) for n in range(90)]) # Michael S. Branicky, Apr 13 2025

Formula

a(p) = 1, for odd prime p.
a(2*n) = a(2*n+1) + 1.
Previous Showing 11-12 of 12 results.