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

A070801 Largest prime <= sigma(n): a(n) = prevprime(sigma(n)), where prevprime(n) = A007917(n), the largest prime less than or equal to n.

Original entry on oeis.org

3, 3, 7, 5, 11, 7, 13, 13, 17, 11, 23, 13, 23, 23, 31, 17, 37, 19, 41, 31, 31, 23, 59, 31, 41, 37, 53, 29, 71, 31, 61, 47, 53, 47, 89, 37, 59, 53, 89, 41, 89, 43, 83, 73, 71, 47, 113, 53, 89, 71, 97, 53, 113, 71, 113, 79, 89, 59, 167, 61, 89, 103, 127, 83, 139, 67, 113, 89
Offset: 2

Views

Author

Labos Elemer, May 08 2002

Keywords

Comments

Largest integer k such that A000203(k) <= A000203(n)+1. - Antti Karttunen, Nov 07 2017, after Benoit Cloitre's Mar 17 2002 comment in A007917.

Examples

			For n=100: sigma(100) = 217, prevprime(217) = 211 = a(100).
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[PrimePi[DivisorSigma[1, w]]], {w, 2, 128}]
    Table[NextPrime[DivisorSigma[1, n] + 1, -1], {n, 2, 128}] (* Amiram Eldar, Mar 01 2024 *)
  • PARI
    A070801(n) = precprime(sigma(n)); \\ Antti Karttunen, Nov 07 2017
    
  • Scheme
    (define (A070801 n) (let ((s1 (+ 1 (A000203 n)))) (let loop ((k s1)) (if (<= (A000203 k) s1) k (loop (- k 1)))))) ;; (For code of A000203, see under that entry). Antti Karttunen, Nov 07 2017

Formula

a(n) = A000040(A000720(sigma(n))) = A007917(A000203(n)).
From Reinhard Zumkeller, Jun 26 2003: (Start)
A085379(n) <= a(n).
a(A085380(n)) = A085379(A085380(n)).
a(A085381(n)) > A085379(A085381(n)).
a(A023194(n)) = A000203(A023194(n)). (End)

A157942 Numbers n divisible by the largest prime <= sqrt(n), A007917(A000196(n)).

Original entry on oeis.org

4, 6, 8, 9, 12, 15, 18, 21, 24, 25, 30, 35, 40, 45, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 121, 132, 143, 154, 165, 169, 182, 195, 208, 221, 234, 247, 260, 273, 286, 289, 306, 323, 340, 357, 361, 380, 399, 418, 437, 456, 475, 494, 513, 529, 552, 575, 598
Offset: 1

Views

Author

M. F. Hasler, Mar 09 2009

Keywords

Comments

Includes squares of primes (A001248; exactly the cases where we have "=" in the definition) and products of pairs of consecutive primes (A006094) as subsequences.

