|
|
A283265
|
|
a(n) = 1 if n is neither 2 nor a lesser or greater twin prime (in A001097), 0 otherwise.
|
|
2
|
|
|
1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
COMMENTS
|
Characteristic sequence of A171821, which is complement of 2 together with the twin primes. (After the original name of the sequence)
The recurrence for this sequence is essentially the sieve of Eratosthenes for the complement of A171821. It is possible to vary the recurrence to get the characteristic sequence of the complement of any prime constellation. The products in the recurrence are over the divisors.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = if n is found in A171821 then 0 else 1.
Recurrence:
t(1, 1) = 1;
t(2, 1) = 0;
t(n, k) = if n = k then 1 else if n > 2 then if k = 1 then (1 - (Product_{i = 2 .. n} t(n, i))*(Product_{i = 2 .. n - 2} t(n - 2, i)))*(1 - (Product_{i = 2 .. n} t (n, i))*Product_{i = 2 .. n + 2} (t(n + 2, i))) else if (mod (n, k) = 0 then t(n/k, 1) else 1) else 1.
|
|
MATHEMATICA
|
(* Recurrence: *) Clear[t, n, k, i, nn]; nn = 90; t[1, 1] = 1; t[2, 1] = 0; t[n_, k_] := t[n, k] = If[n == k, 1, If[n > 2, If[k == 1, (1 - Product[t[n, i], {i, 2, n}]*Product[t[n - 2, i], {i, 2, n - 2}])*(1 - Product[t[n, i], {i, 2, n}]*Product[t[n + 2, i], {i, 2, n + 2}]), If[Mod[n, k] == 0, t[n/k, 1], 1], 1]]]; Monitor[a = Table[t[n, 1], {n, 1, nn}], n]
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|