OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
The prime signatures of the first 12 terms are:
-- ------- ------------ -----------------------------
1 1 {} 0
2 12 {2,1} 1
3 48 {4,1} 1
4 72 {3,2} 1
5 192 {6,1} 1
6 288 {5,2} 1
7 432 {4,3} 1
8 768 {8,1} 1
9 1152 {7,2} 1
10 1260 {2,2,1,1} 2
11 1728 {6,3} 1
12 2592 {5,4} 1
MATHEMATICA
fun[p_, e_] := (-1)^e; q[n_] := Module[{f = FactorInteger[n]}, n == 1 || (f[[-1, 1]] == Prime[Length[f]] && Max@ Differences[f[[;; , 2]]] < 1 && Plus @@ fun @@@ f == 0)]; Select[Range[3*10^5], q]
PROG
(PARI) is(n) = {my(f = factor(n), p = f[, 1], e = f[, 2]); n == 1 || (prime(#p) == p[#p] && e == vecsort(e, , 4) && sum(i = 1, #e, (-1)^e[i]) == 0); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Mar 29 2024
STATUS
approved