A141122 Duplicate of A068228.
13, 37, 61, 73, 97, 109, 157, 181, 193, 229, 241, 277, 313, 337
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
Filtered(List([1..100],n->6*n-1),IsPrime); # Muniru A Asiru, May 19 2018
a007528 n = a007528_list !! (n-1) a007528_list = [x | k <- [0..], let x = 6 * k + 5, a010051' x == 1] -- Reinhard Zumkeller, Jul 13 2012
select(isprime,[seq(6*n-1,n=1..100)]); # Muniru A Asiru, May 19 2018
Select[6 Range[100]-1,PrimeQ] (* Harvey P. Dale, Feb 14 2011 *)
forprime(p=2, 1e3, if(p%6==5, print1(p, ", "))) \\ Charles R Greathouse IV, Jul 15 2011
forprimestep(p=5,1000,6, print1(p", ")) \\ Charles R Greathouse IV, Mar 03 2025
a(1) = 17 = 2 * 8 + 1 = (10001)_2. All numbers m from [0, 17) with the Hamming distance D(m, 17) = 2 are 0, 3, 5, 9. For m = 0, we can take h = 3, since 3 is drawn from (0, 17) and D(0, 3) = 2; for m = 3, we can take h = 5, since 5 from (3, 17) and D(3, 5) = 2; for m = 5, we can take h = 6, since 6 from (5, 17) and D(5, 6) = 2; for m = 9, we can take h = 10, since 10 is drawn from (9, 17) and D(9, 10) = 2. - _Vladimir Shevelev_, Apr 18 2012
a007519 n = a007519_list !! (n-1) a007519_list = filter ((== 1) . a010051) [1,9..] -- Reinhard Zumkeller, Mar 06 2012
[p: p in PrimesUpTo(2000) | p mod 8 eq 1 ]; // Vincenzo Librandi, Aug 21 2012
Select[1 + 8 Range@ 170, PrimeQ] (* Robert G. Wilson v *)
forprime(p=2,1e4,if(p%8==1,print1(p", "))) \\ Charles R Greathouse IV, Jun 16 2011
forprimestep(p=17,10^4,8, print1(p", ")) \\ Charles R Greathouse IV, Jul 17 2024
lista(nn)= my(vpr = []); for (x = 0, nn, y = 0; while ((v = x^2+6*x*y+y^2) < nn, if (isprime(v), if (! vecsearch(vpr, v), vpr = concat(vpr, v); vpr = vecsort(vpr););); y++;);); vpr; \\ Michel Marcus, Feb 01 2014
A007519_upto(N, start=1)=select(t->t%8==1,primes([start,N])) #A7519=A007519_upto(10^5) A007519(n)={while(#A7519A007519_upto(N*3\2, N+1))); A7519[n]} \\ M. F. Hasler, May 22 2025
# uses[binaryQF] # The function binaryQF is defined in the link 'Binary Quadratic Forms'. Q = binaryQF([1, 4, -4]) print(Q.represented_positives(1361, 'prime')) # Peter Luschny, Jan 26 2017
a007522 n = a007522_list !! (n-1) a007522_list = filter ((== 1) . a010051) a004771_list -- Reinhard Zumkeller, Jan 29 2013
[p: p in PrimesUpTo(2000) | p mod 8 eq 7]; // Vincenzo Librandi, Jun 26 2014
select(isprime, [seq(i,i=7..10000,8)]); # Robert Israel, Nov 22 2016
Select[8Range[200] - 1, PrimeQ] (* Alonso del Arte, Nov 07 2016 *)
(A007522(m) = local(p, s, x, z); forprime(p = 3, m, s = []; for(x = 0, p-1, if(x^4%p == 2%p, s = concat(s, [x]))); z = matsize(s)[2]; if(z == 2, print1(p, ", ")))); A007522(1400) \\ Does not return a(m) but prints all terms <= m. - Edited to make it executable by M. F. Hasler, May 22 2025.
A007522_upto(N, start=1)=select(p->p%8==7, primes([start, N])) #A7522=A007522_upto(10^5) A007522(n)={while(#A7522A007522_upto(N*3\2, N+1))); A7522[n]} \\ M. F. Hasler, May 22 2025
Filtered(Concatenation([5],Flat(List([1..140],k->[5*k-1,5*k+1]))),IsPrime); # Muniru A Asiru, Nov 24 2018
[ p: p in PrimesUpTo(700) | p mod 5 in {0,1,4}]; // Vincenzo Librandi, Aug 21 2012
select(isprime, [5, seq(op([5*k-1,5*k+1]),k=1..1000)]); # Robert Israel, Dec 22 2014
Join[{5}, Select[Prime[Range[4, 100]], Mod[#, 5] == 1 || Mod[#, 5] == 4 &]] (* Alonso del Arte, Nov 27 2011 *)
forprime(p=2,1e3,if(kronecker(5,p)>=0,print1(p", "))) \\ Charles R Greathouse IV, Jun 16 2011
Union[QuadPrimes2[7, 4, 52, 10000], QuadPrimes2[7, -4, 52, 10000]] (* see A106856 *)
13 == 1 (mod 3) and 1 is a square, so 3 is on the list. 101 is prime and congruent to 7^2 = 49 == 10 (mod 13), so 101 is on the list.
Select[ Prime@ Range@ 118, JacobiSymbol[ #, 13] > -1 &] (* Robert G. Wilson v, May 16 2008 *) Select[Flatten[Table[13n + {1, 3, 4, 9, 10, 12}, {n, 50}]], PrimeQ[#] &] (* Alonso del Arte, Sep 16 2012 *)
forprime(p=3,1e3,if(issquare(Mod(13,p)),print1(p", "))) \\ Charles R Greathouse IV, Jul 15 2011
select( {is_A038883(n)=bittest(5659,n%13)&&isprime(n)}, [0..666]) \\ M. F. Hasler, Feb 17 2022
# uses[binaryQF] # The function binaryQF is defined in the link 'Binary Quadratic Forms'. Q = binaryQF([1, 3, -1]) print(Q.represented_positives(641, 'prime')) # Peter Luschny, Sep 20 2018
di[x_] := Divisors[x] dp[x_] := Part[di[x], Flatten[Position[PrimeQ[1+di[x]], True]]]+1 Do[s=Length[dp[n]]; If[Equal[s, 2], Print[n]], {n, 1, 10000}] (* Labos Elemer *) Do[s=Denominator[BernoulliB[n]]; If[Equal[s, 6], Print[n]], {n, 1, 1000}] (* Labos Elemer *) Do[s=1+Divisors[n];s1=Flatten[Position[PrimeQ[s], True]]; (*analogous [suitably modified] pairs of programs yield A051225-A051230*) s2=Part[s, s1];If[Equal[s2, {2, 3}], Print[n]], {n, 1, 100}] (* Labos Elemer *) Select[Range[600],Denominator[BernoulliB[#]]==6&] (* Harvey P. Dale, Dec 08 2011 *)
for(n=1,10^3,if(denominator(bernfrac(n))==6,print1(n,", "))); \\ Joerg Arndt, Oct 28 2014
is(n)=if(n%2,return(0)); fordiv(n/2,d,if(isprime(2*d+1)&&d>1, return(0))); 1 \\ Charles R Greathouse IV, Oct 28 2014
QuadPrimes2[1, 0, 15, 10000] (* see A106856 *) Select[Prime@Range[250], MemberQ[{1, 19}, Mod[#, 30]] &] (* Vincenzo Librandi, Apr 05 2015 *)
select(n->n%30==1||n%30==19, primes(100)) \\ Charles R Greathouse IV, Nov 09 2012
is(p)=issquare(Mod(p,15))&&isprime(p) \\ M. F. Hasler, Jan 15 2016
Comments
References
Links
Crossrefs
Programs
Mathematica
PARI
Extensions