A255602 Numbers k which are odd and squarefree and have the property that k is either a prime number or for every prime p dividing k, p+1 is not divisible by any of the other prime factors of k.
1, 3, 5, 7, 11, 13, 17, 19, 21, 23, 29, 31, 35, 37, 39, 41, 43, 47, 53, 55, 57, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 93, 97, 101, 103, 107, 109, 111, 113, 115, 119, 127, 129, 131, 133, 137, 139, 143, 149, 151, 155
Offset: 1
Keywords
Examples
15 is not in the sequence since its two prime factors are 3 and 5, and 5+1 is divisible by 3.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
fQ[n_] := Block[{fi = FactorInteger@ n}, ffi = First@# & /@ fi; Times @@ (Last@# & /@ fi) == 1 && Min@ Flatten@ Table[ Mod[1 + ffi, i], {i, ffi}] > 0]; fQ[1] = True; fQ[2] = False; Select[ Range@ 190, fQ]
-
PARI
isok(n) = {if (! ((n % 2) && issquarefree(n)), return (0)); vpf = factor(n)[, 1]; for (i=1, #vpf, vpx = vpf[i]+1; for (j=1, #vpf, if (! (vpx % vpf[j]), return (0)); ); ); return (1); } \\ Michel Marcus, Mar 02 2015
Comments