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.

Showing 1-5 of 5 results.

A005867 a(0) = 1; for n > 0, a(n) = (prime(n)-1)*a(n-1).

Original entry on oeis.org

1, 1, 2, 8, 48, 480, 5760, 92160, 1658880, 36495360, 1021870080, 30656102400, 1103619686400, 44144787456000, 1854081073152000, 85287729364992000, 4434961926979584000, 257227791764815872000, 15433667505888952320000
Offset: 0

Views

Author

Keywords

Comments

Local minima of Euler's phi function. - Walter Nissen
Number of potential primes in a modulus primorial(n+1) sieve. - Robert G. Wilson v, Nov 20 2000
Let p=prime(n) and let p# be the primorial (A002110), then it can be shown that any p# consecutive numbers have exactly a(n-1) numbers whose lowest prime factor is p. For a proof, see the "Proofs Regarding Primorial Patterns" link. For example, if we let p=7 and consider the interval [101,310] containing 210 numbers, we find the 8 numbers 119, 133, 161, 203, 217, 259, 287, 301. - Dennis Martin (dennis.martin(AT)dptechnology.com), Jul 16 2006
From Gary W. Adamson, Apr 21 2009: (Start)
Equals (-1)^n * (1, 1, 1, 2, 8, 48, ...) dot (-1, 2, -3, 5, -7, 11, ...).
a(6) = 480 = (1, 1, 1, 2, 8, 48) dot (-1, 2, -3, 5, -7, 11) = (-1, 2, -3, 10, -56, 528). (End)
It can be proved that there are at least T prime numbers less than N, where the recursive function T is: T = N - N*Sum_{i=0..T(sqrt(N))} A005867(i)/A002110(i). This can show for example that at least 0.16*N numbers are primes less than N for 29^2 > N > 23^2. - Ben Paul Thurston, Aug 23 2010
First column of A096294. - Eric Desbiaux, Jun 20 2013
Conjecture: The g.f. for the prime(n+1)-rough numbers (A000027, A005408, A007310, A007775, A008364, A008365, A008366, A166061, A166063) is x*P(x)/(1-x-x^a(n)+x^(a(n)+1)), where P(x) is an order a(n) polynomial with symmetric coefficients (i.e., c(0)=c(n), c(1)=c(n-1), ...). - Benedict W. J. Irwin, Mar 18 2016
a(n)/A002110(n+1) (primorial(n+1)) is the ratio of natural numbers whose smallest prime factor is prime(n+1); i.e., prime(n+1) coprime to A002110(n). So the ratio of even numbers to natural numbers = 1/2; odd multiples of 3 = 1/6; multiples of 5 coprime to 6 (A084967) = 2/30 = 1/15; multiples of 7 coprime to 30 (A084968) = 8/210 = 4/105; etc. - Bob Selcoe, Aug 11 2016
The 2-adic valuation of a(n) is A057773(n), being sum of the 2-adic valuations of the product terms here. - Kevin Ryde, Jan 03 2023
For n > 1, a(n) is the number of prime(n+1)-rough numbers in [1, primorial(prime(n))]. - Alexandre Herrera, Aug 29 2023

Examples

			a(3): the mod 30 prime remainder set sieve representation yields the remainder set: {1, 7, 11, 13, 17, 19, 23, 29}, 8 elements.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A057773 (2-adic valuation).
Column 1 of A281890.

Programs

  • Haskell
    a005867 n = a005867_list !! n
    a005867_list = scanl (*) 1 a006093_list
    -- Reinhard Zumkeller, May 01 2013
  • Maple
    A005867 := proc(n)
        mul(ithprime(j)-1,j=1..n) ;
    end proc: # Zerinvary Lajos, Aug 24 2008, R. J. Mathar, May 03 2017
  • Mathematica
    Table[ Product[ EulerPhi[ Prime[ j ] ], {j, 1, n} ], {n, 1, 20} ]
    RecurrenceTable[{a[0]==1,a[n]==(Prime[n]-1)a[n-1]},a,{n,20}] (* Harvey P. Dale, Dec 09 2013 *)
    EulerPhi@ FoldList[Times, 1, Prime@ Range@ 18] (* Michael De Vlieger, Mar 18 2016 *)
  • PARI
    for(n=0, 22, print1(prod(k=1,n, prime(k)-1), ", "))
    

