OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..500
EXAMPLE
a(7) = 10 is a term because the only odd prime dividing 10 is 5, and the previous prime 3 divides 10 - 1 = 9.
a(8) = 16 is a term because 16 is not divisible by any odd prime.
a(9) = 21 is a term because the odd primes dividing 21 are 3 and 7, and 2 (the prime previous to 3) and 5 (the prime previous to 7) both divide 21 - 1 = 20.
MAPLE
filter:= n -> andmap(p -> n-1 mod prevprime(p) = 0, numtheory:-factorset(n) minus {2}):
select(filter, [$1..3000]);
MATHEMATICA
Select[Range[2450], Function[k, Or[IntegerQ@ Log2[k], AllTrue[FactorInteger[k/2^IntegerExponent[k, 2] ][[All, 1]], Divisible[k - 1, NextPrime[#, -1] ] &] ] ] ] (* Michael De Vlieger, Dec 03 2024 *)
PROG
(PARI) isok(k) = my(f=factor(k)); for (i=1, #f~, if ((f[i, 1] % 2) && ((k-1) % precprime(f[i, 1]-1)), return(0))); return(1); \\ Michel Marcus, Dec 02 2024
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Robert Israel, Dec 02 2024
STATUS
approved