login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Divisible only by primes congruent to 7 mod 8.
1

%I #10 Oct 26 2023 00:46:16

%S 1,7,23,31,47,49,71,79,103,127,151,161,167,191,199,217,223,239,263,

%T 271,311,329,343,359,367,383,431,439,463,479,487,497,503,529,553,599,

%U 607,631,647,713,719,721,727,743

%N Divisible only by primes congruent to 7 mod 8.

%H Vincenzo Librandi, <a href="/A004628/b004628.txt">Table of n, a(n) for n = 1..1000</a>

%t ok[1]=True;ok[n_]:=And@@(Mod[#,8]==7&)/@FactorInteger[n][[All,1]];Select[Range[3000],ok] (* _Vincenzo Librandi_, Aug 20 2012 *)

%o (Magma) [n: n in [1..1000] | forall{d: d in PrimeDivisors(n) | d mod 8 eq 7}]; // _Vincenzo Librandi_, Aug 20 2012

%K nonn

%O 1,2

%A _N. J. A. Sloane_

%E Offset changed from 0 to 1 by _Vincenzo Librandi_, Aug 20 2012