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 1919 results. Next

A000849 Number of primes <= product of first n primes, A002110(n).

Original entry on oeis.org

0, 1, 3, 10, 46, 343, 3248, 42331, 646029, 12283531, 300369796, 8028643010, 259488750744, 9414916809095, 362597750396740, 15397728527812858, 742238179058722891, 40068968501510691894, 2251262473052300960826, 139566579945945392719413
Offset: 0

Views

Author

James D. Ausfahl, gandalf(AT)hrn.office.ssi.net

Keywords

Crossrefs

Programs

  • Maple
    seq(numtheory:-pi(mul(ithprime(i),i=1..n)),n=0..10); # Robert Israel, Aug 25 2014
  • Mathematica
    a=1; Table[a=a*Prime[n]; PrimePi[a], {n, 12}]
    Join[{0},PrimePi/@FoldList[Times,Prime[Range[12]]]] (* Harvey P. Dale, Jan 28 2019 *)
  • PARI
    t=1;forprime(p=2,66,print1(primepi(t),", ");t*=p); \\ Joerg Arndt, Aug 25 2014
    
  • Sage
    [prime_pi(sloane.A002110(n)) for n in range (14)] # Giuseppe Coppoletta, Mar 02 2015

Formula

a(n) = A000720(A002110(n)). - Michel Marcus, Aug 25 2014

Extensions

More terms from David W. Wilson
a(10)-a(13) from Paul Zimmermann
a(14)-a(15) from Donovan Johnson, Mar 01 2010
a(16)-a(17) from Henri Lifchitz, Aug 25 2014
a(18)-a(19) from David Baugh, Sep 29 2020

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

A057705 Primorial primes: primes p such that p+1 is a primorial number (A002110).

Original entry on oeis.org

5, 29, 2309, 30029, 304250263527209, 23768741896345550770650537601358309, 19361386640700823163471425054312320082662897612571563761906962414215012369856637179096947335243680669607531475629148240284399976569
Offset: 1

Views

Author

Labos Elemer, Oct 24 2000

Keywords

Crossrefs

See A006794 and A057704 (the main entries for this sequence) for more terms.
Subsequence of A057588.

Programs

  • Haskell
    a057705 n = a057705_list !! (n-1)
    a057705_list = filter ((== 1) . a010051) a057588_list
    -- Reinhard Zumkeller, Mar 27 2013
  • Mathematica
    Select[FoldList[Times, 1, Prime[Range[70]]], PrimeQ[# - 1] &] - 1 (* Harvey P. Dale, Jan 27 2014 *)

Formula

a(n) = A002110(A057704(n)) - 1.

A235224 a(0) = 0, and for n > 0, a(n) = largest k such that A002110(k-1) <= n, where A002110(k) gives the k-th primorial number.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 05 2014

Keywords

Comments

For n > 0: a(n) = (length of row n in A235168) = A055642(A049345(n)).
For n > 0, a(n) gives the length of primorial base expansion of n. Also, after zero, each value n occurs A061720(n-1) times. - Antti Karttunen, Oct 19 2019

Crossrefs

Programs

  • Haskell
    a235224 n = length $ takeWhile (<= n) a002110_list
    
  • Maple
    A235224 := proc(n)
        local k;
        if n = 0 then
            0;
        else
            for k from 0 do
                if A002110(k-1) > n then
                    return k-1 ;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Apr 19 2021
  • Mathematica
    primorial[n_] := Times @@ Prime[Range[n]];
    a[n_] := TakeWhile[primorial /@ Range[0, n], # <= n &] // Length;
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 27 2021 *)
  • PARI
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); }; \\ Antti Karttunen, Oct 19 2019
    
  • PARI
    A235224(n, p=2) = if(!n,n,if(nA235224(n\p, nextprime(p+1)))); \\ (Recursive implementation) - Antti Karttunen, Oct 19 2019

Formula

From Antti Karttunen, Oct 19 2019: (Start)
a(n) = A061395(A276086(n)).
For all n >= 0, a(n) >= A267263(n).
For all n >= 1, A000040(a(n)) > A328114(n). (End)

Extensions

Name corrected to match the data by Antti Karttunen, Oct 19 2019

