cp's OEIS Frontend

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.

A177803 The number of lines in the analog of Pratt primality certificate for the n-th semiprime.

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Dec 12 2010

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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 *)

Formula

a(4) = 1; a(n) = 1 + Sum a(k), k semiprime, k | n-1.

Extensions

More terms from Alois P. Heinz, Dec 12 2010