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 A126433 #18 Mar 27 2024 08:03:02 %S A126433 1,1,1,1,1,2,1,2,1,2,1,3,2,2,1,1,2,2,2,1,4,2,2,2,2,2,3,1,2,3,1,2,2,2, %T A126433 2,3,3,3,2,3,2,3,1,3,2,2,2,2,3,2,3,2,2,2,3,2,2,2,3,2,2,2,2,3,4,2,3,3, %U A126433 3,2,3,2,2,2,3,1,3,3,3,3,2,3,1,2,2,4,2,3,2,3,3,2,3,3,2,2,2,3,3,3,3,2,2,3,3 %N A126433 Class+ number of prime(n) according to the Erdős-Selfridge classification of primes. %C A126433 a(n)=1 if A000040(n) is in A005105. a(n)=2 if A000040(n) is in A005106, a(n)=3 if in A005107 etc. The locations of records are implicit in A005113. %H A126433 M. F. Hasler, <a href="/A126433/b126433.txt">Table of n, a(n) for n = 1..1000</a> %H A126433 <a href="/index/Pri#primes_Erdos_Selfridge">Index entries for sequences related to the Erdos-Selfridge classification</a> %p A126433 A126433 := proc(n) %p A126433 option remember; %p A126433 local p, pf, e, a; %p A126433 if isprime(n) then %p A126433 pf := ifactors(n+1)[2]; %p A126433 a := 1; %p A126433 for e from 1 to nops(pf) do %p A126433 p := op(1, op(e, pf)); %p A126433 if p > 3 then %p A126433 a := max(a, procname(p)+1); %p A126433 end if; %p A126433 end do; %p A126433 a ; %p A126433 else %p A126433 -1; %p A126433 end if; %p A126433 end proc: %p A126433 seq(A126433(ithprime(n)),n=1..100) ; %p A126433 A126433 := n -> if n>0 then A126433(-ithprime(n)) else numtheory[factorset](1-n); if % subset{2,3} then 1 else 1+max(seq(A126433(-i),i=%)) fi fi; map(%,[$1..999]); # _M. F. Hasler_, Apr 02 2007 %t A126433 classPlus[p_] := classPlus[p] = If[f = FactorInteger[p + 1][[All, 1]]; q = Last[f]; q == 2 || q == 3, 1, Max[classPlus /@ f] + 1]; classPlus /@ Prime /@ Range[105] (* _Jean-François Alcover_, Jun 24 2013 *) %o A126433 (PARI) A126433(n) = { if( n>0, n=-prime(n)); n=factor(1-n)[,1]; if( n[ #n]>3, vecsort( vector( #n, i, A126433(-n[i]) ))[ #n]+1, 1) }; vector(999,i,A126433(i)) %Y A126433 Cf. A101253. %K A126433 nonn %O A126433 1,6 %A A126433 _R. J. Mathar_, Mar 23 2007