Formula

a(n) = phi(product of first n primes) = A000010(A002110(n)).
a(n) = Product_{k=1..n} (prime(k)-1) = Product_{k=1..n} A006093(n).
Sum_{n>=0} a(n)/A002110(n+1) = 1. - Bob Selcoe, Jan 09 2015
a(n) = A002110(n)-((1/A000040(n+1) - A038110(n+1)/A038111(n+1))*A002110(n+1)). - Jamie Morken, Mar 27 2019
a(n) = |Sum_{k=0..n} A070918(n,k)|. - Alois P. Heinz, Aug 18 2019
a(n) = A058251(n)/A060753(n+1). - Jamie Morken, Apr 25 2022
a(n) = A002110(n) - A016035(A002110(n)) - 1 for n >= 1. - David James Sycamore, Sep 07 2024
Sum_{n>=0} 1/a(n) = A345974. - Amiram Eldar, Jun 26 2025

Extensions

Offset changed to 0, Name changed, and Comments and Examples sections edited by T. D. Noe, Apr 04 2010

A284411 Least prime p such that more than half of all integers are divisible by n distinct primes not greater than p.

Original entry on oeis.org

3, 37, 42719, 5737850066077
Offset: 1

Views

Author

Peter Munn, Mar 26 2017

Keywords

Comments

The proportion of all integers that satisfy the divisibility criterion for p=prime(m) is determined using the proportion that satisfy it over any interval of primorial(m)=A002110(m) integers.
a(4) is from De Koninck, 2009; calculation credited to David Grégoire.
a(5) is about 7.887*10^34 assuming the Riemann Hypothesis, and about 7*10^34 unconditionally (De Koninck and Tenenbaum, 2002). - Amiram Eldar, Dec 05 2024

Examples

			Exactly half of the integers are divisible by 2, so a(1)>2. Two-thirds of all integers are divisible by 2 or 3, so a(1) = 3.
		

References

  • Jean-Marie De Koninck, Those Fascinating Numbers, American Mathematical Society, 2009, pp. 13, 216 and 368.

Crossrefs

Formula

a(n) is least p=prime(m) such that 2*Sum_{k=0..n-1} A096294(m,k) < A002110(m).
log(log(a(n))) = n - b + O(1/sqrt(n)), where b = 1/3 + A077761 (De Koninck and Tenenbaum, 2002). - Amiram Eldar, Dec 05 2024

Extensions

Definition edited by N. J. A. Sloane, Apr 01 2017

A078456 Number of numbers less than prime(1)*...*prime(n) having exactly one prime factor among (prime(1),...,prime(n)) where prime(n) is the n-th prime.

Original entry on oeis.org

1, 3, 14, 92, 968, 12096, 199296, 3679488, 82607616, 2349508608, 71507128320, 2604912721920, 105300128563200, 4466750187110400, 207324589680230400, 10866166392736972800, 634672612705724006400, 38337584554108256256000
Offset: 1

Views

Author

Benoit Cloitre, Dec 31 2002

Keywords

Comments

For n>1 a(n) is the determinant of the (n-1) X (n-1) matrix with elements M[i,j] = Prime[i+1] if i=j and 1 otherwise. (See example lines.) - Alexander Adamchuk, Jun 02 2006
Second column of A096294. - Eric Desbiaux, Jun 20 2013

Examples

			a(2)=3 since 2*3=6 and 2,3,4 have 1 prime factor among (2,3)
