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

A054989 Number of prime divisors of -1 + (product of first n primes).

Original entry on oeis.org

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

Views

Author

Arne Ring (arne.ring(AT)epost.de), May 30 2000

Keywords

Examples

			a(4)=2 because 2*3*5*7 - 1 = 209 = 11*19
		

Crossrefs

Programs

  • Mathematica
    a[q_] := Module[{x, n}, x=FactorInteger[Product[Table[Prime[i], {i, q}][[j]], {j, q}]-1]; n=Length[x]; Sum[Table[x[[i]][[2]], {i, n}][[j]], {j, n}]]
    PrimeOmega[#] & /@ (FoldList[Times, Prime[Range[81]]] - 1) (* Harvey P. Dale, Mar 11 2017 *)

Extensions

More terms from Robert G. Wilson v, Mar 24 2001
a(42)-a(81) from Charles R Greathouse IV, May 07 2011
a(82)-a(87) from Amiram Eldar, Oct 03 2019

A104357 a(n) = A104350(n) - 1.

Original entry on oeis.org

0, 1, 5, 11, 59, 179, 1259, 2519, 7559, 37799, 415799, 1247399, 16216199, 113513399, 567566999, 1135133999, 19297277999, 57891833999, 1099944845999, 5499724229999, 38498069609999, 423478765709999, 9740011611329999
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2005

Keywords

Crossrefs

Programs

  • Mathematica
    A104350[n_] := Product[FactorInteger[k][[-1, 1]], {k, 1, n}]; Table[A104350[n] - 1, {n, 1, 50}] (* G. C. Greubel, May 09 2017 *)
    FoldList[Times,Table[FactorInteger[n][[-1,1]],{n,30}]]-1 (* Harvey P. Dale, May 28 2018 *)

Formula

a(n) = (a(n-1) + 1) * A006530(n) - 1 for n>1, a(1) = 0;

A002584 Largest prime factor of product of first n primes - 1, or 1 if no such prime exists.

Original entry on oeis.org

1, 5, 29, 19, 2309, 30029, 8369, 929, 46027, 81894851, 876817, 38669, 304250263527209, 92608862041, 59799107, 1143707681, 69664915493, 1146665184811, 17975352936245519, 2140320249725509
Offset: 1

Views

Author

Keywords

Comments

The products of the first primes are called primorial numbers. - Franklin T. Adams-Watters, Jun 12 2014

References

  • M. Kraitchik, On the divisibility of factorials, Scripta Math., 14 (1948), 24-26 (but beware errors).
  • M. Kraitchik, Introduction à la Théorie des Nombres. Gauthier-Villars, Paris, 1952, p. 2.
  • 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).

Crossrefs

