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 A322817 #7 Dec 27 2018 17:36:30 %S A322817 0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1, %T A322817 1,1,1,1,1,-1,1,1,1,1,0,1,1,-1,1,2,1,1,1,1,1,-1,1,1,1,0,1,1,0,1,1,1,1, %U A322817 1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,-1,1,2,1,2,1,1,1,1,1 %N A322817 a(n) = A001222(A065642(n)) - A001222(n), where A065642(n) gives the next larger m that has same prime factors as n (ignoring multiplicity), and A001222 gives the number of prime factors, when counted with multiplicity. %H A322817 Antti Karttunen, <a href="/A322817/b322817.txt">Table of n, a(n) for n = 1..20000</a> %F A322817 a(n) = A001222(A065642(n)) - A001222(n). %e A322817 For n = 2 = 2^1, the next larger number with only 2's as its prime factors is 4 = 2^2, thus a(2) = 1. %e A322817 For n = 12 = 2^2 * 3^1, the next larger number with the same prime factors is 18 = 2^1 * 3^2, with the same value of A001222, thus a(12) = 0. %e A322817 For n = 40 = 2^3 * 5^1, the next larger number with the same prime factors is 50 = 2^1 * 5^2. While 40 has 3+1 = 4 prime factors in total, 50 has 1+2 = 3, thus a(40) = 3 - 4 = -1. %e A322817 For n = 50, the next larger number with the same prime factors is 80 = 2^4 * 5^1, thus a(50) = (4+1)-(2+1) = 2. %o A322817 (PARI) %o A322817 A007947(n) = factorback(factorint(n)[, 1]); %o A322817 A065642(n) = { my(r=A007947(n)); if(1==n, n, n = n+r; while(A007947(n) <> r, n = n+r); n); }; %o A322817 A322817(n) = (bigomega(A065642(n)) - bigomega(n)); %Y A322817 Cf. A001222, A065642, A322818. %K A322817 sign %O A322817 1,50 %A A322817 _Antti Karttunen_, Dec 27 2018