|
|
A126805
|
|
"Class-" (or "class-minus") number of prime(n) according to the Erdős-Selfridge classification of primes.
|
|
4
|
|
|
1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 2, 1, 2, 2, 4, 2, 3, 2, 3, 2, 1, 2, 3, 3, 1, 2, 2, 3, 1, 2, 2, 2, 2, 4, 2, 2, 2, 1, 4, 3, 4, 2, 2, 1, 2, 3, 2, 2, 3, 2, 3, 2, 2, 2, 1, 3, 4, 2, 4, 2, 5, 2, 2, 3, 2, 3, 3, 2, 4, 3, 3, 5, 3, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 1, 2, 2, 2, 2, 4, 3, 4, 3, 1, 2, 4, 3, 3, 2, 3, 2, 2, 5, 3, 3, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
This gives the "class-" number as opposed to the "class+" number. Not to be confused with the "class-number" of quadratic form theory.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = max { a(p)+1 ; prime(p) is > 3 and divides prime(n)-1 } union { 1 } - M. F. Hasler, Apr 16 2007
|
|
MAPLE
|
option remember;
local p, pe, a;
if isprime(n) then
a := 1;
for pe in ifactors(n-1)[2] do
p := op(1, pe);
if p > 3 then
a := max(a, procname(p)+1);
end if;
end do;
a ;
else
-1;
end if;
end proc:
seq(A126805(ithprime(n)), n=1..100) ;
|
|
MATHEMATICA
|
a [n_] := a[n] = Module[{p, pf, e, res}, If[PrimeQ[n], pf = FactorInteger[n-1]; res = 1; For[e = 1, e <= Length[pf], e++, p = pf[[e, 1]]; If[p > 3, res = Max[res, a[p]+1]]]; Return[res], -1]]; Table[a[Prime[n]], {n, 1, 105}] (* Jean-François Alcover, Dec 13 2013, translated from Maple *)
|
|
PROG
|
(PARI) A126805(n) = { if( n>0, n=-prime(n)); if(( n=factor(-1-n)[, 1] ) & n[ #n]>3, vecsort( vector( #n, i, A126805(-n[i]) ))[ #n]+1, 1) } \\ M. F. Hasler, Apr 16 2007
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|