Programs

  • Mathematica
    Prepend[Table[ Max[Transpose[FactorInteger[(Times @@ Prime[Range[i]]) - 1]][[1]]], {i, 2, 20}], 1]
    FactorInteger[#][[-1,1]]&/@Rest[FoldList[Times,1,Prime[Range[20]]]-1] (* Harvey P. Dale, Feb 27 2013 *)
  • PARI
    a(n)=if(n>1, my(f=factor(prod(i=1,f,prime(i)))[,1]); f[#f], 1) \\ Charles R Greathouse IV, Feb 08 2017

Formula

a(n) = A006530(A057588(n)). - Amiram Eldar, Feb 13 2020

Extensions

More terms from J. L. Selfridge
Further terms from Labos Elemer, Oct 25 2000

A276155 Complement of A276154; numbers that cannot be obtained by shifting left the primorial base representation (A049345) of some number.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 10, 11, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 33, 34, 35, 37, 39, 40, 41, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 63, 64, 65, 67, 69, 70, 71, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 93, 94, 95, 97, 99, 100, 101, 103, 105, 106, 107, 108, 109
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2016

Keywords

Comments

The first 25 terms, when viewed in primorial base (A049345) look as: 1, 11, 20, 21, 101, 111, 120, 121, 201, 211, 220, 221, 300, 301, 310, 311, 320, 321, 400, 401, 410, 411, 420, 421, 1001.

Crossrefs

Complement: A276154.
Row 1 of A276943 and A286623. Column 1 of A276945 and A286625.
Cf. A005408, A057588, A061720, A143293, A286630 (subsequences).
For the first 17 terms coincides with A273670.

Programs

  • Mathematica
    nn = 109; b = MixedRadix[Reverse@ Prime@ NestWhileList[# + 1 &, 1, Times @@ Prime@ Range[# + 1] <= nn &]]; Complement[Range@ nn, Table[FromDigits[#, b] &@ Append[IntegerDigits[n, b], 0], {n, 0, nn}]] (* Version 10.2, or *)
    nn = 109; 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]]]; Complement[Range@ nn, Table[Total[Times @@@ Transpose@ {Map[Times @@ # &, Prime@ Range@ Range[0, Length@ # - 1]], Reverse@ #}] &@ Append[f@ n, 0], {n, 0, nn}]] (* Michael De Vlieger, Aug 26 2016 *)

A286941 Irregular triangle read by rows: the n-th row corresponds to the totatives of the n-th primorial, A002110(n).

Original entry on oeis.org

1, 1, 5, 1, 7, 11, 13, 17, 19, 23, 29, 1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209
Offset: 1

Views

Author

Jamie Morken and Michael De Vlieger, May 16 2017

Keywords

Comments

Values in row n of a(n) are those of row n of A286942 complement those of row n of A279864.
From Michael De Vlieger, May 18 2017: (Start)
Numbers t < p_n# such that gcd(t, p_n#) = 0, where p_n# = A002110(n).
Numbers in the reduced residue system of A002110(n).
A005867(n) = number of terms of a(n) in row n; local minimum of Euler's totient function.
A048862(n) = number of primes in row n of a(n).
A048863(n) = number of nonprimes in row n of a(n).
Since 1 is coprime to all n, it delimits the rows of a(n).
The prime A000040(n+1) is the second term in row n since it is the smallest prime coprime to A002110(n) by definition of primorial.
The smallest composite in row n is A001248(n+1) = A000040(n+1)^2.
The Kummer numbers A057588(n) = A002110(n) - 1 are the last terms of rows n, since (n - 1) is less than and coprime to all positive n. (End)

Examples

			The triangle starts
1;
1, 5;
1, 7, 11, 13, 17, 19, 23, 29;
1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209;
		

Crossrefs

Cf. A285784 (nonprimes that appear), A335334 (row sums).

Programs

  • Mathematica
    Table[Function[P, Select[Range@ P, CoprimeQ[#, P] &]]@ Product[Prime@ i, {i, n}], {n, 4}] // Flatten (* Michael De Vlieger, May 18 2017 *)
  • PARI
    row(n) = my(P=factorback(primes(n))); select(x->(gcd(x, P) == 1), [1..P]); \\ Michel Marcus, Jun 02 2020

Extensions

More terms from Michael De Vlieger, May 18 2017

A057713 Smallest prime divisor of Kummer numbers ( = primorials - 1), or 1 if no such prime exists.

Original entry on oeis.org

1, 5, 29, 11, 2309, 30029, 61, 53, 37, 79, 228737, 229, 304250263527209, 141269, 191, 87337, 27600124633, 1193, 163, 260681003321, 313, 163, 139, 23768741896345550770650537601358309, 66683, 2990092035859, 15649, 17515703, 719, 295201, 15098753, 10172884549, 20962699238647, 4871, 673, 311, 1409, 1291, 331, 1450184819, 23497, 711427, 521, 673, 519577, 1372062943, 56543, 811, 182309, 53077, 641, 349, 389
Offset: 1

Views

Author

Labos Elemer, Oct 25 2000

Keywords

Examples

			6th term in the sequence corresponds to 7th primorial = 510510 and 510509 = 61 * 8369, so a(7) = 61.
		

Crossrefs

Programs

  • Mathematica
    Map[If[PrimeQ@ #, #, FactorInteger[#][[1, 1]]] &, FoldList[#1 #2 &, Prime@ Range@ 36] - 1] (* Michael De Vlieger, Feb 18 2017 *)

Formula

a(n) = A020639(A057588(n)). - Amiram Eldar, Feb 13 2020

Extensions

More terms from Klaus Brockhaus, Larry Reeves (larryr(AT)acm.org) and Robert G. Wilson v, Apr 02 2001

A377871 Numbers k such that neither k nor A276085(k) has divisors of the form p^p, where A276085 is fully additive with a(p) = p#/p.

Original entry on oeis.org

2, 3, 5, 6, 7, 10, 11, 13, 14, 17, 18, 19, 22, 23, 26, 29, 30, 31, 34, 37, 38, 41, 42, 43, 45, 46, 47, 50, 53, 58, 59, 61, 62, 63, 66, 67, 70, 71, 73, 74, 75, 78, 79, 82, 83, 86, 89, 90, 94, 97, 98, 99, 101, 102, 103, 105, 106, 107, 109, 110, 113, 114, 117, 118, 122, 125, 126, 127, 130, 131, 134, 137, 138, 139, 142
Offset: 1

Views

Author

Antti Karttunen, Nov 10 2024

Keywords

Comments

Range of A276087, where A276087(n) = A276086(A276086(n)) [the twofold application of the primorial base exp-function].
A276087(0) = 2, and for n >= 0, A276087(A143293(n)) = A000040(n+2), therefore all primes are included.
From Antti Karttunen, Nov 17 2024: (Start)
Even semiprimes > 4 form a subsequence, because A006862 (Euclid numbers) is a subsequence of A048103. Note that A276087(A376416(n)) = A276086(A006862(n)) = A100484(1+n). On the other hand, none of the odd semiprimes, A046315, occur here, because they are all included in A369002, and thus in A377873. Similarly, A276092 after its initial 1 is a subsequence, because A057588 (Kummer numbers) is also a subsequence of A048103.
For k=1..6, there are 6, 52, 486, 4775, 46982, 467372 terms <= 10^k. Question: Does this sequence have an asymptotic density?
(End)

Examples

			A276087(A002110(10)) = A276086(A276086(A002110(10))) = A276086(A000040(10+1)) = A276086(31) = 14, therefore 14 is included in this sequence.
		

Crossrefs

Intersection of A048103 and A377869.
Sequence A276087 sorted into ascending order.
Cf. A377870 (characteristic function).
Subsequences: A000040, A100484 (after its initial 4), A276092 (after its initial 1).

Programs

A057706 Smaller of twin primes whose average is a primorial number.

Original entry on oeis.org

5, 29, 2309
Offset: 1

Views

Author

Labos Elemer, Oct 24 2000

Keywords

Comments

According to Caldwell, the next term, if it exists, has more than 100000 digits. - T. D. Noe, May 08 2012

Examples

			(5+7)/2 = 6 = 2*3, (29+31)/2 = 30 = 2*3*5, (2309+2311)/2 = 2310 = 2*3*5*7*11.
		

Crossrefs

Cf. A000040 (primes), A002110 (primorials, p#).
Cf. A006862 (Euclid, p#+1), A005234 (prime p#+1), A014545 (index prime p#+1).
Cf. A057588 (Kummer, p#-1), A006794 (prime p#-1), A057704 (index prime p#-1).

Programs

  • Mathematica
    Select[FoldList[Times, Prime@ Range@ 40], AllTrue[# + {-1, 1}, PrimeQ] &] - 1 (* Michael De Vlieger, Jul 15 2017 *)
  • Python
    from sympy import isprime, prime, primerange
    def auptoprimorial(limit):
      phash, alst = 1, []
      for p in primerange(1, prime(limit)+1):
        phash *= p
        if isprime(phash-1) and isprime(phash+1): alst.append(phash-1)
      return alst
    print(auptoprimorial(5)) # Michael S. Branicky, May 29 2021

Extensions

Offset corrected by Arkadiusz Wesolowski, May 08 2012

A060882 a(n) = n-th primorial (A002110) minus next prime.

Original entry on oeis.org

-1, -1, 1, 23, 199, 2297, 30013, 510491, 9699667, 223092841, 6469693199, 200560490093, 7420738134769, 304250263527167, 13082761331669983, 614889782588491357, 32589158477190044671, 1922760350154212639009
Offset: 0

Views

Author

N. J. A. Sloane, May 05 2001

Keywords

Comments

It is well-known and easy to prove (see Honsbeger) that a(n) > 0 for n > 1. - N. J. A. Sloane, Jul 05 2009
Terms are pairwise coprime with very high probability. I didn't find terms which are pairwise noncoprime, although it may be a case of the "strong law of small numbers." - Daniel Forgues, Apr 23 2012

References

  • R. Honsberger, Mathematical Diamonds, MAA, 2003, see p. 79. [Added by N. J. A. Sloane, Jul 05 2009]

Crossrefs

Programs

  • Maple
    pp:=n->mul(ithprime(i),i=1..n);
    [seq(pp(n)-ithprime(n+1),n=1..20)];
  • Mathematica
    Join[{-1},With[{nn=20},#[[1]]-#[[2]]&/@Thread[{FoldList[Times,1, Prime[ Range[nn]]],Prime[Range[nn+1]]}]]] (* Harvey P. Dale, May 10 2013 *)
  • PARI
    { n=-1; m=1; forprime (p=2, prime(101), write("b060882.txt", n++, " ", m - p); m*=p; ) } \\ Harry J. Smith, Jul 13 2009
    
  • Python
    from sympy import prime, primorial
    def A060882(n): return primorial(n)-prime(n+1) if n else -1 # Chai Wah Wu, Feb 25 2023

A060881 n-th primorial (A002110) + prime(n + 1).

Original entry on oeis.org

3, 5, 11, 37, 221, 2323, 30047, 510529, 9699713, 223092899, 6469693261, 200560490167, 7420738134851, 304250263527253, 13082761331670077, 614889782588491463, 32589158477190044789, 1922760350154212639131
Offset: 0

Views

Author

N. J. A. Sloane, May 05 2001

Keywords

Comments

Terms are pairwise coprime with very high probability. I didn't find terms which are pairwise noncoprime, although it may be a case of the "strong law of small numbers." - Daniel Forgues, Apr 23 2012
All numbers in the range [primorial(n)+2, a(n)-1] are guaranteed to be a multiple of a prime p whose index is <= n. There are prime(n+1)-2 = A040976(n+1) such numbers. - Jamie Morken and Michel Marcus, Feb 01 2018

Examples

			a(2) = 2*3 + 5 = 11.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(ithprime(k), k=1..n)+ithprime(n+1): seq(a(n), n=0..20);  # Muniru A Asiru, Feb 01 2018
  • Mathematica
    Module[{nn=20,pr},pr=Prime[Range[nn+1]];Join[{3},FoldList[ Times,Most[ pr]] + Rest[pr]]] (* Harvey P. Dale, Feb 19 2016 *)
    Total /@ Fold[Append[#1, {Prime[#2] #1[[-1, 1]], Prime[#2 + 1]}] &, {{1, 2}}, Range@ 17] (* Michael De Vlieger, Feb 21 2018 *)
  • PARI
    { n=-1; m=1; forprime (p=2, prime(101), write("b060881.txt", n++, " ", m + p); m*=p; ) } \\ Harry J. Smith, Jul 19 2009
    
  • PARI
    a(n) = prod(i=1, n, prime(i)) + prime(n+1); \\ Michel Marcus, Feb 01 2018

Formula

a(n) = A002110(n) + A000040(n+1). - Michel Marcus, Feb 01 2018

Extensions

Name changed by David A. Corneth, Mar 25 2018
Previous Showing 11-20 of 39 results. Next