A324888 Minimal number of primorials (A002110) that add to A108951(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 4, 1, 2, 6, 4, 1, 4, 1, 4, 6, 2, 1, 4, 6, 2, 2, 4, 1, 6, 1, 2, 6, 2, 10, 8, 1, 2, 6, 2, 1, 2, 1, 4, 6, 2, 1, 4, 8, 12, 6, 4, 1, 4, 6, 8, 6, 2, 1, 6, 1, 2, 6, 4, 14, 12, 1, 4, 6, 10, 1, 6, 1, 2, 10, 4, 18, 12, 1, 4, 8, 2, 1, 4, 12, 2, 6, 8, 1, 12, 18, 4, 6, 2, 8, 8, 1, 16, 12, 8, 1, 12, 1, 8, 8
Offset: 1

Views

Author

Antti Karttunen, Mar 30 2019

Keywords

Comments

Sum of digits when A108951(n) is written in primorial base (A049345).

Crossrefs

Cf. A324383, A324386, A324387 (permutations of this sequence).

Programs

  • Mathematica
    With[{b = Reverse@ Prime@ Range@ 120}, Array[Total@ IntegerDigits[#, MixedRadix[b]] &@ Apply[Times, Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e > 0 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]] &, 105] ] (* Michael De Vlieger, Nov 18 2019 *)
  • PARI
    A034386(n) = prod(i=1, primepi(n), prime(i));
    A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) };  \\ From A108951
    A276150(n) = { my(s=0,m); forprime(p=2, , if(!n, return(s)); m = n%p; s += m; n = (n-m)/p); };
    A324888(n) = A276150(A108951(n));

Formula

a(n) = A276150(A108951(n)).
a(n) = A001222(A324886(n)).

A088860 Twice the primorials (first definition), 2*A002110(n).

Original entry on oeis.org

4, 12, 60, 420, 4620, 60060, 1021020, 19399380, 446185740, 12939386460, 401120980260, 14841476269620, 608500527054420, 26165522663340060, 1229779565176982820, 65178316954380089460, 3845520700308425278140
Offset: 1

Views

Author

Lekraj Beedassy, Nov 25 2003

Keywords

Comments

Also, least number m divisible by 4 such that omega(m)=n, where omega=A001221.
Refers to the least number which is the leg of exactly 2^(n-1) primitive Pythagorean triangles.
For n >= 1, a(n) = A097250(n). - G. C. Greubel, Apr 23 2017

Crossrefs

Programs

  • Mathematica
    2*FoldList[Times, 1, Prime[Range[50]]] (* G. C. Greubel, Apr 23 2017 *)

Formula

a(n) = 2*#p(n) = 2*A002110(n).

Extensions

Corrected by G. C. Greubel, Apr 23 2017.
Edited by N. J. A. Sloane, Apr 23 2017

A080259 Numbers whose squarefree kernel is not a primorial number, i.e., A007947(a(n)) is not in A002110.

Original entry on oeis.org

3, 5, 7, 9, 10, 11, 13, 14, 15, 17, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87
Offset: 1

Views

Author

Labos Elemer, Mar 19 2003

Keywords

Comments

Complement to A055932.
From Michael De Vlieger, Feb 06 2024: (Start)
Odd prime power p^m, m >= 1 is in the sequence since its squarefree kernel p is odd and not a primorial. Therefore 3^3, 5^2, etc. are in the sequence.
Odd squarefree composite k is in the sequence since its squarefree kernel is odd and thus not a primorial. Therefore 15 and 33 are in the sequence.
Numbers k such that A053669(k) < A006530(k) are in the sequence since the condition A053669(k) < A006530(k) implies the squarefree kernel is not a primorial, etc. (End)

Examples

			From _Michael De Vlieger_, Jan 23 2024: (Start)
1 is not in the sequence because its squarefree kernel is 1, the product of the 0 primes that divide 1 (the "empty product") and therefore the same as A002110(0), the 0th primorial.
2 is not in the sequence since its squarefree kernel is 2, the smallest prime, hence the same as A002110(1) = 2.
4 is not in the sequence since its squarefree kernel is 2 = A002110(1).
(End)
		

Crossrefs

Programs

  • Mathematica
    Select[Range[120], Nor[IntegerQ@ Log2[#], And[EvenQ[#], Union@ Differences@ PrimePi[FactorInteger[#][[All, 1]]] == {1}]] &] (* Michael De Vlieger, Jan 23 2024 *)
  • PARI
    is(n) = {my(f=factor(n)[,1]);n>1&&primepi(f[#f])>#f} \\ David A. Corneth, May 22 2016
    
  • Python
    from itertools import count, islice
    from sympy import primepi, primefactors
    def A080259_gen(startvalue=2): # generator of terms >= startvalue
        for k in count(max(startvalue,2)):
            p = list(map(primepi,primefactors(k)))
            if not(min(p)==1 and max(p)==len(p)):
                yield k
    A080259_list = list(islice(A080259_gen(),40)) # Chai Wah Wu, Aug 07 2025

Formula

{a(n)} = { k : A053669(k) < A006530(k) }. - Michael De Vlieger, Jan 23 2024

Extensions

Edited by Michael De Vlieger, Jan 23 2024

A060229 Smaller member of a twin prime pair whose mean is a multiple of A002110(3)=30.

Original entry on oeis.org

29, 59, 149, 179, 239, 269, 419, 569, 599, 659, 809, 1019, 1049, 1229, 1289, 1319, 1619, 1949, 2129, 2309, 2339, 2549, 2729, 2789, 2969, 2999, 3119, 3299, 3329, 3359, 3389, 3539, 3929, 4019, 4049, 4229, 4259, 4649, 4799, 5009, 5099, 5279, 5519, 5639
Offset: 1

Views

Author

Labos Elemer, Mar 21 2001

Keywords

Comments

Equivalently, smaller of twin prime pair with primes in different decades.
Primes p such that p and p+2 are prime factors of Fibonacci(p-1) and Fibonacci(p+1) respectively. - Michel Lagneau, Jul 13 2016
The union of this sequence and A282326 gives A132243. - Martin Renner, Feb 11 2017
The union of {3,5}, A282321, A282323 and this sequence gives A001359. - Martin Renner, Feb 11 2017
The union of {3,5,7}, A282321, A282322, A282323, A282324, this sequence and A282326 gives A001097. - Martin Renner, Feb 11 2017
Number of terms less than 10^k, k=2,3,4,...: 2, 11, 72, 407, 2697, 19507, 146516, ... - Muniru A Asiru, Jan 29 2018

Examples

			For the pair {149,151} (149 + 151)/2 = 5*30.
		

Crossrefs

Programs

  • GAP
    Filtered(List([0..200], k -> 30*k-1), n -> IsPrime(n) and IsPrime(n+2));  # Muniru A Asiru, Feb 02 2018
  • Magma
    [p: p in PrimesUpTo(7000) | IsPrime(p+2) and p mod 30 eq 29 ]; // Vincenzo Librandi, Feb 13 2017
    
  • Maple
    isA060229 := proc(n)
        if modp(n+1,30) =0 and isprime(n) and isprime(n+2) then
            true;
        else
            false;
        end if;
    end proc:
    A060229 := proc(n)
        option remember;
        if n =1 then
            29;
        else
            for a from procname(n-1)+2 by 2 do
                if isA060229(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A060229(n),n=1..80) ; # R. J. Mathar, Feb 19 2017
  • Mathematica
    Select[Prime@ Range[10^3], PrimeQ[# + 2] && Mod[# + 1, 30] == 0 &] (* Michael De Vlieger, Jul 14 2016 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+2) && !((n+1) % 30); \\ Michel Marcus, Dec 11 2013
    

Extensions

Minor edits by Ray Chandler, Apr 02 2009

A275725 a(n) = A275723(A002110(1+A084558(n)), n); prime factorization encodings of cycle-polynomials computed for finite permutations listed in the order that is used in tables A060117 / A060118.

Original entry on oeis.org

2, 4, 18, 8, 12, 8, 150, 100, 54, 16, 24, 16, 90, 40, 54, 16, 36, 16, 60, 40, 36, 16, 24, 16, 1470, 980, 882, 392, 588, 392, 750, 500, 162, 32, 48, 32, 270, 80, 162, 32, 108, 32, 120, 80, 72, 32, 48, 32, 1050, 700, 378, 112, 168, 112, 750, 500, 162, 32, 48, 32, 450, 200, 162, 32, 72, 32, 300, 200, 108, 32, 48, 32, 630, 280, 378, 112, 252, 112, 450, 200
Offset: 0

Views

Author

Antti Karttunen, Aug 09 2016

Keywords

Comments

In this context "cycle-polynomials" are single-variable polynomials where the coefficients (encoded with the exponents of prime factorization of n) are equal to the lengths of cycles in the permutation listed with index n in tables A060117 or A060118. See the examples.

Examples

			Consider the first eight permutations (indices 0-7) listed in A060117:
  1 [Only the first 1-cycle explicitly listed thus a(0) = 2^1 = 2]
  2,1 [One transposition (2-cycle) in beginning, thus a(1) = 2^2 = 4]
  1,3,2 [One fixed element in beginning, then transposition, thus a(2) = 2^1 * 3^2 = 18]
  3,1,2 [One 3-cycle, thus a(3) = 2^3 = 8]
  3,2,1 [One transposition jumping over a fixed element, a(4) = 2^2 * 3^1 = 12]
  2,3,1 [One 3-cycle, thus a(5) = 2^3 = 8]
  1,2,4,3 [Two 1-cycles, then a 2-cycle, thus a(6) = 2^1 * 3^1 * 5^2 = 150].
  2,1,4,3 [Two 2-cycles, not crossed, thus a(7) = 2^2 * 5^2 = 100]
and also the seventeenth one at n=16 [A007623(16)=220] where we have:
  3,4,1,2 [Two 2-cycles crossed, thus a(16) = 2^2 * 3^2 = 36].
		

Crossrefs

Cf. A275807 (terms divided by 2).
Cf. also A275733, A275734, A275735 for other such prime factorization encodings of A060117/A060118-related polynomials.

Programs

Formula

a(n) = A275723(A002110(1+A084558(n)), n).
Other identities:
A001221(a(n)) = 1+A257510(n) (for all n >= 1).
A001222(a(n)) = 1+A084558(n).
A007814(a(n)) = A275832(n).
A048675(a(n)) = A275726(n).
A051903(a(n)) = A275803(n).
A056169(a(n)) = A275851(n).
A046660(a(n)) = A060130(n).
A072411(a(n)) = A060131(n).
A056170(a(n)) = A060128(n).
A275812(a(n)) = A060129(n).
a(n!) = 2 * A243054(n) = A000040(n)*A002110(n) for all n >= 1.

A327978 Numbers whose arithmetic derivative (A003415) is a primorial number (A002110) > 1.

Original entry on oeis.org

9, 161, 209, 221, 2189, 2561, 3281, 3629, 5249, 5549, 6401, 7181, 7661, 8321, 8909, 9089, 9869, 10001, 10349, 10541, 10961, 11009, 11021, 29861, 38981, 52601, 66149, 84101, 93029, 97481, 132809, 150281, 158969, 163301, 197669, 214661, 227321, 235721, 285449, 321989, 338021, 357881, 369701, 381449, 385349, 416261, 420089, 442889
Offset: 1

Views

Author

Antti Karttunen, Oct 09 2019

Keywords

Comments

Numbers n such that A327859(n) = A276086(A003415(n)) is an odd prime.
Composite terms in A328232.
Although it first might seem that the numbers whose arithmetic derivative is A002110(k) all appear before any of those whose arithmetic derivative is A002110(k+1), that is not true, as for example, we have a(56) = 570149, and A003415(570149) = 2310, a(57) = 570209, and A003415(570209) = 30030, but then a(58) = 573641 with A003415(573641) = 2310 again.
Because this is a subsequence of A327862 (all primorials > 1 are of the form 4k+2), only odd numbers are present.
Conjecture: No multiples of 5 occur in this sequence, and no multiples of 3 after the initial 9.
Of the first 10000 terms, all others are semiprimes (with 9 the only square one), except 1547371 = 7^2 * 23 * 1373 and 79332523 = 17^2 * 277 * 991, the latter being the only known term whose decimal expansion ends with 3. If all solutions were semiprimes p*q such that p+q = A002110(k) for some k > 1 (see A002375), it would be a sufficient reason for the above conjecture to hold. - David A. Corneth and Antti Karttunen, Oct 11 2019
In any case, the solutions have to be of the form "odd numbers with an even number of prime factors with multiplicity" (see A235992), and terms must also be cubefree (A004709), as otherwise the arithmetic derivative would not be squarefree.
Sequence A366890 gives the non-Goldbachian solutions, i.e., numbers that are not semiprimes. See also A368702. - Antti Karttunen, Jan 17 2024

Crossrefs

Cf. A351029 (number of k for which k' = A002110(n)).
Cf. A368703, A368704 (the least and the greatest k for which k' = A002110(n)).
Cf. A366890 (terms that are not semiprimes), A368702 (numbers k such that k' is one of the terms of this sequence).
Subsequence of following sequences: A004709, A189553, A327862, A328232, A328234.

Programs

  • Mathematica
    ad[n_] := n * Total @ (Last[#]/First[#] & /@ FactorInteger[n]); primQ[n_] := Max[(f = FactorInteger[n])[[;;,2]]] == 1 && PrimePi[f[[-1,1]]] == Length[f]; Select[Range[10^4], primQ[ad[#]] &] (* Amiram Eldar, Oct 11 2019 *)
  • PARI
    A002620(n) = ((n^2)>>2);
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    A276150(n) = { my(s=0, p=2, d); while(n, d = (n%p); s += d; n = (n-d)/p; p = nextprime(1+p)); (s); };
    isA327978flat(n) = { my(u=A003415(n)); ((u>1)&&(1==A276150(u))); }; \\ Slow!
    k=0; for(n=1,A002620(30030),if(isA327978flat(n), k++; write("b327978.txt", k, " ", n)));

Formula

A327969(a(n)) = 4 for all n.
Previous Showing 11-20 of 1919 results. Next