login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A177803
The number of lines in the analog of Pratt primality certificate for the n-th semiprime.
1
1, 2, 1, 2, 1, 2, 3, 4, 1, 3, 1, 2, 3, 2, 1, 4, 1, 5, 6, 7, 1, 3, 4, 5, 3, 3, 1, 7, 1, 2, 3, 4, 5, 5, 1, 2, 3, 5, 1, 8, 1, 8, 5, 6, 1, 3, 4, 7, 8, 6, 1, 4, 5, 3, 4, 5, 1, 8, 1, 2, 8, 2, 3, 10, 1, 5, 6, 9, 1, 5, 1, 2, 6, 3, 4, 8, 1, 5, 3, 4, 1, 9, 10, 11, 12, 8, 1, 9, 10, 7, 8, 9, 10, 3, 1, 5, 5
OFFSET
4,2
LINKS
FORMULA
a(4) = 1; a(n) = 1 + Sum a(k), k semiprime, k | n-1.
EXAMPLE
a (5) = 2 = 1 + a(4) because 4 | (5-1) and 4 = 2*2 is a semiprime.
a (6) = 1 because there is no semiprime that divides (6-1) = 5, a prime.
a (7) = 2 = 1 + a(6) = 1+1 because 6 | (7-1) and 6 = 2*3 is a semiprime.
a (8) = 1 because there is no semiprime that divides (8-1) = 7, a prime.
a (9) = 2 = 1 + a(4) = 1+1 because 4 | (9-1).
a(10) = 3 = 1 + a(9) = 1+2 because 9 | (10-1) and 9 is a semiprime.
a(11) = 4 = 1 + a(10) = 1+3 because 10 | (11-1) and 10 = 2*5 is a semiprime.
a(12) = 1 because there is no semiprime that divides (12-1) = 11, a prime.
a(13) = 3 = 1 + a(4) + a(6) = 1+1+1 because both 4 and 6 divide into (13-1) = 12 and are semiprimes.
a(14) = 1 because there is no semiprime that divides (14-1) = 13, a prime.
a(15) = 2 = 1 + a(14) = 1+1 because 14 | (15-1).
a(16) = 3 = 1 + a(15) = 1+2 because 15=3*5 is the only semiprime which divides 16-1.
a(17) = 2 = 1 + a(4) = 1+1 because 4 | (17-1) and 4 is the only such semiprime.
MAPLE
a:= proc(n) option remember; 1 +add (`if` (not isprime(k) and add (i[2], i=ifactors(k)[2])=2 and irem (n-1, k)=0, a(k), 0), k=4..n-1) end: seq (a(n), n=4..100); # Alois P. Heinz, Dec 12 2010
MATHEMATICA
a[n_] := a[n] = 1 + Sum[If[!PrimeQ[k] && Total@FactorInteger[k][[All, 2]] == 2 && Mod[n - 1, k] == 0, a[k], 0], {k, 4, n - 1}];
a /@ Range[4, 100] (* Jean-François Alcover, Nov 20 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A137293 A378636 A366254 * A274080 A074641 A069003
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Dec 12 2010
EXTENSIONS
More terms from Alois P. Heinz, Dec 12 2010
STATUS
approved