Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A126805
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A126805 "Class-" (or "class-minus") number of prime(n) according to the Erdos-Selfridge classification of primes. +0
3
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; listen)
OFFSET

1,5

COMMENT

This gives the "class-" number as opposed to the "class+" number. Not to be confused with the "class-number" of quadratic form theory.

a(n)=1 if A000040(n) is in A005109, a(n)=2 if A000040(n) is in A005110, a(n)=3 if A000040(n) is in A005111 etc.

FORMULA

a(n) = max { a(p)+1 ; prime(p) is > 3 and divides prime(n)-1 } union { 1 } - M. F. Hasler (Maximilian.Hasler(AT)gmail.com), Apr 16 2007

MAPLE

a := proc(n) option remember; local p, pf, e, res; if isprime(n) then pf := ifactors(n-1)[2]; res := 1; for e from 1 to nops(pf) do p := op(1, op(e, pf)); if p > 3 then res := max(res, a(p)+1); fi; od; RETURN(res); else -1; fi; end: for n from 1 to 180 do printf("%d, ", a(ithprime(n))); end:

PROGRAM

(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 (Maximilian.Hasler(AT)gmail.com), Apr 16 2007

CROSSREFS

Cf. A005109, A005110, A005111, A005112, A081424, A081425.

Cf. A081640, A081641, A129248, A056637.

Sequence in context: A127832 A107249 A062842 this_sequence A110963 A106348 A161092

Adjacent sequences: A126802 A126803 A126804 this_sequence A126806 A126807 A126808

KEYWORD

easy,nonn

AUTHOR

R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Feb 23 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 8 08:31 EST 2009. Contains 170430 sequences.


AT&T Labs Research