cp's OEIS Frontend

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.

Previous Showing 11-20 of 22 results. Next

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

Views

Author

Labos Elemer, Feb 28 2000

Keywords

Comments

a(n) > A005367(n), a(n) > A002110(n)/2.
Limit_{n->oo} a(n)/A002110(n) = 1 because (in the limit) the quotient is the probability that a randomly selected integer contains at least one of the first n primes in its factorization. - Geoffrey Critzer, Apr 08 2010

Examples

			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).
		

Crossrefs

Cf. A000040 (prime numbers).
Column 1 of A281891.

Programs

  • Mathematica
    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 *)
  • PARI
    a(n) = prod(k=1, n, prime(k)) - prod(k=1, n, prime(k)-1); \\ Michel Marcus, Feb 08 2019

Formula

a(n) = A051953(A002110(n)) = A002110(n) - A005867(n).
a(n) = a(n-1)*A000040(n) + A005867(n-1). - Bob Selcoe, Feb 21 2016
a(n) = (1/A000040(n+1) - A038110(n+1)/A038111(n+1))*A002110(n+1). - Jamie Morken, Feb 08 2019
a(n) = A161527(n)*A002110(n)/A060753(n+1). - Jamie Morken, May 13 2022

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

Views

Author

T. D. Noe, Jan 09 2004

Keywords

Comments

Does the ratio of adjacent terms converge?
It appears that lim_{n->infinity} a(n+1)/a(n) = 1.7532... - Jon E. Schoenfield, Feb 21 2019
For n > 1, a(n) is smallest prime p = prime(k) such that no fewer than (n-1)/n of any p# consecutive integers are divisible by a prime not greater than p. Cf. A053144(k)/A002110(k). - Peter Munn, Apr 29 2017
Also, the smallest prime p such that the sum of the reciprocals of the p-smooth numbers converges to at least n. - Keith F. Lynch, Apr 29 2023
Also, if m is a random integer much larger than the square of a(n), and m is not divisible by any prime less than or equal to a(n), the probability that m is prime is n/log(m). - Keith F. Lynch, Dec 17 2023

Examples

			7#/phi(7#) = (2*3*5*7)/(1*2*4*6) = 4.375 >= 4, 5#/phi(5#) = 3.75. Hence a(4) = 7.
		

Crossrefs

