A053144
Cototient of the n-th primorial number.
Original entry on oeis.org
1, 4, 22, 162, 1830, 24270, 418350, 8040810, 186597510, 5447823150, 169904387730, 6317118448410, 260105476071210, 11228680258518030, 529602053223499410, 28154196550210460730, 1665532558389396767070
Offset: 1
In the reduced residue system of q(4) = 2*3*5*7 - 210 the number of coprimes to 210 is 48, while a(4) = 210 - 48 = 162 is the number of values divisible by one of the prime factors of q(4).
-
Abs[Table[ Total[Table[(-1)^(k + 1)* Total[Apply[Times, Subsets[Table[Prime[n], {n, 1, m}], {k}], 2]], {k, 0, m - 1}]], {m, 1, 22}]] (* Geoffrey Critzer, Apr 08 2010 *)
Array[# - EulerPhi@ # &@ Product[Prime@ i, {i, #}] &, 17] (* Michael De Vlieger, Feb 17 2019 *)
-
a(n) = prod(k=1, n, prime(k)) - prod(k=1, n, prime(k)-1); \\ Michel Marcus, Feb 08 2019
A091440
Smallest number m such that m#/phi(m#) >= n, where m# indicates the primorial (A034386) of m and phi is Euler's totient function.
Original entry on oeis.org
1, 2, 3, 7, 13, 23, 43, 79, 149, 257, 461, 821, 1451, 2549, 4483, 7879, 13859, 24247, 42683, 75037, 131707, 230773, 405401, 710569, 1246379, 2185021, 3831913, 6720059, 11781551, 20657677, 36221753, 63503639, 111333529, 195199289, 342243479, 600036989
Offset: 1
7#/phi(7#) = (2*3*5*7)/(1*2*4*6) = 4.375 >= 4, 5#/phi(5#) = 3.75. Hence a(4) = 7.
-
prod=1; i=0; Table[While[prod
-
al(lim) = local(mm,n,m); mm=3; n=2; m=1; forprime(x=3,lim, n*=x; m*= (x-1); if (n\m >= mm, print1(x","); mm++)); /* This will generate all terms of this sequence from the 3rd onward, up to lim. The computation slows down for large values because of the size of the internal values. */ \\ Fred Schneider, Aug 13 2009, modified by Franklin T. Adams-Watters, Aug 29 2009
Sequence reference in name corrected by
Peter Munn, Apr 29 2017
A161527
Numerators of cumulative sums of rational sequence A038110(k)/A038111(k).
Original entry on oeis.org
1, 2, 11, 27, 61, 809, 13945, 268027, 565447, 2358365, 73551683, 2734683311, 112599773191, 4860900544813, 9968041656757, 40762420985117, 83151858555707, 5085105491885327, 341472595155548909, 24295409051193284539, 1777124696397561611347
Offset: 1
-
Numerator[Table[1 - Product[1 - (1/Prime[k]), {k,1,n}], {n,1,20}]]
-
r(n) = prod(k=1, n-1, (1 - 1/prime(k)))/prime(n);
a(n) = numerator(sum(k=1, n, r(k))); \\ Michel Marcus, Jun 08 2019
A256968
Let b(n) = Product_{i=1..n} p_i/(p_i - 1), p_i = i-th prime; a(n) = minimum k such that b(k) >= n.
Original entry on oeis.org
0, 0, 1, 2, 4, 6, 9, 14, 22, 35, 55, 89, 142, 230, 373, 609, 996, 1637, 2698, 4461, 7398, 12301, 20503, 34253, 57348, 96198, 161659, 272124, 458789, 774616, 1309627, 2216968, 3757384, 6375166, 10828012, 18409028, 31326514, 53354259, 90945529, 155142139
Offset: 0
The sequence b(n) for n >= 0 begins 1, 2, 3, 15/4, 35/8, 77/16, 1001/192, 17017/3072, 323323/55296, 676039/110592, 2800733/442368, 86822723/13271040, 3212440751/477757440, 131710070791/19110297600, 5663533044013/802632499200, ... = A060753/A038110. So a(3) = 2.
-
from sympy import prime
A256968_list, count, bn, bd = [0,0], 2, 1, 1
for k in range(1,10**4):
p = prime(k)
bn *= p
bd *= p-1
while bn >= count*bd:
A256968_list.append(k)
count += 1 # Chai Wah Wu, Apr 17 2015; corrected by Max Alekseyev, Jan 26 2025
A319677
Denominator of A047994(n)/n where A047994 is the unitary totient function.
Original entry on oeis.org
1, 2, 3, 4, 5, 3, 7, 8, 9, 5, 11, 2, 13, 7, 15, 16, 17, 9, 19, 5, 7, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 32, 33, 17, 35, 3, 37, 19, 13, 10, 41, 7, 43, 22, 45, 23, 47, 8, 49, 25, 51, 13, 53, 27, 11, 4, 19, 29, 59, 5, 61, 31, 21, 64, 65, 33, 67, 17, 69, 35, 71
Offset: 1
-
uphi[n_] := Product[{p, e} = pe; p^e - 1, {pe, FactorInteger[n]}];
a[n_] := Denominator[uphi[n]/n];
Array[a, 100] (* Jean-François Alcover, Jan 10 2022 *)
-
a(n)=my(f=factor(n)~); denominator(prod(i=1, #f, f[1, i]^f[2, i]-1)/n);
A061671
Numbers n such that { x +- 2^k : 0 < k < 4 } are primes, where x = 210*n - 105.
Original entry on oeis.org
1, 77, 93, 209, 5197, 7695, 9307, 13442, 13524, 15445, 16192, 28600, 30970, 34228, 36388, 38391, 41625, 50127, 52795, 55546, 69146, 70538, 70642, 70747, 76314, 76642, 90079, 91416, 93496, 94288, 95773, 96415, 101530, 104049, 107559, 118031
Offset: 1
16057, 16061, 16063, 16067, 16069, 16073 are prime and (16065+105)/210= 77= a(2).
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, conjectures following th. 5
-
Select[Range[1, 1000000], Union[PrimeQ[(210*# - 105) + {-8, -4, -2, 2, 4, 8}]] == {True} &]
Select[Range[120000],AllTrue[210#-105+{-8,-4,-2,2,4,8},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 05 2019 *)
More terms from Larry Reeves (larryr(AT)acm.org), Jun 20 2001 and from
Frank Ellermann, Nov 26 2001. Mathematica script from Peter Bertok (peter(AT)bertok.com), Nov 27 2001.
A308121
Irregular triangle read by rows: T(n,k) = A109395(n)*k-A076512(n)*A038566(n,k).
Original entry on oeis.org
0, 1, 1, 2, 1, 1, 1, 2, 3, 4, 2, 1, 1, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 1, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 5, 6, 1, 2, 3, 7, 14, 13, 4, 11, 2, 1, 8
Offset: 1
The sequence as an irregular triangle:
n/k 1, 2, 3, 4, ...
1: 0
2: 1
3: 1, 2
4: 1, 1
5: 1, 2, 3, 4
6: 2, 1
7: 1, 2, 3, 4, 5, 6
8: 1, 1, 1, 1
9: 1, 2, 1, 2, 1, 2
10: 3, 4, 1, 2
11: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
12: 2, 1, 2, 1
13: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
14: 4, 5, 6, 1, 2, 3
15: 7, 14, 13, 4, 11, 2, 1, 8
...
Row sums: 0, 1, 3, 2, 10, 3, 21, 4, 9, 10, 55, 6, 78, 21, 60.
T(14,5) = A109395(14)*5 - A076512(14)*A038566(14,5) = 7*5 - 3*11 = 2.
T(210,2) = A109395(210)*2 - A076512(210)*A038566(210,2) = 35*2 - 8*11 = -18.
-
Flatten@ Table[With[{a = n/GCD[n, #], b = Numerator[#/n]}, MapIndexed[a First@ #2 - b #1 &, Flatten@ Position[GCD[Table[Mod[k, n], {k, n - 1}], n], 1] /. {} -> {1}]] &@ EulerPhi@ n, {n, 15}] (* Michael De Vlieger, Jun 06 2019 *)
-
vtot(n) = select(x->(gcd(n, x)==1), vector(n, k, k));
row(n) = my(q = eulerphi(n)/n, v = vtot(n)); vector(#v, k, denominator(q)*k - numerator(q)*v[k]); \\ Michel Marcus, May 14 2019
A325236
Squarefree k such that phi(k)/k - 1/2 is positive and minimal for k with gpf(k) = prime(n).
Original entry on oeis.org
1, 2, 3, 15, 21, 231, 273, 255, 285, 167739, 56751695, 7599867, 3829070245, 567641679, 510795753, 39169969059, 704463969, 3717740976339, 42917990271, 547701649495, 45484457928390429, 59701280265935165
Offset: 0
First terms of this sequence appear in the chart below between asterisks.
The values of n appear in the header, values of k followed parenthetically by phi(k)/k appear in column n. The x axis plots k according to primepi(gpf(k)), while the y axis plots k according to phi(k)/k:
0 1 2 3 4
. . . . .
-- *1* -----------------------------------------------
(1/1) . . . .
. . . . .
. . . . .
. . . . 7
. . . 5 (6/7)
. . . (4/5) .
. . . . .
. . . . 35
. . *3* . (24/35)
. . (2/3) . .
. . . . .
. . . . .
. . . . *21*
. . . . (4/7)
. . . *15* .
. . . (8/15) .
. *2* . . .
----------(1/2)---------------------------------------
. . . . .
. . . . 105
. . . . (16/35)
. . . . 14
. . . 10 (3/7)
. . . (2/5) .
. . . . .
. . . . 70
. . 6 . (12/35)
. . (1/3) . .
. . . . 42
. . . 30 (2/7)
. . . (4/15) .
. . . . 210
. . . . (8/35)
...
a(3) = 15 for the following reasons. There are 4 possible values of k with n = 3. These are 5, 15, 10, and 30 with phi(k)/k = 4/5, 8/15, 2/5, and 4/15, respectively. Subtracting 1/2 from each of the latter values, we derive 3/10, 1/30, -1/10, and -7/30 respectively. Since the smallest of these differences is 3/10 pertaining to k = 15, a(3) = 15.
-
With[{e = 15}, Map[MinimalBy[#, If[# < 0, # + 1, #] &[#[[2]] - 1/2] &] &, SplitBy[#, Last]] &@ Array[{#2, EulerPhi[#2]/#2, If[! IntegerQ@ #, 0, #] &[1 + Floor@ Log2@ #1]} & @@ {#, Times @@ MapIndexed[Prime[First@ #2]^#1 &, Reverse@ IntegerDigits[#, 2]]} &, 2^(e + 1), 0]][[All, 1, 1]]
A325237
Squarefree k such that 1/2 - phi(k)/k is positive and minimal for k with gpf(k) = prime(n).
Original entry on oeis.org
2, 6, 10, 105, 165, 195, 4641, 5187, 5313, 266133, 8870433, 3068957045, 11063481, 10164297, 667797009, 909411789, 32221169781185, 1963007211216415, 421522466365, 3012887561310445
Offset: 1
First terms of this sequence appear in the chart below between asterisks.
The values of n appear in the header, values of k followed parenthetically by phi(k)/k appear in column n. The x axis plots k according to primepi(gpf(k)), while the y axis plots k according to phi(k)/k:
0 1 2 3 4
. . . . .
--- 1 ------------------------------------------------
(1/1) . . . .
. . . . .
. . . . .
. . . . 7
. . . 5 (6/7)
. . . (4/5) .
. . . . .
. . . . 35
. . 3 . (24/35)
. . (2/3) . .
. . . . .
. . . . .
. . . . 21
. . . . (4/7)
. . . 15 .
. . . (8/15) .
. *2* . . .
----------(1/2)---------------------------------------
. . . . .
. . . . *105*
. . . . (16/35)
. . . . 14
. . . *10* (3/7)
. . . (2/5) .
. . . . .
. . . . 70
. . *6* . (12/35)
. . (1/3) . .
. . . . 42
. . . 30 (2/7)
. . . (4/15) .
. . . . 210
. . . . (8/35)
...
a(3) = 10 for the following reasons. There are 4 possible values of k with n = 3. These are 5, 15, 10, and 30 with phi(k)/k = 4/5, 8/15, 2/5, and 4/15, respectively. Subtracting each of the latter values from 1/2, we derive -3/10, -1/30, 1/10, and 7/30 respectively. Since the smallest of these differences is 1/10 pertaining to k = 10, a(3) = 10.
-
With[{e = 20}, Map[MinimalBy[#, If[# > 0, # + 1, Abs@ #] &[#[[2]] - 1/2] &] &, SplitBy[#, Last]] &@ Array[{#2, EulerPhi[#2]/#2, If[! IntegerQ@ #, 0, #] &[1 + Floor@ Log2@ #1]} & @@ {#, Times @@ MapIndexed[Prime[First@ #2]^#1 &, Reverse@ IntegerDigits[#, 2]]} &, 2^e - 1]][[All, 1, 1]]
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
Comments