A369107
a(n) is the number of numbers less than or equal to 10^n that are divisible only by primes congruent to 3 mod 4.
Original entry on oeis.org
4, 26, 201, 1680, 14902, 135124, 1243370, 11587149, 108941388, 1031330156, 9816605847
Offset: 1
-
a[n_] := Length[Join[{1}, Select[Range[10^n], PrimeQ[f = First/@FactorInteger[#]] == Table[True, {j,PrimeNu[#]}] && Mod[f,4] == Table[3, {m,PrimeNu[#]}] && #<=10^n &]]]; Array[a, 10]
-
is1(n) = {my(p = factor(n)[, 1]); for(i = 1, #p, if(p[i] % 4 == 1, return(0))); 1;};
lista(nmax) = {my(c = 0, pow = 10, n = 1, nm = nmax + 1); forstep(k = 1, 10^nmax + 1, 2, if(k > pow, print1(c, ", "); pow *= 10; n++; if(n == nm, break)); if(is1(k), c++));} \\ Amiram Eldar, Jun 03 2024
A369108
a(n) is the number of numbers less than or equal to 10^n that are divisible only by primes congruent to 1 mod 4.
Original entry on oeis.org
2, 15, 123, 1074, 9623, 87882, 814183, 7618317, 71838469, 681591775, 6499182987
Offset: 1
-
a[n_] := Length[Join[{1}, Select[Range[10^n], PrimeQ[f = First/@FactorInteger[#]] == Table[True, {j,PrimeNu[#]}] && Mod[f,4] == Table[1, {m,PrimeNu[#]}] && #<=10^n &]]]; Array[a, 9]
-
is1(n) = n % 4 == 1 && factorback(factor(n)[, 1] % 4) == 1 \\ Charles R Greathouse IV at A004613
lista(nmax) = {my(c = 0, pow = 10, n = 1, nm = nmax + 1); for(k = 1, 10^nmax + 1, if(k > pow, print1(c, ", "); pow *= 10; n++; if(n == nm, break)); if(is1(k), c++));} \\ Amiram Eldar, Jun 03 2024
A369109
a(n) is the number of pairs of twin primes p and p+2 both less than or equal to 10^n such that p is congruent to 1 modulo 4.
Original entry on oeis.org
1, 4, 19, 105, 604, 4046, 29482, 220419, 1712731, 13706592, 112196635, 935286453
Offset: 1
-
a[n_] := Length[Select[Range[10^n-2], PrimeQ[#] && PrimeQ[#+2] && Mod[#,4] == 1 &]]; Array[a,10]
-
lista(nmax) = {my(prev = 2, c = 0, pow = 10, n = 1, nm = nmax + 1); forprime(p = 3, , if(p > pow, print1(c, ", "); pow *= 10; n++; if(n == nm, break)); if(prev % 4 == 1 && p == prev + 2, c++); prev = p);} \\ Amiram Eldar, Jun 03 2024
A369111
a(n) is the number of primes p less than or equal to 10^n such that p+2 has only prime factors congruent to -1 modulo 4.
Original entry on oeis.org
2, 12, 65, 388, 2708, 19969, 155369, 1250182, 10345920, 87545946, 753285178, 6571105993
Offset: 1
a(2) = 12 since there are 12 primes p less than or equal to 10^2 such that p+2 has only prime factors congruent to -1 modulo 4 (cf. A369105): 5, 7, 17, 19, 29, 31, 41, 47, 61, 67, 79, 97.
-
a[n_] := Length[Select[Prime[Range[10^n]], PrimeQ[f=First/@FactorInteger[#+2]] == Table[True, {j,PrimeNu[#+2]}] && Mod[f,4] == Table[3, {m,PrimeNu[#+2]}] && #<=10^n &]]; Array[a,10]
-
is1(n) = {my(p = factor(n)[, 1]); for(i = 1, #p, if(p[i] % 4 == 1, return(0))); 1;};
lista(nmax) = {my(c = 0, pow = 10, n = 1, nm = nmax + 1); forprime(p = 3, , if(p > pow, print1(c, ", "); pow *= 10; n++; if(n == nm, break)); if(is1(p+2), c++));} \\ Amiram Eldar, Jun 03 2024
Showing 1-4 of 4 results.