3 1 1 1 1 ...
1 5 1 1 1 ...
1 1 7 1 1 ...
1 1 1 11 1 ...
1 1 1 1 13 ...
and so a(2) = 3, a(3) = 3*5 - 1*1 = 14, a(4) = 3*5*7 + 1*1*1 + 1*1*1 - 7*1*1 - 5*1*1 - 3*1*1 = 92, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[ Det[ DiagonalMatrix[ Table[ Prime[i+1]-1, {i, 1, n-1} ] ] + 1 ], {n, 1, 20} ] (* Alexander Adamchuk, Jun 02 2006 *)
  • PARI
    a(n)=sum(k=1,prod(i=1,n, prime(i)),if(isprime(gcd(k,prod(i=1,n, prime(i)))),1,0))
    
  • PARI
    a(n) = matdet(matrix(n-1, n-1, j, k, if (j==k, prime(j+1), 1))); \\ after Mathematica; Michel Marcus, Oct 02 2016

Formula

a(n) = (prime(n)-1)*a(n-1) + A005867(n). - Matthew Vandermast, Jun 06 2004
a(n) = A120071(n) * A135212(n). - Alexander Adamchuk, Nov 23 2007
a(n) = A117494(A002110(n)). - Ridouane Oudra, Sep 18 2022

Extensions

a(7) from Ralf Stephan, Mar 25 2003
a(8)-a(12) from Matthew Vandermast, Jun 06 2004
More terms from Alexander Adamchuk, Jun 02 2006

A281891 Square array A(n,k): number of integers having k or more factors less than prime(n+1) in their prime factorization, within any interval of primorial(n)^k positive integers.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 4, 1, 0, 1, 14, 22, 1, 0, 1, 46, 412, 162, 1, 0, 1, 146, 7072, 22164, 1830, 1, 0, 1, 454, 115432, 2744088, 2822340, 24270, 1, 0, 1, 1394, 1827592, 319881696, 3913037880, 496348740, 418350, 1, 0, 1, 4246, 28390552, 35924741232, 5079363328560, 9082206410040, 147569907780, 8040810, 1
Offset: 0

Views

Author

Peter Munn, Feb 08 2017

Keywords

Comments

Square array read by descending antidiagonals; A(n,k) with rows n >= 0, columns k >= 0. Prime factors are counted with multiplicity. Primorial(n) = A002110(n): product of first n primes.
Visualize the prime factorizations of the positive integers as a table with row headings giving each successive integer, and the primes of which the row heading is the product listed across the columns in nondecreasing order, repeated when necessary. Except for 1, which lacks prime factors, column 1 has the row heading's least prime factor, column 2 has a value for composite numbers but is blank for primes, and so on. This sequence measures precisely how frequently values up to and including the various primes occur in each column. This is possible because any given prime occurs cyclically in any given column, for the reason following.
The occurrence pattern of up to k factors of prime(n) in such prime factorizations has a fundamental period over the positive integers of prime(n)^k. The least common period for up to k factors of each of the first n primes is primorial(n)^k, and this covers everything that can affect the occurrence of prime(n) in the least k factors. Thus prime(n) is k-th least prime factor of integer m if and only if it is k-th least prime factor of m + primorial(n)^k.
Intermediate values in the calculation of this sequence appear in A281890.
If n > 0, A(n,1) = A053144(n) in accordance with the comment on A053144 dated Apr 08 2010.
A(2,k) = A027649(k) = 2*(3^k) - 2^k.

Examples

			The table starts:
   1     0         0             0             0           0        0 ...
   1     1         1             1             1           1        1 ...
   1     4        14            46           146         454     1394 ...
   1    22       412          7072        115432     1827592 28390552 ...
   1   162     22164       2744088     319881696 35924741232    ...
   1  1830   2822340    3913037880 5079363328560      ...
   1 24270 496348740 9082206410040       ...
   ...
Primes less than prime(2+1)=5 occur as second least factor 14 times in the prime factorizations of every interval of 36 = primorial(2)^2 positive integers (cf. A014673). Therefore, A(2,2) = 14.
		

Crossrefs

