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-10 of 20 results. Next

A064488 A Beatty sequence: Floor[n*c], where c = A064648 is the sum of the reciprocals of primorials.

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 13, 14, 14, 15, 16, 16, 17, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 25, 26, 26, 27, 28, 28, 29, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 37, 38, 38, 39, 40, 40, 41, 42, 43, 43, 44, 45, 45, 46, 47, 47, 48, 49, 50, 50, 51, 52
Offset: 1

Views

Author

Labos Elemer, Oct 04 2001

Keywords

Crossrefs

Programs

  • Mathematica
    With[{nn=80},Floor[Times@@#]&/@Thread[{Range[nn],Accumulate[1/Rest[ FoldList[Times,1,Prime[Range[nn]]]]]}]] (* Harvey P. Dale, Apr 13 2014 *)

A002110 Primorial numbers (first definition): product of first n primes. Sometimes written prime(n)#.

Original entry on oeis.org

1, 2, 6, 30, 210, 2310, 30030, 510510, 9699690, 223092870, 6469693230, 200560490130, 7420738134810, 304250263527210, 13082761331670030, 614889782588491410, 32589158477190044730, 1922760350154212639070, 117288381359406970983270, 7858321551080267055879090
Offset: 0

Views

Author

Keywords

Comments

See A034386 for the second definition of primorial numbers: product of primes in the range 2 to n.
a(n) is the least number N with n distinct prime factors (i.e., omega(N) = n, cf. A001221). - Lekraj Beedassy, Feb 15 2002
Phi(n)/n is a new minimum for each primorial. - Robert G. Wilson v, Jan 10 2004
Smallest number stroked off n times after the n-th sifting process in an Eratosthenes sieve. - Lekraj Beedassy, Mar 31 2005
Apparently each term is a new minimum for phi(x)*sigma(x)/x^2. 6/Pi^2 < sigma(x)*phi(x)/x^2 < 1 for n > 1. - Jud McCranie, Jun 11 2005
Let f be a multiplicative function with f(p) > f(p^k) > 1 (p prime, k > 1), f(p) > f(q) > 1 (p, q prime, p < q). Then the record maxima of f occur at n# for n >= 1. Similarly, if 0 < f(p) < f(p^k) < 1 (p prime, k > 1), 0 < f(p) < f(q) < 1 (p, q prime, p < q), then the record minima of f occur at n# for n >= 1. - David W. Wilson, Oct 23 2006
Wolfe and Hirshberg give ?, ?, ?, ?, ?, 30030, ?, ... as a puzzle.
Records in number of distinct prime divisors. - Artur Jasinski, Apr 06 2008
For n >= 2, the digital roots of a(n) are multiples of 3. - Parthasarathy Nambi, Aug 19 2009 [with corrections by Zak Seidov, Aug 30 2015]
Denominators of the sum of the ratios of consecutive primes (see A094661). - Vladimir Joseph Stephan Orlovsky, Oct 24 2009
Where record values occur in A001221. - Melinda Trang (mewithlinda(AT)yahoo.com), Apr 15 2010
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
The above comment from Parthasarathy Nambi follows from the observation that digit summing produces a congruent number mod 9, so the digital root of any multiple of 3 is a multiple of 3. prime(n)# is divisible by 3 for n >= 2. - Christian Schulz, Oct 30 2013
The peaks (i.e., local maximums) in a graph of the number of repetitions (i.e., the tally of values) vs. value, as generated by taking the differences of all distinct pairs of odd prime numbers within a contiguous range occur at regular periodic intervals given by the primorial numbers 6 and greater. Larger primorials yield larger (relative) peaks, however the range must be >50% larger than the primorial to be easily observed. Secondary peaks occur at intervals of those "near-primorials" divisible by 6 (e.g., 42). See A259629. Also, periodicity at intervals of 6 and 30 can be observed in the local peaks of all possible sums of two, three or more distinct odd primes within modest contiguous ranges starting from p(2) = 3. - Richard R. Forberg, Jul 01 2015
If a number k and a(n) are coprime and k < (prime(n+1))^b < a(n), where b is an integer, then k has fewer than b prime factors, counting multiplicity (i.e., bigomega(k) < b, cf. A001222). - Isaac Saffold, Dec 03 2017
If n > 0, then a(n) has 2^n unitary divisors (A034444), and a(n) is a record; i.e., if k < a(n) then k has fewer unitary divisors than a(n) has. - Clark Kimberling, Jun 26 2018
Unitary superabundant numbers: numbers k with a record value of the unitary abundancy index, A034448(k)/k > A034448(m)/m for all m < k. - Amiram Eldar, Apr 20 2019
Psi(n)/n is a new maximum for each primorial (psi = A001615) [proof in link: Patrick Sole and Michel Planat, proposition 1 page 2]; compare with comment 2004: Phi(n)/n is a new minimum for each primorial. - Bernard Schott, May 21 2020
The term "primorial" was coined by Harvey Dubner (1987). - Amiram Eldar, Apr 16 2021
a(n)^(1/n) is approximately (n log n)/e. - Charles R Greathouse IV, Jan 03 2023
Subsequence of A267124. - Frank M Jackson, Apr 14 2023

Examples

			a(9) = 23# = 2*3*5*7*11*13*17*19*23 = 223092870 divides the difference 5283234035979900 in the arithmetic progression of 26 primes A204189. - _Jonathan Sondow_, Jan 15 2012
		

References

  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 50.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 49.
  • P. Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 4.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 114.
  • D. Wolfe and S. Hirshberg, Underspecified puzzles, in Tribute to A Mathemagician, Peters, 2005, pp. 73-74.

Crossrefs

A034386 gives the second version of the primorial numbers.
Subsequence of A005117 and of A064807. Apart from the first term, a subsequence of A083207.
Cf. A001615, A002182, A002201, A003418, A005235, A006862, A034444 (unitary divisors), A034448, A034387, A033188, A035345, A035346, A036691 (compositorial numbers), A049345 (primorial base representation), A057588, A060735 (and integer multiples), A061742 (squares), A072938, A079266, A087315, A094348, A106037, A121572, A053589, A064648, A132120, A260188.
Cf. A061720 (first differences), A143293 (partial sums).
Cf. also A276085, A276086.
The following fractions are all related to each other: Sum 1/n: A001008/A002805, Sum 1/prime(n): A024451/A002110 and A106830/A034386, Sum 1/nonprime(n): A282511/A282512, Sum 1/composite(n): A250133/A296358.

Programs

  • Haskell
    a002110 n = product $ take n a000040_list
    a002110_list = scanl (*) 1 a000040_list
    -- Reinhard Zumkeller, Feb 19 2012, May 03 2011
    
  • Magma
    [1] cat [&*[NthPrime(i): i in [1..n]]: n in [1..20]]; // Bruno Berselli, Oct 24 2012
    
  • Magma
    [1] cat [&*PrimesUpTo(p): p in PrimesUpTo(60)]; // Bruno Berselli, Feb 08 2015
    
  • Maple
    A002110 := n -> mul(ithprime(i),i=1..n);
  • Mathematica
    FoldList[Times, 1, Prime[Range[20]]]
    primorial[n_] := Product[Prime[i], {i, n}]; Array[primorial,20] (* José María Grau Ribas, Feb 15 2010 *)
    Join[{1}, Denominator[Accumulate[1/Prime[Range[20]]]]] (* Harvey P. Dale, Apr 11 2012 *)
  • PARI
    a(n)=prod(i=1,n, prime(i)) \\ Washington Bomfim, Sep 23 2008
    
  • PARI
    p=1; for (n=0, 100, if (n, p*=prime(n)); write("b002110.txt", n, " ", p) )  \\ Harry J. Smith, Nov 13 2009
    
  • PARI
    a(n) = factorback(primes(n)) \\ David A. Corneth, May 06 2018
    
  • Python
    from sympy import primorial
    def a(n): return 1 if n < 1 else primorial(n)
    [a(n) for n in range(51)]  # Indranil Ghosh, Mar 29 2017
    
  • Sage
    [sloane.A002110(n) for n in (1..20)] # Giuseppe Coppoletta, Dec 05 2014
    
  • Scheme
    ; with memoization-macro definec
    (definec (A002110 n) (if (zero? n) 1 (* (A000040 n) (A002110 (- n 1))))) ;; Antti Karttunen, Aug 30 2016

Formula

Asymptotic expression for a(n): exp((1 + o(1)) * n * log(n)) where o(1) is the "little o" notation. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 08 2001
a(n) = A054842(A002275(n)).
Binomial transform = A136104: (1, 3, 11, 55, 375, 3731, ...). Equals binomial transform of A121572: (1, 1, 3, 17, 119, 1509, ...). - Gary W. Adamson, Dec 14 2007
a(0) = 1, a(n+1) = prime(n)*a(n). - Juri-Stepan Gerasimov, Oct 15 2010
a(n) = Product_{i=1..n} A000040(i). - Jonathan Vos Post, Jul 17 2008
a(A051838(n)) = A116536(n) * A007504(A051838(n)). - Reinhard Zumkeller, Oct 03 2011
A000005(a(n)) = 2^n. - Carlos Eduardo Olivieri, Jun 16 2015
a(n) = A035345(n) - A005235(n) for n > 0. - Jonathan Sondow, Dec 02 2015
For all n >= 0, a(n) = A276085(A000040(n+1)), a(n+1) = A276086(A143293(n)). - Antti Karttunen, Aug 30 2016
A054841(a(n)) = A002275(n). - Michael De Vlieger, Aug 31 2016
a(n) = A270592(2*n+2) - A270592(2*n+1) if 0 <= n <= 4 (conjectured for all n by Alon Kellner). - Jonathan Sondow, Mar 25 2018
Sum_{n>=1} 1/a(n) = A064648. - Amiram Eldar, Oct 16 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = A132120. - Amiram Eldar, Apr 12 2021
Theta being Chebyshev's theta function, a(0) = exp(theta(1)), and for n > 0, a(n) = exp(theta(m)) for A000040(n) <= m < A000040(n+1) where m is an integer. - Miles Englezou, Nov 26 2024

A257993 Least gap in the partition having Heinz number n; index of the least prime not dividing n.

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3
Offset: 1

Views

Author

Emeric Deutsch, May 18 2015

Keywords

Comments

The "least gap" of a partition is the least positive integer that is not a part of the partition. For example, the least gap of the partition [7,4,2,2,1] is 3.
We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436.
In the Maple program the subprogram B yields the partition with Heinz number n.
Sum of least gaps of all partitions of m = A022567(m).
From Antti Karttunen, Aug 22 2016: (Start)
Index of the least prime not dividing n. (After a formula given by Heinz.)
Least k such that A002110(k) does not divide n.
One more than the number of trailing zeros in primorial base representation of n, A049345.
(End)
The least gap is also called the mex (minimal excludant) of the partition. - Gus Wiseman, Apr 20 2021

Examples

			a(18) = 3 because the partition having Heinz number 18 = 2*3*3 is [1,2,2], having least gap equal to 3.
		

References

  • G. E. Andrews and K. Eriksson, Integer Partitions, Cambridge Univ. Press, 2004, Cambridge.
  • Miklós Bóna, A Walk Through Combinatorics, World Scientific Publishing Co., 2002.

Crossrefs

Positions of 1's are A005408.
Positions of 2's are A047235.
The number of gaps is A079067.
The version for crank is A257989.
The triangle counting partitions by this statistic is A264401.
One more than A276084.
The version for greatest difference is A286469 or A286470.
A maximal instead of minimal version is A339662.
Positions of even terms are A342050.
Positions of odd terms are A342051.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A056239 adds up prime indices, row sums of A112798.
A073491 lists numbers with gap-free prime indices.
A238709 counts partitions by sum and least difference.
A333214 lists positions of adjacent unequal prime gaps.
A339737 counts partitions by sum and greatest gap.

Programs

  • Maple
    with(numtheory): a := proc (n) local B, q: B := proc (n) local nn, j, m: nn := op(2, ifactors(n)): for j to nops(nn) do m[j] := op(j, nn) end do: [seq(seq(pi(op(1, m[i])), q = 1 .. op(2, m[i])), i = 1 .. nops(nn))] end proc: for q while member(q, B(n)) = true do  end do: q end proc: seq(a(n), n = 1 .. 150);
    # second Maple program:
    a:= n-> `if`(n=1, 1, (s-> min({$1..(max(s)+1)} minus s))(
            {map(x-> numtheory[pi](x[1]), ifactors(n)[2])[]})):
    seq(a(n), n=1..100);  # Alois P. Heinz, May 09 2016
    # faster:
    A257993 := proc(n) local p, c; c := 1; p := 2;
    while n mod p = 0 do p := nextprime(p); c := c + 1 od: c end:
    seq(A257993(n), n=1..100); # Peter Luschny, Jun 04 2017
  • Mathematica
    A053669[n_] := For[p = 2, True, p = NextPrime[p], If[CoprimeQ[p, n], Return[p]]]; a[n_] := PrimePi[A053669[n]]; Array[a, 100] (* Jean-François Alcover, Nov 28 2016 *)
    Table[k = 1; While[! CoprimeQ[Prime@ k, n], k++]; k, {n, 100}] (* Michael De Vlieger, Jun 22 2017 *)
  • PARI
    a(n) = forprime(p=2,, if (n % p, return(primepi(p)))); \\ Michel Marcus, Jun 22 2017
  • Python
    from sympy import nextprime, primepi
    def a053669(n):
        p = 2
        while True:
            if n%p!=0: return p
            else: p=nextprime(p)
    def a(n): return primepi(a053669(n)) # Indranil Ghosh, May 12 2017
    
  • Scheme
    (define (A257993 n) (let loop ((n n) (i 1)) (let* ((p (A000040 i)) (d (modulo n p))) (if (not (zero? d)) i (loop (/ (- n d) p) (+ 1 i))))))
    ;; Antti Karttunen, Aug 22 2016
    

Formula

a(n) = A000720(A053669(n)). - Alois P. Heinz, May 18 2015
From Antti Karttunen, Aug 22-30 2016: (Start)
a(n) = 1 + A276084(n).
a(n) = A055396(A276086(n)).
A276152(n) = A002110(a(n)).
(End)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 + Sum_{k>=1} 1/A002110(k) = 1.705230... (1 + A064648). - Amiram Eldar, Jul 23 2022
a(n) << log n/log log n. - Charles R Greathouse IV, Dec 03 2022

Extensions

A simpler description added to the name by Antti Karttunen, Aug 22 2016

A276084 a(n) = Number of trailing zeros in primorial base representation of n (A049345); largest k such that A002110(k) divides n.

Original entry on oeis.org

0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 3
Offset: 1

Views

Author

Antti Karttunen, Aug 22 2016

Keywords

Comments

Terms begin from a(1)=0 because for zero the count is ambiguous.
From Amiram Eldar, Mar 10 2021: (Start)
The asymptotic density of the occurrences of k is (prime(k+1)-1)/A002110(k+1).
The asymptotic mean of this sequence is Sum_{k>=1} 1/A002110(k) = 0.705230... (A064648). (End)

Examples

			For n=24, which is "400" in primorial base (as 24 = 4*(3*2*1) + 0*(2*1) + 0*1, see A049345), there are two trailing zeros, thus a(24) = 2.
		

Crossrefs

One less than A257993.
Differs from the related A230403 for the first time at n=24.

Programs

  • Mathematica
    Table[If[# == 0, 0, j = #; While[! Divisible[n, Times @@ Prime@ Range@ j], j--]; j] &@ If[OddQ@ n, 0, k = 1; While[Times @@ Prime@ Range[k + 1] <= n, k++]; k], {n, 120}] (* or *)
    nn = 120; b = MixedRadix[Reverse@ Prime@ Range@ PrimePi[nn + 1]]; Table[Length@ TakeWhile[Reverse@ IntegerDigits[n, b], # == 0 &], {n, nn}] (* Version 10.2, or *)
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Prime@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Prime@ Range[# + 1] <= n &]; Rest[a][[All, 1]]]; Table[Length@ TakeWhile[Reverse@ f@ n, # == 0 &], {n, 120}] (* Michael De Vlieger, Aug 30 2016 *)
  • Python
    from sympy import nextprime, primepi
    def a053669(n):
        p = 2
        while True:
            if n%p!=0: return p
            else: p=nextprime(p)
    def a(n): return primepi(a053669(n)) - 1 # Indranil Ghosh, May 12 2017
  • Scheme
    (define (A276084 n) (let loop ((n n) (i 1)) (let* ((p (A000040 i)) (d (modulo n p))) (if (not (zero? d)) (- i 1) (loop (/ (- n d) p) (+ 1 i))))))
    

Formula

a(n) = A257993(n)-1.
Other identities. For all n >= 1:
A053589(n) = A002110(a(n)).
a(n) = A001221(A053589(n)) = A001221(A340346(n)). - Peter Munn, Jan 14 2021

A276088 The least significant nonzero digit in primorial base representation of n: a(n) = A276094(n) / A002110(A276084(n)) (with a(0) = 0).

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 1, 4
Offset: 0

Views

Author

Antti Karttunen, Aug 22 2016

Keywords

Comments

For any n >= 1, start from k = n and repeatedly try to divide as many successive primes as possible out of k, iterating as k/2 -> k, k/3 -> k, k/5 -> k, until a nonzero remainder is encountered, which is then the value of a(n). (See the last example).
Note that the sequence has been defined so that it will eventually include also "digits" (actually: value holders) > 9 that occur as the least significant nonzero digits in primorial base representation. Thus any eventual decimal corruption of A049345 will not affect these values.
The sums of the first 10^k terms (starting from n=1), for k = 1, 2, ..., are 12, 138, 1441, 14565, 145950, 1459992, 14600211, 146002438, 1460025336, 14600254674, ... . Apparently, the asymptotic mean of this sequence is limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1.460025... . - Amiram Eldar, Sep 10 2022
The asymptotic density of the occurrences of k = 1, 2, ..., is d(1) = c = A064648 for k = 1, and d(k) = c - Sum_{i = 1..PrimePi(k)} 1/primorial(i) for k >= 2, where primorial(i) = A002110(i). The asymptotic mean of this sequence is Sum_{k>=1} k * d(k) = c + Sum_{i>=1} (prime(i) * gap(i) + t(gap(i)-1)) * (c - Sum_{j = 1..i} 1/primorial(i)) = 1.460025488658067356046281458556..., where t(i) = A000217(i) and gap(i) = A001223(i). - Amiram Eldar, Feb 20 2025

Examples

			   n   A049345  the rightmost nonzero = a(n)
---------------------------------------------------------
   0       0             0
   1       1             1
   2      10             1
   3      11             1
   4      20             2
   5      21             1
   6     100             1
   7     101             1
   8     110             1
   9     111             1
  10     120             2
  11     121             1
  12     200             2
  13     201             1
  14     210             1
  15     211             1
  16     220             2
.
For n=48 according to the iteration interpretation, we obtain first 48/2 = 24, and the remainder is zero, so we continue: 24/3 = 8 and here the remainder is zero as well, so we try next 8/5, but this gives the nonzero remainder 3, thus a(48)=3.
For n=2100, which could be written "A0000" in primorial base (where A stands for digit "ten", as 2100 = 10*A002110(4)), the least significant nonzero value holder (also the most significant) is thus 10 and a(2100) = 10. (The first point where this sequence attains a value larger than 9).
		

Crossrefs

Programs

  • Mathematica
    nn = 120; b = MixedRadix[Reverse@ Prime@ Range@ PrimePi[nn + 1]]; Table[Last[IntegerDigits[n, b] /. 0 -> Nothing, 0], {n, 0, nn}] (* Version 11, or *)
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Prime@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Prime@ Range[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[Last@ DeleteCases[f@ n, d_ /; d == 0], {n, 120}] (* Michael De Vlieger, Aug 30 2016 *)
  • PARI
    A276088(n) = { my(e=0, p=2); while(n && !(e=(n%p)), n = n/p; p = nextprime(1+p)); (e); }; \\ Antti Karttunen, Oct 29 2019
    
  • Python
    from sympy import nextprime, primepi, primorial
    def a053669(n):
        p = 2
        while True:
            if n%p!=0: return p
            else: p=nextprime(p)
    def a257993(n): return primepi(a053669(n))
    def a002110(n): return 1 if n<1 else primorial(n)
    def a276094(n): return 0 if n==0 else n%a002110(a257993(n))
    def a(n): return 0 if n==0 else a276094(n)//a002110(a257993(n) - 1)
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 22 2017
  • Scheme
    (define (A276088 n) (if (zero? n) n (let loop ((n n) (i 1)) (let* ((p (A000040 i)) (d (modulo n p))) (if (not (zero? d)) d (loop (/ (- n d) p) (+ 1 i)))))))
    
  • Scheme
    (define (A276088 n) (if (zero? n) n (/ (A276094 n) (A002110 (A276084 n)))))
    

Formula

a(0) = 0, and for n >= 1, a(n) = A276094(n) / A002110(A276084(n)).
From Antti Karttunen, Oct 29 2019: (Start)
a(n) = A067029(A276086(n)).
a(A276086(n)) = A328569(n).
(End).

A132120 Decimal expansion of the constant obtained through Pierce retro-expansion of the prime sequence.

Original entry on oeis.org

3, 6, 2, 3, 0, 6, 2, 2, 2, 3, 6, 6, 4, 9, 8, 0, 4, 8, 7, 9, 8, 6, 2, 6, 3, 7, 2, 2, 2, 4, 0, 9, 3, 4, 6, 1, 8, 1, 1, 1, 7, 9, 8, 5, 8, 5, 3, 4, 4, 2, 0, 9, 9, 9, 7, 5, 9, 9, 5, 1, 0, 1, 7, 0, 2, 7, 8, 4, 1, 8, 8, 6, 3, 0, 6, 8, 9, 6, 5, 0
Offset: 0

Views

Author

R. J. Mathar, Oct 31 2007

Keywords

Comments

The asymptotic density of numbers which have an odd number of the trailing zeros in their primorial base representation (A342050). - Amiram Eldar, Feb 28 2021

Examples

			0.3623062223664980487986263722240934618111798585344209997599510170278418863068...
		

Crossrefs

Programs

  • Maple
    Digits := 80 : a := 0 : for i from 1 to 100 do a := a+(-1.0)^(i-1)/mul(ithprime(j),j=1..i) ; print(a) ; od:
  • PARI
    P=1; -sumalt(n=1,(-1)^n/P*=prime(n)) \\ Charles R Greathouse IV, Oct 03 2016

Formula

Equals Sum_{i>=1} (-1)^(i+1)/A002110(i).

Extensions

Corrected last entry by Paolo P. Lava, May 28 2013

A161360 Decimal expansion of Product_p p#/(p#-1).

Original entry on oeis.org

2, 4, 9, 5, 8, 0, 6, 5, 1, 4, 0, 5, 9, 8, 3, 8, 2, 7, 2, 7, 7, 4, 9, 7, 9, 2, 0, 4, 9, 3, 0, 1, 5, 3, 4, 3, 7, 2, 6, 1, 0, 3, 7, 9, 3, 7, 6, 1, 5, 5, 0, 7, 7, 9, 6, 3, 9, 6, 9, 1, 6, 5, 3, 8, 9, 5, 1, 3, 5, 7, 2, 2, 2, 6, 4, 9, 6, 5, 6, 5, 6, 9, 0, 4, 5, 5, 5, 7, 0, 3, 4, 8, 5, 6, 1, 3, 5, 4, 0, 0, 1, 6, 2, 5, 2
Offset: 1

Views

Author

Keywords

Comments

By p# we mean the primorial number which is the product of the primes less than or equal to p.

Examples

			2/1 * 6/5 * 30/29 * ... = 2.495806514059838272774979204930153...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Times@@(#/(#-1)&/@Rest[FoldList[Times,1,Prime[Range[100]]]]), 10,120][[1]] (* Harvey P. Dale, Mar 15 2015 *)
  • PARI
    h(n)=local(p,pl,r);p=2;pl=1;r=1.;while(p
    				

Formula

This number is equal to Sum_k 1/A025487(k).

A220423 Cubefree products of primorials (A002110).

Original entry on oeis.org

1, 2, 4, 6, 12, 30, 36, 60, 180, 210, 420, 900, 1260, 2310, 4620, 6300, 13860, 30030, 44100, 60060, 69300, 180180, 485100, 510510, 900900, 1021020, 3063060, 5336100, 6306300, 9699690, 15315300, 19399380, 58198140, 69369300, 107207100, 223092870, 290990700
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 14 2012

Keywords

Comments

Suggested by a comment of Charles R Greathouse IV in A220264.

Crossrefs

Subsequence of A004709 and A073491.

Programs

  • Haskell
    import Data.Set (deleteFindMin, empty, fromList, union)
    import qualified Data.Set as Set (null)
    a220423 n = a220423_list !! (n-1)
    a220423_list = f (splitAt 1 a002110_list) empty where
       f (us'@(u:_), vs'@(v:vs)) s
         | Set.null s || m > u
                     = f (v:us', vs) (s `union` (fromList $ map (* u) us'))
         | otherwise = m : f (us', vs') s'
         where (m,s') = deleteFindMin s

Formula

A212793(a(n)) = 1; A051903(a(n)) < 3.
A001221(a(n)) <= A001222(a(n)) <= 2*A001221(a(n)).
A006530(a(n)) = A000040(A001221(a(n))).
Sum_{n>=1} 1/a(n) = (S(1)^2 + S(2))/2 = 2.093360845965235020766040..., where S(k) = Sum_{n>=0} 1/(A002110(n))^k (S(1) = 1 + A064648). - Amiram Eldar, Sep 24 2023

A380535 Numbers such that the least significant nonzero digit in their primorial base representation (A049345) is greater than 1.

Original entry on oeis.org

4, 10, 12, 16, 18, 22, 24, 28, 34, 40, 42, 46, 48, 52, 54, 58, 60, 64, 70, 72, 76, 78, 82, 84, 88, 90, 94, 100, 102, 106, 108, 112, 114, 118, 120, 124, 130, 132, 136, 138, 142, 144, 148, 150, 154, 160, 162, 166, 168, 172, 174, 178, 180, 184, 190, 192, 196, 198, 202, 204, 208, 214, 220, 222, 226, 228, 232, 234, 238, 244, 250
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2025

Keywords

Comments

Equally, numbers k such that A327860(k) [equally, A329029(k)] is a multiple of A053669(k), where A327860 is the arithmetic derivative of the primorial base exp-function, and A053669(k) gives the least prime not dividing k. See comments in A329029.
The asymptotic density of this sequence is 1 - A064648 = 0.294769828... . - Amiram Eldar, Feb 17 2025

Examples

			   n, A049345(n), A276088(n)
  ---------------------------------------------
   4       20       2, thus 4 is present,
  10      120       2, thus 10 is present,
  11      121       1, thus 11 is not present,
  12      200       2, thus 12 is present,
  14      210       1, thus 14 is not present,
  16      220       2, thus 16 is present,
  18      300       3, thus 18 is present.
		

Crossrefs

Cf. A049345, A053669, A064648, A276088, A327860, A329029, A380527, A380534 (characteristic function).
Cf. also A342018.

Programs

  • Mathematica
    q[n_] := Module[{k = n, p = 2, r}, While[{k, r} = QuotientRemainder[k, p]; k > 0 && r == 0, p = NextPrime[p]]; r > 1]; Select[Range[250], q] (* Amiram Eldar, Feb 17 2025 *)
  • PARI
    is_A380535 = A380534;

Formula

{k such that A276088(k) > 1}.

A130820 Decimal expansion of number whose Engel expansion is given by the sequence: 1,1,2,2,3,3,4,4,...ceiling(n/2),...

Original entry on oeis.org

2, 8, 7, 0, 2, 2, 2, 1, 5, 6, 9, 7, 3, 3, 9, 6, 3, 3, 0, 8, 1, 9, 4, 5, 8, 8, 6, 5, 8, 1, 1, 1, 9, 9, 6, 0, 1, 2, 4, 0, 3, 1, 9, 2, 6, 2, 2, 8, 0, 9, 9, 5, 7, 0, 1, 2, 0, 3, 1, 2, 7, 7, 3, 6, 2, 7, 2, 8, 5, 0, 3, 8, 0, 7, 6, 8, 0, 3, 7, 5, 2, 7, 8, 4, 5, 6, 3, 9, 2, 3, 6, 1, 5, 0, 7, 1, 4, 8, 2, 4
Offset: 1

Views

Author

Stephen Casey (hexomino(AT)gmail.com), Jul 17 2007

Keywords

Examples

			2.8702221569733963308194588658111996012403192622809957012...
		

References

  • Engel, F. "Entwicklung der Zahlen nach Stammbruechen" Verhandlungen der 52. Versammlung deutscher Philologen und Schulmaenner in Marburg. pp. 190-191, 1913.

Crossrefs

Programs

  • Maple
    evalf(BesselI(0, 2) + BesselI(1, 2) - 1, 100); # Peter Bala, Jul 02 2016
  • Mathematica
    First@ RealDigits@ N[Sum[1/Product[Ceiling[r/2], {r, n}], {n, 1000}], 100] (* Original program amended to generate output by Michael De Vlieger, Jul 03 2016 *)
    RealDigits[3 - HypergeometricPFQ[{1, 1}, {3, 3, 3}, 1]/8, 10, 100][[1]] (* Vaclav Kotesovec, Jul 03 2016 *)

Formula

From Peter Bala, Jul 01 2016: (Start)
Constant c = 1/1 + 1/(1*1) + 1/(1*1*2) + 1/(1*1*2*2) + 1/(1*1*2*2*3) + 1/(1*1*2*2*3*3) + ... = Sum_{n >= 1} binomial(n,floor(n/2))/n!.
Alternative series representations:
c = 3 - Sum_{n >= 2} 1/(n*(n - 1)*n!^2);
c = 1 + Sum_{n >= 1} (n + 2)/(n!*(n + 1)!);
c = 5/3 + 1/3*Sum_{n >= 2} (n + 1)*(n + 2)/n!^2;
c = A070910 + A096789 - 1.
Continued fraction: c = 3 - 1/(8 - 4/(14 - 9/(32 - ... - (n-1)^2/(n^2 + n + 2 - ...)))). See comments in A141827. (End)
Showing 1-10 of 20 results. Next