Programs

  • Mathematica
    Select[Range[4,599],IntegerQ[#/Prime[PrimePi[Sqrt[#]]]]&] (* Jayanta Basu, May 03 2013 *)
  • PARI
    for( n=4,999, n % precprime(sqrtint(n)) || print1(n","))

A072681 a(n) = (n - A007917(n)) * (A007918(n) - n).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 3, 4, 3, 0, 1, 0, 3, 4, 3, 0, 1, 0, 3, 4, 3, 0, 5, 8, 9, 8, 5, 0, 1, 0, 5, 8, 9, 8, 5, 0, 3, 4, 3, 0, 1, 0, 3, 4, 3, 0, 5, 8, 9, 8, 5, 0, 5, 8, 9, 8, 5, 0, 1, 0, 5, 8, 9, 8, 5, 0, 3, 4, 3, 0, 1, 0, 5, 8, 9, 8, 5, 0, 3, 4, 3, 0, 5, 8, 9, 8, 5, 0, 7, 12, 15, 16, 15, 12, 7, 0, 3, 4, 3, 0, 1, 0
Offset: 2

Views

Author

Reinhard Zumkeller, Jul 01 2002

Keywords

Comments

a(n)=0 iff n is prime.
Local maxima occur at interprimes: a(A024675(n)) = A074927(n+1). - Reinhard Zumkeller, Mar 04 2009
Expanding upon the maxima comment, repetitive subset triplets (like 3,4,3) of form (k,k+1,k) occur when the middle value is a square. - Bill McEachen, Apr 14 2025

Crossrefs

Programs

  • Mathematica
    a[n_] := (n - NextPrime[n+1, -1])*(NextPrime[n] - n); Table[a[n], {n, 2, 103}] (* Jean-François Alcover, Jun 14 2013 *)

Formula

a(n) = A064722(n) * A007920(n).
a(n) = A064722(n) * (A072680(n) - A064722(n)).

A157941 Numbers n divisible by the largest prime < sqrt(n), A007917(A000196(n-1)).

Original entry on oeis.org

6, 8, 12, 15, 18, 21, 24, 30, 35, 40, 45, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 132, 143, 154, 165, 182, 195, 208, 221, 234, 247, 260, 273, 286, 306, 323, 340, 357, 380, 399, 418, 437, 456, 475, 494, 513, 552, 575, 598, 621, 644, 667, 690, 713, 736, 759
Offset: 1

Views

Author

M. F. Hasler, Mar 09 2009

Keywords

Comments

Includes products of pairs of consecutive primes (A006094) as subsequence, equals A157942 with squares of primes (A001248) removed.
For a number < 5 the definition does not make much sense, since there is no prime < sqrt(4) = 2, so we don't consider them here.

Programs

  • Mathematica
    Select[Range[6,800],Divisible[#,NextPrime[Sqrt[#],-1]]&] (* Harvey P. Dale, Sep 14 2019 *)
  • PARI
    for( n=5,999, n % precprime(sqrtint(n-1)) || print1(n","))

A157934 Numbers m such that m^2+1 is prime and m^2-7 = prevprime(m^2) (= A007917(m^2)).

Original entry on oeis.org

54, 66, 90, 156, 240, 270, 306, 474, 570, 576, 636, 750, 780, 1080, 1320, 1350, 2034, 2154, 2406, 2700, 2760, 3204, 3240, 3306, 3480, 3516, 3756, 3774, 3984, 4056, 4086, 4140, 4146, 4176, 4716, 4734, 4794, 5154, 5370, 5424, 5550, 5664, 5700, 5850, 5856
Offset: 1

Views

Author

M. F. Hasler, Mar 18 2009

Keywords

Comments

The corresponding primes are listed in A157183 resp. A157935.

Crossrefs

Programs

  • Mathematica
    Select[Range[6000],PrimeQ[#^2+1]&&#^2-7==NextPrime[#^2,-1]&] (* Harvey P. Dale, Mar 19 2020 *)
  • PARI
    forstep(m=2,9999,2, isprime(m^2+1) & precprime(m^2)==m^2-7 & print1(m,","))

A157935 Primes of the form m^2+1 such that m^2-7 = prevprime(m^2) (= A007917(m^2)).

Original entry on oeis.org

2917, 4357, 8101, 24337, 57601, 72901, 93637, 224677, 324901, 331777, 404497, 562501, 608401, 1166401, 1742401, 1822501, 4137157, 4639717, 5788837, 7290001, 7617601, 10265617, 10497601, 10929637, 12110401, 12362257, 14107537, 14243077
Offset: 1

Views

Author

M. F. Hasler, Mar 18 2009

Keywords

Comments

A subsequence of A005574. The values for m are listed in A157934, the next lower prime in A157183.

Crossrefs

Programs

  • Mathematica
    Select[Range[4000]^2+1,PrimeQ[#]&&NextPrime[#,-1]==#-8&] (* Harvey P. Dale, Jun 14 2020 *)
  • PARI
    forstep(m=2,9999,2, isprime(m^2+1) & precprime(m^2)==m^2-7 & print1(m^2+1,","))

Formula

a(n) = A157934(n)^2+1 = A157183(n)+8

A157939 Numbers n divisible by precprime(sqrt(n)) or nextprime(sqrt(n)) but not both, where precprime=A007917, nextprime=A007918.

Original entry on oeis.org

8, 10, 12, 18, 20, 21, 24, 28, 30, 40, 42, 45, 55, 56, 63, 66, 70, 84, 88, 91, 98, 99, 105, 110, 112, 119, 130, 132, 154, 156, 165, 170, 182, 187, 195, 204, 208, 234, 238, 247, 255, 260, 272, 273, 286, 304, 306, 340, 342, 357, 368, 380, 391, 399, 414, 418, 456
Offset: 1

Views

Author

M. F. Hasler, Mar 10 2009

Keywords

Comments

Equal to the union of its disjoint subsequences A157938 and A157940.

Examples

			For n=1,2,3, precprime(sqrt(n)) is undefined, so these are not considered here. a(1) = 8 is divisible by 2=precprime(sqrt(8)) but not by 3=nextprime(sqrt(8)).
a(2) = 10 is divisible by 5=nextprime(sqrt(10)) but not by 3=precprime(sqrt(8)).
n=4,6,9,... are excluded since divisible by both precprime(sqrt(n)) and nextprime(sqrt(n)). (Note that precprime=A007917 and nextprime=A007918 are defined using weak inequalities.) n=5,7,11,13 but also 14 are excluded since not divisible by precprime(sqrt(n)) nor by nextprime(sqrt(n)).
		

Programs

  • Mathematica
    ndQ[n_]:=Module[{s=Sqrt[n]},Total[Boole[{Divisible[n,NextPrime[ s]], Divisible[ n, NextPrime[ s,-1]]}]]==1]; Select[Range[5,500],ndQ] (* Harvey P. Dale, Mar 19 2019 *)
  • PARI
    for( n=4,999, !(n % nextprime(sqrtint(n-1)+1)) != !(n % precprime(sqrtint(n))) & print1(n",")) /* sqrtint(n-1)+1 avoids rounding errors but can be replaced by sqrt(n) for small n */

Formula

A157939 = A157938 union A157940 = A157937 /\ A157941 = A157936 /\ A157942, where A /\ B = (A u B) \ (A n B) = (A \ B) u (B \ A) is the symmetric difference; A157937 intersect A157941 = A006094 = (A157936 intersect A157942) \ A001248.

A383358 Numbers k >= 2 such that (S(k) - I(k)) / (k - 1) is an integer, where S(k) = Sum_{i=2..k} A007918(i) and I(k) = Sum_{i=2..k} A007917(i).

Original entry on oeis.org

2, 3, 16, 21, 23, 39, 49, 381, 396, 24963, 39762, 40101, 40276, 4431583, 21553054, 36244531, 2183957515, 2183971285, 2183971945, 3636636400, 3636636411, 6063744535, 16846463635, 28070695902, 215867952637, 359222008925, 597739400517, 597739400913, 597739426757
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 24 2025

Keywords

Examples

			k = 16: ((Sum_{i=2..k} A007918(i)) - (Sum_{i=2..k} A007917(i))) / (k - 1) = (150 - 120) / 15 = 2, thus k = 16 is a term.
		

References

  • Kenichiro Kashihara, Problem 10 in Comments and topics on Smarandache notions and problems, Erhus University Press, USA, 1996.

Crossrefs

Programs

  • Mathematica
    With[{m = 10^7}, (Position[Accumulate[Table[If[PrimeQ[n], 0, NextPrime[n] - NextPrime[n, -1]], {n, 2, m+1}]]/Range[m], ?IntegerQ] // Flatten) + 1] (* _Amiram Eldar, Apr 24 2025 *)
  • PARI
    list(lim) = {my(k = 0, c = 0, p = 2, g); forprime(q = 3, lim, g = q-p; k++; if(!(c % k), print1(k+1, ", ")); for(i = 1, g-1, c += g; k++; if(!(c % k), print1(k+1, ", "))); p = q);} \\ Amiram Eldar, Apr 24 2025

Extensions

a(10)-a(23) from Amiram Eldar, Apr 24 2025
a(24)-a(29) from Jinyuan Wang, Apr 28 2025

A003418 Least common multiple (or LCM) of {1, 2, ..., n} for n >= 1, a(0) = 1.

Original entry on oeis.org

1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 27720, 27720, 360360, 360360, 360360, 720720, 12252240, 12252240, 232792560, 232792560, 232792560, 232792560, 5354228880, 5354228880, 26771144400, 26771144400, 80313433200, 80313433200, 2329089562800, 2329089562800
Offset: 0

Views

Author

Roland Anderson (roland.anderson(AT)swipnet.se)

Keywords

Comments

The minimal exponent of the symmetric group S_n, i.e., the least positive integer for which x^a(n)=1 for all x in S_n. - Franz Vrabec, Dec 28 2008
Product over all primes of highest power of prime less than or equal to n. a(0) = 1 by convention.
Also smallest number whose set of divisors contains an n-term arithmetic progression. - Reinhard Zumkeller, Dec 09 2002
An assertion equivalent to the Riemann hypothesis is: | log(a(n)) - n | < sqrt(n) * log(n)^2. - Lekraj Beedassy, Aug 27 2006. (This is wrong for n = 1 and n = 2. Should "for n large enough" be added? - Georgi Guninski, Oct 22 2011)
Corollary 3 of Farhi gives a proof that a(n) >= 2^(n-1). - Jonathan Vos Post, Jun 15 2009
Appears to be row products of the triangle T(n,k) = b(A010766) where b = A130087/A130086. - Mats Granvik, Jul 08 2009
Greg Martin (see link) proved that "the product of the Gamma function sampled over the set of all rational numbers in the open interval (0,1) whose denominator in lowest terms is at most n" equals (2*Pi)^(1/2)*a(n)^(-1/2). - Jonathan Vos Post, Jul 28 2009
a(n) = lcm(A188666(n), A188666(n)+1, ..., n). - Reinhard Zumkeller, Apr 25 2011
a(n+1) is the smallest integer such that all polynomials a(n+1)*(1^i + 2^i + ... + m^i) in m, for i=0,1,...,n, are polynomials with integer coefficients. - Vladimir Shevelev, Dec 23 2011
It appears that A020500(n) = a(n)/a(n-1). - Asher Auel, corrected by Bill McEachen, Apr 05 2024
n-th distinct value = A051451(n). - Matthew Vandermast, Nov 27 2009
a(n+1) = least common multiple of n-th row in A213999. - Reinhard Zumkeller, Jul 03 2012
For n > 2, (n-1) = Sum_{k=2..n} exp(a(n)*2*i*Pi/k). - Eric Desbiaux, Sep 13 2012
First column minus second column of A027446. - Eric Desbiaux, Mar 29 2013
For n > 0, a(n) is the smallest number k such that n is the n-th divisor of k. - Michel Lagneau, Apr 24 2014
Slowest growing integer > 0 in Z converging to 0 in Z^ when considered as profinite integer. - Herbert Eberle, May 01 2016
What is the largest number of consecutive terms that are all equal? I found 112 equal terms from a(370261) to a(370372). - Dmitry Kamenetsky, May 05 2019
Answer: there exist arbitrarily long sequences of consecutive terms with the same value; also, the maximal run of consecutive terms with different values is 5 from a(1) to a(5) (see link Roger B. Eggleton). - Bernard Schott, Aug 07 2019
Related to the inequality (54) in Ramanujan's paper about highly composite numbers A002182, also used in A199337: a(A329570(m))^2 is a (not minimal) bound above which all highly composite numbers are divisible by m, according to the right part of that inequality. - M. F. Hasler, Jan 04 2020
For n > 2, a(n) is of the form 2^e_1 * p_2^e_2 * ... * p_m^e_m, where e_m = 1 and e = floor(log_2(p_m)) <= e_1. Therefore, 2^e * p_m^e_m is a primitive Zumkeler number (A180332). Therefore, 2^e_1 * p_m^e_m is a Zumkeller number (A083207). Therefore, for n > 2, a(n) = 2^e_1 * p_m^e_m * r, where r is relatively prime to 2*p_m, is a Zumkeller number (see my proof at A002182 for details). - Ivan N. Ianakiev, May 10 2020
For n > 1, 2|(a(n)+2) ... n|(a(n)+n), so a(n)+2 .. a(n)+n are all composite and (part of) a prime gap of at least n. (Compare n!+2 .. n!+n). - Stephen E. Witham, Oct 09 2021

Examples

			LCM of {1,2,3,4,5,6} = 60. The primes up to 6 are 2, 3 and 5. floor(log(6)/log(2)) = 2 so the exponent of 2 is 2.
floor(log(6)/log(3)) = 1 so the exponent of 3 is 1.
floor(log(6)/log(5)) = 1 so the exponent of 5 is 1. Therefore, a(6) = 2^2 * 3^1 * 5^1 = 60. - _David A. Corneth_, Jun 02 2017
		

References

  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 365.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row products of A133233.
Cf. A025528 (number of prime factors of a(n) with multiplicity).
Cf. A275120 (lengths of runs of consecutive equal terms), A276781 (ordinal transform from term a(1)=1 onward).

Programs

  • Haskell
    a003418 = foldl lcm 1 . enumFromTo 2
    -- Reinhard Zumkeller, Apr 04 2012, Apr 25 2011
    
  • Magma
    [1] cat [Exponent(SymmetricGroup(n)) : n in [1..28]]; // Arkadiusz Wesolowski, Sep 10 2013
    
  • Magma
    [Lcm([1..n]): n in [0..30]]; // Bruno Berselli, Feb 06 2015
    
  • Maple
    A003418 := n-> lcm(seq(i,i=1..n));
    HalfFarey := proc(n) local a,b,c,d,k,s; a := 0; b := 1; c := 1; d := n; s := NULL; do k := iquo(n + b, d); a, b, c, d := c, d, k*c - a, k*d - b; if 2*a > b then break fi; s := s,(a/b); od: [s] end: LCM := proc(n) local i; (1/2)*mul(2*sin(Pi*i),i=HalfFarey(n))^2 end: # Peter Luschny
    # next Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, ilcm(n, a(n-1))) end:
    seq(a(n), n=0..33);  # Alois P. Heinz, Jun 10 2021
  • Mathematica
    Table[LCM @@ Range[n], {n, 1, 40}] (* Stefan Steinerberger, Apr 01 2006 *)
    FoldList[ LCM, 1, Range@ 28]
    A003418[0] := 1; A003418[1] := 1; A003418[n_] := A003418[n] = LCM[n,A003418[n-1]]; (* Enrique Pérez Herrero, Jan 08 2011 *)
    Table[Product[Prime[i]^Floor[Log[Prime[i], n]], {i, PrimePi[n]}], {n, 0, 28}] (* Wei Zhou, Jun 25 2011 *)
    Table[Product[Cyclotomic[n, 1], {n, 2, m}], {m, 0, 28}] (* Fred Daniel Kline, May 22 2014 *)
    a1[n_] := 1/12 (Pi^2+3(-1)^n (PolyGamma[1,1+n/2] - PolyGamma[1,(1+n)/2])) // Simplify
    a[n_] := Denominator[Sqrt[a1[n]]];
    Table[If[IntegerQ[a[n]], a[n], a[n]*(a[n])[[2]]], {n, 0, 28}] (* Gerry Martens, Apr 07 2018 [Corrected by Vaclav Kotesovec, Jul 16 2021] *)
  • PARI
    a(n)=local(t); t=n>=0; forprime(p=2,n,t*=p^(log(n)\log(p))); t
    
  • PARI
    a(n)=if(n<1,n==0,1/content(vector(n,k,1/k)))
    
  • PARI
    a(n)=my(v=primes(primepi(n)),k=sqrtint(n),L=log(n+.5));prod(i=1,#v,if(v[i]>k,v[i],v[i]^(L\log(v[i])))) \\ Charles R Greathouse IV, Dec 21 2011
    
  • PARI
    a(n)=lcm(vector(n,i,i)) \\ Bill Allombert, Apr 18 2012 [via Charles R Greathouse IV]
    
  • PARI
    n=1; lim=100; i=1; j=1; until(n==lim, a=lcm(j,i+1); i++; j=a; n++; print(n" "a);); \\ Mike Winkler, Sep 07 2013
    
  • Python
    from functools import reduce
    from operator import mul
    from sympy import sieve
    def integerlog(n,b): # find largest integer k>=0 such that b^k <= n
        kmin, kmax = 0,1
        while b**kmax <= n:
            kmax *= 2
        while True:
            kmid = (kmax+kmin)//2
            if b**kmid > n:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmin
    def A003418(n):
        return reduce(mul,(p**integerlog(n,p) for p in sieve.primerange(1,n+1)),1) # Chai Wah Wu, Mar 13 2021
    
  • Python
    # generates initial segment of sequence
    from math import gcd
    from itertools import accumulate
    def lcm(a, b): return a * b // gcd(a, b)
    def aupton(nn): return [1] + list(accumulate(range(1, nn+1), lcm))
    print(aupton(30)) # Michael S. Branicky, Jun 10 2021
  • Sage
    [lcm(range(1,n)) for n in range(1, 30)] # Zerinvary Lajos, Jun 06 2009
    
  • Scheme
    (define (A003418 n) (let loop ((n n) (m 1)) (if (zero? n) m (loop (- n 1) (lcm m n))))) ;; Antti Karttunen, Jan 03 2018
    

Formula

The prime number theorem implies that lcm(1,2,...,n) = exp(n(1+o(1))) as n -> infinity. In other words, log(lcm(1,2,...,n))/n -> 1 as n -> infinity. - Jonathan Sondow, Jan 17 2005
a(n) = Product (p^(floor(log n/log p))), where p runs through primes not exceeding n (i.e., primes 2 through A007917(n)). - Lekraj Beedassy, Jul 27 2004
Greg Martin showed that a(n) = lcm(1,2,3,...,n) = Product_{i = Farey(n), 0 < i < 1} 2*Pi/Gamma(i)^2. This can be rewritten (for n > 1) as a(n) = (1/2)*(Product_{i = Farey(n), 0 < i <= 1/2} 2*sin(i*Pi))^2. - Peter Luschny, Aug 08 2009
Recursive formula useful for computations: a(0)=1; a(1)=1; a(n)=lcm(n,a(n-1)). - Enrique Pérez Herrero, Jan 08 2011
From Enrique Pérez Herrero, Jun 01 2011: (Start)
a(n)/a(n-1) = A014963(n).
if n is a prime power p^k then a(n)=a(p^k)=p*a(n-1), otherwise a(n)=a(n-1).
a(n) = Product_{k=2..n} (1 + (A007947(k)-1)*floor(1/A001221(k))), for n > 1. (End)
a(n) = A079542(n+1, 2) for n > 1.
a(n) = exp(Sum_{k=1..n} Sum_{d|k} moebius(d)*log(k/d)). - Peter Luschny, Sep 01 2012
a(n) = A025529(n) - A027457(n). - Eric Desbiaux, Mar 14 2013
a(n) = exp(Psi(n)) = 2 * Product_{k=2..A002088(n)} (1 - exp(2*Pi*i * A038566(k+1) / A038567(k))), where i is the imaginary unit, and Psi the second Chebyshev's function. - Eric Desbiaux, Aug 13 2014
a(n) = A064446(n)*A038610(n). - Anthony Browne, Jun 16 2016
a(n) = A000142(n) / A025527(n) = A000793(n) * A225558(n). - Antti Karttunen, Jun 02 2017
log(a(n)) = Sum_{k>=1} (A309229(n, k)/k - 1/k). - Mats Granvik, Aug 10 2019
From Petros Hadjicostas, Jul 24 2020: (Start)
Nair (1982) proved that 2^n <= a(n) <= 4^n for n >= 9. See also Farhi (2009). Nair also proved that
a(n) = lcm(m*binomial(n,m): 1 <= m <= n) and
a(n) = gcd(a(m)*binomial(n,m): n/2 <= m <= n). (End)
Sum_{n>=1} 1/a(n) = A064859. - Bernard Schott, Aug 24 2020

A151800 Least prime > n (version 2 of the "next prime" function).

Original entry on oeis.org

2, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 67, 67, 67, 67, 67, 67, 71, 71, 71, 71, 73, 73, 79
Offset: 0

Views

Author

N. J. A. Sloane, Jun 29 2009

Keywords

Comments

Version 1 of the "next prime" function is A007918: smallest prime >= n.
Maple's nextprime() is this version 2; PARI/GP's nextprime() is version 1.
See A007918 for references and further information.
a(n) is the smallest number greater than one that is not divisible by any 1 < k <= n. Consider a multi-round election in which, in each round, voters each cast one vote for one of the remaining candidates. Then, any candidates which receive the fewest votes in that round are eliminated. This repeats until either one candidate remains, who wins the election, or no candidates remain. a(n) is the smallest nontrivial number of voters that can guarantee a winner if the election initially has n > 0 candidates. This is a consequence of the first fact. - Thomas Anton, Mar 30 2020
Conjecture: if n > 3, then a(n) < n^(n^(1/n)). - Thomas Ordowski, Feb 23 2023

Crossrefs

Programs

Formula

a(n) = A007918(n+1).
a(n) = 1 + Sum_{k=1..2n} (floor((n!^k)/k!) - floor(((n!^k)-1)/k!)). - Anthony Browne, May 11 2016
a(n) = A000040(A036234(n)). - Ridouane Oudra, Sep 30 2024
Showing 1-10 of 133 results. Next