A319148
Irregular triangle T(n,m) where row n lists differences m = j*p - r - 1, with iterator 1 <= j <= A002110(n), p = prime(n+1), and r is the smallest number that exceeds j*p that is coprime to A002110(n+1).
Original entry on oeis.org
0, 1, 0, 1, 0, 1, 2, 3, 0, 3, 2, 1, 0, 1, 0, 3, 2, 3, 0, 1, 4, 5, 2, 1, 0, 1, 0, 3, 2, 1, 2, 1, 0, 3, 4, 1, 0, 5, 0, 1, 0, 3, 2, 3, 0, 1, 0, 1, 2, 5, 4, 5, 2, 1, 2, 3, 0, 1, 0, 1, 4, 3, 4, 1, 2, 1, 2, 3, 0, 5, 0, 3, 2, 3, 0, 1, 0, 1, 2, 5, 0, 5, 2, 3, 2, 3, 0, 1, 0, 1, 4, 3, 4, 1, 0, 1
Offset: 1
Triangle begins:
0;
1,0;
1,0,1,2,3,0;
3,2,1,0,1,0,3,2,3,0,1,4,5,2,1,0,1,0,3,2,1,2,1,0,3,4,1,0,5,0;
...
For n = 2, we have s = {2,3,5}, with p = prime(n+1) = 5, P = A002110(2) = 6, and Q = A002110(3) = 30. Then R = row n of A286941 = {1, 7, 11, 13, 17, 19, 23, 29} (we add 31 to this list since we are concerned with the residue that is larger than the largest k and since 31 is the ensuing number coprime to Q). The series of multiples k = j*p are the multiples 5j with 1 <= j <= P, thus {5, 10, 15, 20, 25, 30}. In R, the smallest residues that exceed the multiples k in the immediately aforementioned list are {7, 11, 17, 23, 29, 31}. The differences are {7 - 5, 11 - 10, 17 - 15, 23 - 20, 29 - 25, 31 - 30} or {2, 1, 2, 3, 4, 1}; subtracting one from each we have row 2 = {1, 0, 1, 2, 3, 0}.
For example, the third value on row n=20000 is 15, so all values in the range (3 * prime(20000) + i) to (3 * prime(20000) + i) for 1 <= i <= 15 have at least one prime factor <= prime(n).
-
rowToCreate = 3; (* create row n *)
redundantDistanceToCheck = 1; (* set to 2 or higher to see n repeating
patterns of length primorial[rowToCreate] *)
Primorial[n_] := Times @@ Prime[Range[n]]
rowValue = 0;
primeToUse = Prime[rowToCreate];
distanceToCheck1 = redundantDistanceToCheck*Primorial[rowToCreate];
(* distanceToCheck1=rowToCreate*10000; *)(* uncomment this second option to create the first few values in very large rows up to rowToCreate=7000000000000 *)
For[i = primeToUse, i < distanceToCheck1 + 1, i = i + primeToUse,
For[x = i + 1, x < distanceToCheck1 + 2, x++,
If[FactorInteger[x][[1, 1]] < primeToUse, rowValue++; , x =
distanceToCheck1 + 2;
Print[rowValue];
rowValue = 0;
]]] (* Jamie Morken, Sep 11 2018 *)
(* Program to check the number of composites referenced to row
values: *)
Row = 100;
ColumnOnTheRow = 12;
Print["composites>", ColumnOnTheRow*Prime[Row], "=",
(NextPrime[ColumnOnTheRow*Prime[Row]]) -
(ColumnOnTheRow*Prime[Row]) - 1];
(* Second program: *)
Table[Block[{s = Prime@ Range[n + 1], p, P, Q}, p = Last@ s; P = Times @@
Most@ s; Q = Times @@ s; Array[Block[{k = 1}, While[! CoprimeQ[k + p #,
Q], k++]; k - 1] &, P]], {n, 4}] // Flatten (* Michael De Vlieger, Sep 11 2018 *)
A332772
Numbers k > 0 such that 30k +- 7 is prime.
Original entry on oeis.org
1, 2, 3, 4, 9, 10, 12, 13, 15, 19, 20, 25, 26, 29, 32, 33, 37, 41, 43, 48, 52, 53, 54, 58, 66, 67, 76, 78, 81, 85, 88, 89, 90, 92, 95, 97, 101, 107, 118, 120, 121, 128, 129, 134, 143, 150, 153, 155, 165, 166, 172, 178, 180, 194, 195, 202, 207, 209, 211, 212
Offset: 1
a(4)=4 for prime(30)=113=4*30-7 and prime(31)=127=4*30+7.
a(5)=9 for prime(56)=263=9*30-7 and prime(59)=277=9*30+7.
-
Select[Range@ 215, AllTrue[30 # + {-7, 7}, PrimeQ] &] (* Michael De Vlieger, Feb 25 2020 *)
-
S = 1
do N = 2 while length( S ) < 255
if NOPRIME( N * 30 + 7 ) then iterate N
if NOPRIME( N * 30 - 7 ) then iterate N
S = S || ',' N
end N
say S
A343119
Number of compositions (ordered partitions) of the n-th primorial into distinct parts.
Original entry on oeis.org
1, 1, 11, 41867, 517934206090276988507, 42635439758725572299058305546953458030363703549127905691758491973278624456679699932948789006991639715987
Offset: 0
-
b:= proc(n) b(n):= `if`(n=0, 1, b(n-1)*ithprime(n)) end:
g:= proc(n, k) option remember; `if`(k<0 or n<0, 0,
`if`(k=0, `if`(n=0, 1, 0), g(n-k, k)+k*g(n-k, k-1)))
end:
a:= n-> add(g(b(n), k), k=0..floor((sqrt(8*b(n)+1)-1)/2)):
seq(a(n), n=0..5);
-
$RecursionLimit = 5000;
b[n_] := If[n == 0, 1, b[n - 1]*Prime[n]];
g[n_, k_] := g[n, k] = If[k < 0 || n < 0, 0,
If[k == 0, If[n == 0, 1, 0], g[n - k, k] + k*g[n - k, k - 1]]];
a[n_] := Sum[g[b[n], k], {k, 0, Floor[(Sqrt[8*b[n] + 1] - 1)/2]}];
Table[a[n], {n, 0, 5}] (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)
A355036
a(n) is the least number whose product of digits in primorial base equals n.
Original entry on oeis.org
0, 1, 5, 21, 17, 159, 23, 1509, 29, 111, 161, 25659, 83, 392949, 1511, 171, 89, 8711259, 113, 184837209, 167, 1521, 25661, 5141378799, 119, 1209, 392951, 741, 1517, 187854439329, 173, 6224078222919, 149, 25671, 8711261, 1629, 203, 274774574506989, 184837211
Offset: 0
The first terms, alongside their primorial base expansion, are:
n a(n) pr(a(n))
-- --------- ------------------
0 0 0
1 1 1
2 5 2_1
3 21 3_1_1
4 17 2_2_1
5 159 5_1_1_1
6 23 3_2_1
7 1509 7_1_1_1_1
8 29 4_2_1
9 111 3_3_1_1
10 161 5_1_2_1
11 25659 11_1_1_1_1_1
12 83 2_3_2_1
13 392949 13_1_1_1_1_1_1
-
a(n) = { if (n==0, 0, my (v=0, f=1); forprime (r=2, oo, forstep (d=r-1, 1, -1, if (n%d==0, v+=f*d; n/=d; break;);); if (n==1, return (v), f*=r))) }
A359632
Sequence of gaps between deletions of multiples of 7 in step 4 of the sieve of Eratosthenes.
Original entry on oeis.org
12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3
Offset: 1
After sieve step 3, multiples of 2,3,5 have been eliminated leaving
7,11,13,17,19,23,29,31,37,41,43,47,49,53, ...
^ ^
The first two multiples of 7 are 7 itself and 49 and they are distance 12 apart in the list so that a(1) = 12.
For n = 2, a(n) = 7, because the third multiple of 7 that is not a multiple of 2, 3 or 5 is 77 = 7 * 11, which is located 7 numbers after 49 = 7*7 in the list of numbers without the multiples of 2, 3 and 5.
-
PadRight[{}, 100, {12, 7, 4, 7, 4, 7, 12, 3}] (* Paolo Xausa, Jul 01 2024 *)
-
numbers = []
for i in range(2,880):
numbers.append(i)
gaps = []
step = 4
current_step = 1
while current_step <= step:
prime = numbers[0]
new_numbers = []
gaps = []
gap = 0
for i in range(1,len(numbers)):
gap += 1
if numbers[i] % prime != 0:
new_numbers.append(numbers[i])
else:
gaps.append(gap)
gap = 0
current_step += 1
numbers = new_numbers
print(gaps)
A381287
a(n) is the smallest nonnegative number congruent to k modulo prime(k)^(n-k+1) for k=1..n.
Original entry on oeis.org
1, 5, 353, 65153, 119966753, 3050486978753, 563678198162618753, 15413934869729743026218753, 1710386933322832904060816574218753, 14712401204424400291787297607394206774218753, 5027982881016562571248237683551040219315980699574218753, 5488604004979149030407333271782173318791620565366546226763574218753
Offset: 1
For n=3, a(3)=353 since 353 is the smallest nonnegative integer x satisfying:
x == 1 (mod 2^3),
x == 2 (mod 3^2),
x == 3 (mod 5^1).
-
ToString[Table[ChineseRemainder[Range[n], (Prime /@ Range[n])^Range[n, 1, -1]], {n, 12}]]
A382789
The number of prime factors of Euler phi of the n-th primorial number, counted with multiplicity.
Original entry on oeis.org
0, 0, 1, 3, 5, 7, 10, 14, 17, 19, 22, 25, 29, 33, 36, 38, 41, 43, 47, 50, 53, 58, 61, 63, 67, 73, 77, 80, 82, 87, 92, 96, 99, 103, 106, 109, 113, 117, 122, 124, 127, 129, 134, 137, 144, 148, 152, 156, 159, 161, 165, 169, 172, 178, 182, 190, 192, 195, 200, 204
Offset: 0
-
Join[{0}, Accumulate[PrimeOmega[Prime[Range[100]] - 1]]]
-
list(nmax) = {my(s = 0, c = 0); print1(s, ", "); forprime(p = 1, , c++; s += bigomega(p-1); print1(s, ", "); if(c == nmax, break));}
A048980
Difference between number of nonprimes and primes in reduced residue system of primorial numbers.
Original entry on oeis.org
1, 1, 0, -6, -36, -196, -724, 7512, 366838, 11928316, 421130508, 14598816402, 584642184936, 25314953837836, 1128885572358548, 54492272309366314, 2950485568862138250, 213151926413154110951
Offset: 0
n=4, Q(4)=2*3*5*7=210, reduced residue system includes 48 terms:42 primes and 6 composites and 1: a(4)=6-42=-36.
-
Table[Function[P, EulerPhi@ P - 2 # &[PrimePi@ P - n]]@ Product[Prime@ i, {i, n}], {n, 0, 12}] (* Michael De Vlieger, May 08 2017 *)
A066264
Number of composites < primorial(p) with all prime factors > p.
Original entry on oeis.org
0, 0, 0, 5, 141, 2517, 49835, 1012858, 24211837, 721500293, 22627459400, 844130935667, 34729870646917, 1491483322755273, 69890000837179156
Offset: 1
There are 5 composites < primorial(7) or 210 and whose prime factors are all larger than 7: 121 (11*11), 143 (11*13), 169 (13*13), 187 (11*17) and 209 (11*19).
- Eric Weisstein's World of Mathematics, Primorial
-
Array[#1 + EulerPhi@ #2 - PrimePi@ #2 - 1 & @@ {#, Product[Prime@ i, {i, #}]} &, 12] (* Michael De Vlieger, Apr 03 2019 *)
More terms from Dennis Martin (dennis.martin(AT)dptechnology.com), Apr 15 2007
Offset corrected by Charles J. Daniels (chajadan(AT)gmail.com), Dec 06 2009
A234299
a(n) = |A| is the smallest order of a set A of consecutive integers which has Euler-phi(3*5*7*11*...*Pn) members coprime to 3*5*7*..*Pn, where Pn is the n-th odd prime.
Original entry on oeis.org
2, 13, 101, 1149, 15005, 255243, 4849829, 111546416, 3234846593, 100280245037, 3710369067373, 152125131763569, 6541380665834971, 307444891294245656, 16294579238595022313, 961380175077106319477, 58644190679703485491570, 3929160775540133527939470
Offset: 1
a(1)=2, phi(3) = 2, A={1,2 }, B={1,2}, |B|=2 gcd(1,3) = 1; gcd(2,3) = 1; minimum(|A|) = 2.
a(2)=13, phi(3*5) = 8, A={7,8,9,10,...,19}, B={7, 8, 11, 13, 14, 16, 17, 19}, |B|=8, A was chosen so |A| is a minimum.
Comments