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.
%I A130790 #9 Nov 04 2019 02:32:38 %S A130790 0,1,1,2,2,2,1,2,3,3,3,2,2,4,4,3,4,3,4,4,2,4,3,3,2,2,3,4,2,3,4,4,2,5, %T A130790 3,3,4,2,4,5,4,3,4,2,3,4,5,4,4,4,4,4,3,2,1,5,5,3,5,4,6,3,3,5,4,5,5,4, %U A130790 6,5,3,5,5,5,4,5,3,4,2,3,5,5,6,2,4,4,3,4,5,6,5,5,2,4,5,3,5,4,5,3 %N A130790 Number of nodes in the Lucas-Pratt primality tree rooted at prime(n). %C A130790 The primality tree starts at an odd prime at the root node. The branches of each node are the odd primes that divide the value of (the node minus 1). The length of the longest branch is related to A126805. Following the branch with the largest label gives A083647. %H A130790 J. Bayless, <a href="http://dx.doi.org/10.1090/S0025-5718-07-02002-9">The Lucas-Pratt primality tree</a>, Math. Comp. vol 77 (2008) 495-502. %o A130790 (PARI) LP(p) = my(f=factor(p-1)); if(p <= 2, 0, 1+vecsum(vector(#f~, k, LP(f[k,1])))); %o A130790 a(n) = LP(prime(n)); \\ _Daniel Suteu_, Nov 03 2019 %Y A130790 Cf. A083647, A126805. %Y A130790 Cf. A037231 (primes which set a new record). %K A130790 easy,nonn %O A130790 1,4 %A A130790 _R. J. Mathar_, Jul 15 2007, Mar 07 2008