Programs

  • Mathematica
    prod=1; i=0; Table[While[prod
    				
  • PARI
    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

Formula

a(n) = prime(A005579(n)) for n >= 4. - Amiram Eldar, Apr 18 2025

Extensions

More terms from David W. Wilson, Sep 28 2005
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

Views

Author

Daniel Tisdale, Jun 12 2009

Keywords

Comments

By rewriting the sequence of sums as 1 - Product_{n>=1} (1 - 1/prime(n)), one can show that the product goes to zero and the sequence of sums converges to 1. This is interesting because the terms approach 1/(2*prime(n)) for large n, and a sum of such terms might be expected to diverge, since Sum_{n>=1} 1/(2*prime(n)) diverges.
Denominators appear to be given by A060753(n+1). - Peter Kagey, Jun 08 2019
A254196 appears to be a duplicate of this sequence. - Michel Marcus, Aug 05 2019

Crossrefs

Programs

  • Mathematica
    Numerator[Table[1 - Product[1 - (1/Prime[k]), {k,1,n}], {n,1,20}]]
  • PARI
    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

Formula

a(n) = A053144(n)/A058250(n). - Jamie Morken, Aug 28 2022

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

Views

Author

N. J. A. Sloane, Apr 17 2015

Keywords

Comments

A001611 is similar but different.
Equal to A005579 except for n = 2 and n = 3. The following argument shows that they are equal for n > 3. First note that b(k+1) > b(k). Next, Product_{i=1..k} p_i is 2 times an odd number, i.e., it is not divisible by 4. Similarly since p_i - 1 is even for i > 1, Product_{i=1..k} (p_i - 1) is divisible by 2^(k-1), i.e., it is divisible by 4 for k >= 3. Thus b(k) is not an integer for k >= 3. Since b(3) = 15/4 > 3, this means that a(n) = A005579(n) for n > 3 - Chai Wah Wu, Apr 17 2015

Examples

			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.
		

Crossrefs

Programs

  • Python
    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

Extensions

More terms from Chai Wah Wu, Apr 17 2015
a(32)-a(33) from Chai Wah Wu, Apr 19 2015
a(0)-a(1) corrected and a(34)-a(39) copied over from A005579 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

Views

Author

Michel Marcus, Sep 26 2018

Keywords

Crossrefs

Cf. A047994, A030163, A305678, A319481, A319676 (numerators), A323409, A331177 (ordinal transform).

Programs

  • Mathematica
    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 *)
  • PARI
    a(n)=my(f=factor(n)~); denominator(prod(i=1, #f, f[1, i]^f[2, i]-1)/n);

Formula

a(p) = p, for p prime.
a(A002110(n)) = A060753(n).
a(n) = n / A323409(n) = n / gcd(n, A047994(n)). - Antti Karttunen, Jan 11 2020

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

Views

Author

Frank Ellermann, Jun 16 2001

Keywords

Comments

This sequence does not include the sextet (7,11,13,17,19,23). It is a proper subset of A014561 in a certain sense.

Examples

			16057, 16061, 16063, 16067, 16069, 16073 are prime and (16065+105)/210= 77= a(2).
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, conjectures following th. 5

Crossrefs

210 = 7*5*3*2 = A002110(4), cf. A014561.

Programs

  • Mathematica
    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 *)

Extensions

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

Views

Author

Jamie Morken, May 13 2019

Keywords

Comments

Row n has length A000010(n).
Row n > 1 has sum = n*A076512(n)/2.
First value on row(n) = A076511(n).
Last value on row(n) = A076512(n) for n > 1.
For n > 1, A109395(n) = Max(row) + Min(row).
For values x and y on row n > 1 at positions a and b on the row:
x + y = A109395(n), where a = A000010(n) - (b-1).
For n > 2 the penultimate value on row A002110(n) is given by
From Charlie Neder, Jun 05 2019: (Start)
If p is a prime dividing n, then row p*n consists of p copies of row n.
Conjecture: If n is odd, then row 2n can be obtained from row n by interchanging the first and second halves. (End)

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    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

Views

Author

Michael De Vlieger, Apr 19 2019

Keywords

Comments

Let gpf(k) = A006530(k) and let phi(n) = A000010(n) for k in A005117.
There are 2^(n-1) numbers k with gpf(k) = prime(n), since we can only either have p_i^0 or p_i^1 where p_i | k and i <= n. For example, for n = 2, there are only 2 squarefree numbers k with prime(2) = 3 as greatest prime factor. These are 3 = 2^0 * 3^1, and 6 = 2^1 * 3^1. We observe that we can write multiplicities of the primes as A067255(k), and thus for the example derive 3 = "0,1" and 6 = "1,1". Thus for n = 3, we have 5 = "0,0,1", 15 = "0,1,1", 10 = "1,0,1", and 30 = "1,1,1". This establishes the possible values of k with respect to n. We choose the value of k in n for which phi(k)/k - 1/2 is positive and minimal.
We know that prime k (in A000040) have phi(k)/k = A006093(n)/A000040(n) and represent maxima in n. We likewise know primorials k (in A002110) have phi(k)/k = A038110(n)/A060753(n) and represent minima in n. This sequence shows squarefree numbers k with gpf(k) = n such that their value phi(k)/k is closest to but more than 1/2.
Apart from a(1) = 2, all terms are odd. For n > 1 and k even, phi(k)/k - 1/2 is negative.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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

Views

Author

Michael De Vlieger, Apr 19 2019

Keywords

Comments

Let gpf(k) = A006530(k) and let phi(n) = A000010(n) for k in A005117. There are 2^(n-1) numbers k with gpf(k) = n, since we can only either have p_i^0 or p_i^1 where p_i | k and i <= n. For example, for n = 2, there are only 2 squarefree numbers k with prime(2) = 3 as greatest prime factor. These are 3 = 2^0 * 3^1, and 6 = 2^1 * 3^1. We observe that we can write multiplicities of the primes as A067255(k), and thus for the example derive 3 = "0,1" and 6 = "1,1". Thus for n = 3, we have 5 = "0,0,1", 15 = "0,1,1", 10 = "1,0,1", and 30 = "1,1,1". This establishes the possible values of k with respect to n. We choose the value of k in n for which 1/2 - phi(k)/k is positive and minimal.
We know that prime k (in A000040) have phi(k)/k = A006093(n)/A000040(n) and represent maxima in n. We likewise know primorials k (in A002110) have phi(k)/k = A038110(n)/A060753(n) and represent minima in n. This sequence shows squarefree numbers k with gpf(k) = n such that their value phi(k)/k is closest to but less than 1/2.
Conjecture: for n > 3, k is always odd. This assertion is reliant upon phi(2 prime(n))/2 prime(n) = phi(2)/2 * phi(prime(n))/prime(n) = 1/2 * (prime(n) - 1)/prime(n), and it is clear that 1/2 is an asymptote for even k.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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

Views

Author

Frank Ellermann, Feb 25 2020

Keywords

Comments

Looking for prime factors > 5=prime(3) in 8=A005867(3) candidates mod 30=A002110(3) two candidates in the form 30k +- 7 with k > 0 never belong to a twin prime pair. Twin primes can be (30k-13, 30k-11) A331840, (30k-1, 30k +1) A176114, or (30k+11, 30k+13) A089160.

Examples

			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.
		

Crossrefs

Subsequence of A158573. Prime pairs 30k +- 7 in A329262.

Programs

  • Mathematica
    Select[Range@ 215, AllTrue[30 # + {-7, 7}, PrimeQ] &] (* Michael De Vlieger, Feb 25 2020 *)
  • Rexx
    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
Previous Showing 11-20 of 22 results. Next