A079474 re-read as a square array gives values of primorial(n)^k = A002110(n)^k.
The values in the body of the factorization table described in the author's comments are in the irregular array A027746.
A096294 gives the equivalent array for integers expressed as a product of prime powers.

Formula

A(n,0) = 1 for n >= 0, A(0,k) = 0 for k >= 1.
A(n,k) = prime(n)^k * A(n-1,k) + A281890(n,k) for n >= 1, k >= 1.

Extensions

Edited by M. F. Hasler, Apr 14 2017

A194156 Prime number that appears the most often as the n-th prime factor of an integer in a factorization given in ascending order.

Original entry on oeis.org

13, 23, 47, 113, 199, 283, 467, 887, 1627, 2803, 4297, 6397, 10343, 18461, 29453, 43067, 67993, 102679, 155893, 267961, 395323, 617819, 926707, 1513751, 2160469, 3278837, 4991687, 7115989, 11113793, 16310629, 24417233, 33888653, 52100569, 76020569
Offset: 4

Views

Author

Alonso del Arte, Aug 17 2011

Keywords

Comments

a(1) = 2 and a(2) = 3. The table in Koninck's book has 5 and 7 tied for third place.

Examples

			a(1) = 2 because, since a randomly chosen number has a 50% chance of being even, the first prime in the factorization of an integer is most likely to be 2.
a(4) = 13 because in the factorization of a number with four or more prime factors, 13 is likeliest to be fourth.
		

References

  • J.-M. De Koninck, Those Fascinating Numbers, Amer. Math. Soc., 2009, page 56.

Crossrefs

Programs

  • Magma
    // See link above.
  • Mathematica
    a[n_] := a[n] = (ClearAll[ CurrPrimes, t]; d = 1.0; For[i = 1, i <= n, i++, CurrPrimes[i] = Prime[i]; d = d*CurrPrimes[i]; t[i] = 1.0]; Freq = t[n]/d; k = n; FreqMax1 = Freq; kAtFreqMax1 = k; While[ k <= kAtFreqMax1*2 , k = k+1;  t[1] = t[1]*(CurrPrimes[1] - 1); CurrPrimes[1] = CurrPrimes[2]; For[i = 2, i <= n, i++,  t[i] = t[i]*(CurrPrimes[i] - 1) + t[i-1]; CurrPrimes[i-1] = CurrPrimes[i]]; CurrPrimes[n] = NextPrime[ CurrPrimes[n-1]]; d = d*CurrPrimes[n]; Freq = t[n]/d; If[ Freq > FreqMax1 , FreqMax1 = Freq; kAtFreqMax1 = k]; If[ Mod[k, 100] == 0 || (CurrPrimes[n] == 16111) , k,  CurrPrimes[n], Freq]; (*end while*)];  Prime[kAtFreqMax1] ); A194156 = Table[ Print["a(", n, ") = ", a[n]]; a[n], {n, 4, 30}] (* Jean-François Alcover, Dec 14 2011, translated from Jon E. Schoenfield's Magma code *)

Formula

a(n) = prime(k) k >= n, such that A096294(k-1, n-1)/A002110(k) >= A096294(i-1, n-1)/A002110(i) for i >= n, i <> k. - Peter Munn, Jul 31 2019

Extensions

Corrected and extended from a(19) onwards by Jon E. Schoenfield, who says (Start):
a(13) was given as 2083, but should be 2803 (apparent typo).
a(17) was given as 16111, which is the most-frequently-appearing 17th prime factor among any primes *up to that point*, as well as for a considerable distance beyond it ... but (after a significant gap) there are larger primes that appear as the 17th prime factor with a slightly higher frequency; beyond 16111, new record highs occur at 18257, 18311, 18313, 18457, and 18461 (the last of which is the correct value for a(17)).
a(18) was given as 24251, but a similar situation applies there; it's the most-frequently-appearing 18th prime factor among any primes up to that point, but it's beaten out by 27109, which is the best until 29443, which is the best until 29453 (which is the correct value for a(18)). (End)
Showing 1-5 of 5 results.