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.

A073932 Define f(n) = n - largest nontrivial divisor of n or f(n) = n-1 if n is a prime [that is, f(n) = A060681(n)]. Form a triangle in which the n-th row contains terms n, f(n), f(f(n)), ... until a 1 is reached; sequence gives triangle read by rows.

This page as a plain text file.
%I A073932 #25 Jan 09 2024 12:06:50
%S A073932 1,2,1,3,2,1,4,2,1,5,4,2,1,6,3,2,1,7,6,3,2,1,8,4,2,1,9,6,3,2,1,10,5,4,
%T A073932 2,1,11,10,5,4,2,1,12,6,3,2,1,13,12,6,3,2,1,14,7,6,3,2,1,15,10,5,4,2,
%U A073932 1,16,8,4,2,1,17,16,8,4,2,1,18,9,6,3,2,1,19,18,9,6,3,2,1,20,10,5,4,2,1
%N A073932 Define f(n) = n - largest nontrivial divisor of n or f(n) = n-1 if n is a prime [that is, f(n) = A060681(n)]. Form a triangle in which the n-th row contains terms n, f(n), f(f(n)), ... until a 1 is reached; sequence gives triangle read by rows.
%H A073932 Michael De Vlieger, <a href="/A073932/b073932.txt">Table of n, a(n) for n = 1..12386</a> (rows 1 <= n <= 1000, flattened)
%H A073932 John Machacek, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL21/Machacek/mach4.html">Egyptian Fractions and Prime Power Divisors</a>, Journal of Integer Sequences, Vol. 21 (2018), Article 18.3.7.
%e A073932 Triangle begins:
%e A073932    1;
%e A073932    2, 1;
%e A073932    3, 2, 1;
%e A073932    4, 2, 1;
%e A073932    5, 4, 2, 1;
%e A073932    6, 3, 2, 1;
%e A073932    7, 6, 3, 2, 1;
%e A073932    8, 4, 2, 1;
%e A073932    9, 6, 3, 2, 1;
%e A073932   10, 5, 4, 2, 1;
%p A073932 j := 1:a[1] := 1:for i from 2 to 50 do n := i:j := j+1:a[j] := n:while(n>1) do if isprime(n) then r := n-1: else r := n-n/ifactors(n)[2][1][1]; fi; n := r:j := j+1:a[j] := n: od:od:seq(a[k],k=1..j);
%t A073932 Array[If[# == 1, {1}, NestWhileList[If[PrimeQ@ #, # - 1, # - #/FactorInteger[#][[1, 1]] ] &, #, # > 1 &]] &, 20] // Flatten  (* _Michael De Vlieger_, Apr 15 2020 *)
%Y A073932 Cf. A032742, A060681, A073933, A073934, A073935.
%K A073932 nonn,tabf
%O A073932 1,2
%A A073932 _Amarnath Murthy_, Aug 19 2002
%E A073932 More terms from _Sascha Kurz_, Aug 23 2002
%E A073932 Offset corrected from 0 to 1 by _Antti Karttunen_, Aug 23 2017