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 91-100 of 130 results. Next

A117101 Numbers k such that nextprime(5*k) > 5*nextprime(k) and k is composite.

Original entry on oeis.org

18, 28, 40, 60, 72, 78, 82, 96, 102, 105, 106, 155, 156, 166, 178, 180, 192, 222, 226, 228, 250, 262, 266, 267, 268, 270, 280, 282, 292, 312, 328, 329, 330, 334, 335, 336, 352, 358, 378, 387, 388, 396, 408, 418, 420, 436, 437, 438, 460, 485, 486, 490, 496, 497
Offset: 1

Views

Author

Mohammed Bouayoun (mohammed.bouayoun(AT)sanef.com), Apr 18 2006

Keywords

Crossrefs

Set difference of A117094 and A000040.
Intersection of A002808 and A117094.
Cf. A007918 (nextprime).

Programs

  • Mathematica
    Select[Range[500], CompositeQ[#] && NextPrime[5*#] > 5*NextPrime[#] &] (* Paolo Xausa, Jul 28 2025 *)
  • PARI
    for(i=1,300,if(nextprime(5*i)>nextprime(5)*nextprime(i) && !isprime(i),print1(i,",")))

Extensions

Name simplified by Paolo Xausa, Jul 28 2025

A118754 Smallest prime >= 5*n.

Original entry on oeis.org

2, 5, 11, 17, 23, 29, 31, 37, 41, 47, 53, 59, 61, 67, 71, 79, 83, 89, 97, 97, 101, 107, 113, 127, 127, 127, 131, 137, 149, 149, 151, 157, 163, 167, 173, 179, 181, 191, 191, 197, 211, 211, 211, 223, 223, 227, 233, 239, 241, 251, 251, 257, 263, 269, 271, 277, 281
Offset: 0

Views

Author

Jonathan Vos Post, Apr 29 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[PrimeQ[5n],5n,NextPrime[5n]],{n,0,60}] (* Harvey P. Dale, Nov 29 2024 *)
  • PARI
    a(n) = nextprime(5*n); \\ Michel Marcus, Feb 13 2021

Formula

a(n) = A007918(A008587(n)). - Michel Marcus, Feb 13 2021

A132435 Composite integers n with two prime factors nearly equidistant from the integer part of the square root of n.

Original entry on oeis.org

4, 6, 9, 10, 14, 22, 25, 35, 49, 55, 65, 77, 85, 91, 119, 121, 143, 169, 187, 209, 221, 247, 253, 289, 299, 319, 323, 361, 377, 391, 407, 437, 493, 527, 529, 551, 589, 629, 667, 697, 703, 713, 841, 851, 899, 943, 961, 989, 1073, 1081, 1147, 1189
Offset: 1

Views

Author

Andrew S. Plewe, Nov 13 2007

Keywords

Comments

An integer n is included if, for some value y >= 0: n = A007918(A000196(n) + y) * A007918(A000196(n) - y) Or: n = nextprime(sqrtint(n) + y) * nextprime(sqrtint(n) - y) Where "nextprime(x)" is the smallest prime number >= to x and "sqrtint(z)" is the integer part of the square root of z.
Has many terms in common with A078972. - Bill McEachen, Dec 24 2020

Examples

			25 = nextprime(5 + 0) * nextprime(5 - 0) = 5 * 5 = 25
35 = nextprime(5 + 1) * nextprime(5 - 1) = 7 * 5 = 35
119 = nextprime(10 + 4) * nextprime(10 - 4) = 17 * 7 = 119
		

Crossrefs

Programs

  • PARI
    bal(x,y) = nextprime(sqrtint(x)+y) * nextprime(sqrtint(x)-y);
    findbal(x) = local(z,y); z=sqrtint(x); while( 0<=z, y=bal(x,z); if(y==x, print1(x", ");break;); z--;);
    for (n=1,1200, findbal(n));

A145344 a(n) = smallest prime >= the smallest positive integer with exactly n divisors.

Original entry on oeis.org

2, 2, 5, 7, 17, 13, 67, 29, 37, 53, 1031, 61, 4099, 193, 149, 127, 65537, 181, 262147, 241, 577, 3079, 4194319, 367, 1297, 12289, 907, 967, 268435459, 727, 1073741827, 853, 9221, 196613, 5189, 1277, 68719476767, 786433, 36871, 1693, 1099511627791
Offset: 1

Views

Author

Leroy Quet, Oct 08 2008

Keywords

Comments

a(n) = smallest prime >= A005179(n).

Crossrefs

Formula

a(n) = A007918(A005179(n)). - Ray Chandler, Oct 12 2008

Extensions

More terms from R. J. Mathar and Ray Chandler, Oct 10 2008

A166597 Let p = largest prime <= n, with p(0)=p(1)=0, and let q = smallest prime > n; then a(n) = q-p.

Original entry on oeis.org

2, 2, 1, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 2, 2, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 2, 2, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 2, 2, 4, 4
Offset: 0

Views

Author

Daniel Forgues, Oct 17 2009

Keywords

Comments

Note the large prime gap of 72 between 31397 and 31469. This is the prime gap with the largest merit (cf. A111870), 72/log(31397)=6.95352 for primes less than 100000. Also 72/(log(31397))^2=0.67154 (cf. conjectures of Cramer-Granville, Shanks and Wolf) is largest for primes less than 100000. - Daniel Forgues, Oct 23 2009

Examples

			a(0) = 2 since the least prime greater than 0 is 2 (gap of 2 from 0 to 2).
a(9) = 4 since the least prime greater than 9 is 11 (gap of 4 from 7 to 11).
a(11) = 2 since the least prime greater than 11 is 13 (gap of 2 from 11 to 13).
		

Crossrefs

Cf. A111870. - Daniel Forgues, Oct 23 2009
See A327441 for the classic G(n) version. - N. J. A. Sloane, Sep 11 2019

Programs

  • Maple
    2,2,seq(nextprime(n)-prevprime(n+1), n=2..100); # Ridouane Oudra, Dec 28 2024
  • Mathematica
    f[n_]:=Module[{a=If[PrimeQ[n],n,NextPrime[n,-1]]}, NextPrime[n]-a]; Join[{2,2},Array[f,120,2]] (* Harvey P. Dale, May 17 2011 *)
  • PARI
    a(n) = nextprime(n+1) - precprime(n); \\ Michel Marcus, Mar 02 2023

Formula

From Ridouane Oudra, Dec 28 2024: (Start)
a(n) = A001223(A000720(n)), for n>1.
a(n) = A151800(n) - A007917(n), for n>1.
a(n) = A007918(n+1) - A151799(n+1), for n>1. (End)

Extensions

Definition rephrased by N. J. A. Sloane, Oct 25 2009

A249053 Defined by (i) a(1)=1; (ii) if you move a(n) steps to the right you must reach a prime; (iii) a(n) = smallest unused composite number greater than a(n-1), unless a(n) is required to be prime by (ii), in which case a(n) is the smallest unused prime greater than a(n-1).

Original entry on oeis.org

1, 2, 4, 5, 6, 8, 11, 12, 13, 14, 17, 18, 20, 23, 24, 25, 26, 29, 30, 31, 32, 37, 38, 41, 42, 44, 45, 47, 48, 53, 54, 55, 59, 60, 62, 63, 67, 68, 71, 72, 73, 74, 79, 80, 81, 82, 83, 84, 89, 90, 97, 98, 101, 102, 104, 105, 106, 108, 109, 110, 113, 114, 115
Offset: 1

Views

Author

N. J. A. Sloane, Nov 01 2014

Keywords

References

  • Eric Angelini, Posting to Sequence Fans Mailing List, Mar 17 2008 (the definition was clarified by Gabriel Cunningham).

Crossrefs

See A249054 for another version.

Programs

  • Haskell
    import Data.Map (singleton, findMin, delete, insert)
    a249053 n = a249053_list !! (n-1)
    a249053_list = 1 : f 1 1 a002808_list (singleton 1 1) where
       f x z cs m
         | k == x    = p : f (x + 1) p cs (insert (x + p) 0 $ delete x m)
         | otherwise = c : f (x + 1) c cs' (insert (x + c) 0 m)
         where p = a007918 z
               (c:cs') = dropWhile (<= z) cs
               (k,_) = findMin m
    -- Reinhard Zumkeller, Nov 01 2014

A266620 a(n) = least non-divisor of n!.

Original entry on oeis.org

2, 3, 4, 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
Offset: 1

Views

Author

Jeffrey Shallit, Jan 01 2016

Keywords

Comments

It appears that a(n) = A151800(n) with the exception of n = 3. - Robert Israel, Jan 13 2016

Examples

			For n = 4 the least non-divisor of 4! = 24 = 2^3 * 3 is 5.
For n = 5 the least non-divisor of 5! = 120 = 2^3 * 3 * 5 is 7.
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    m:= 1 + numtheory:-pi(N):
    Primes:= [seq(ithprime(i),i=1..m)]:
    for i from 1 to m do pindex[Primes[i]]:= i od:
    V:= Vector(m):
    k:= 0:
    for n from 1 to N do
      for f in ifactors(n)[2] do
        q:= pindex[f[1]];
        V[q]:= V[q] + f[2];
        k:= max(k, q);
      od:
      a[n]:= min(seq(Primes[i]^(1+V[i]),i=1..k),Primes[k+1]);
    od:
    seq(a[n],n=1..N); # Robert Israel, Jan 13 2016
  • Mathematica
    Table[Complement[Range[2n], Divisors[n!]][[1]], {n, 30}] (* Alonso del Arte, Sep 23 2017 *)
    Table[Block[{m = n!, k = n + 1}, While[Divisible[m, k], k++]; k], {n, 67}] (* Michael De Vlieger, Sep 23 2017 *)
  • Python
    from sympy import nextprime
    def A266620(n): return 4 if n == 3 else nextprime(n) # Chai Wah Wu, Feb 22 2023

Formula

a(n) = min_{k >= 1} prime(k)^(1 + v(n!, prime(k))) where v(m, p) is the p-adic order of m. - Robert Israel, Jan 13 2016
a(n) = prime(pi(n) + 1) except for n = 3, in which case the least non-divisor of 3! is 4, not 5. - Alonso del Arte, Sep 23 2017

A272899 Product of next n prime numbers greater than n.

Original entry on oeis.org

1, 2, 15, 385, 5005, 323323, 7436429, 955049953, 35336848261, 1448810778701, 62298863484143, 14107860812636383, 832363787945546597, 261682369333342226303, 18579448222667298067513, 1356299720254712758928449, 107147677900122307955347471, 46558817449894322874479515781
Offset: 0

Views

Author

Matthew Goers, May 09 2016

Keywords

Comments

a(n) is of comparable size to n^n. - Charles R Greathouse IV, May 09 2016
a(n) is the product of the terms of the n-th row of A084754. - Michel Marcus, May 09 2016

Examples

			a(0) = 1 (the empty product).
a(1) = 2 = 2.
a(2) = 3 * 5 = 15.
a(3) = 5 * 7 * 11 = 385.
a(4) = 5 * 7 * 11 * 13 = 5005.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul((nextprime@@i)(n), i=1..n):
    seq(a(n), n=0..17);  # Alois P. Heinz, Jun 24 2024
  • Mathematica
    Table[Times@@Prime[Range[PrimePi[n] + 1, PrimePi[n] + n]], {n, 25}] (* Alonso del Arte, May 09 2016 *)
  • PARI
    a(n)=my(v=primes(primepi(n)+n)); prod(i=0,n-1,v[#v-i]) \\ Charles R Greathouse IV, May 09 2016
    
  • Python
    from math import prod
    from sympy import prime, primepi
    def a(n): r = primepi(n); return prod(prime(i) for i in range(r+1, r+n+1))
    print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Feb 15 2021

Formula

a(n) = A002110(n + A000720(n))/A034386(n), where A002110(n) are the primorials, A000720(n) is the pi(n) prime counting function, and A034386(n) is the primorial of primes less than or equal to n. E.g., a(7) = 955049953 = A002110(11) / A034386(7).

Extensions

a(0)=1 prepended by Alois P. Heinz, Jun 24 2024

A279105 a(n), n>1, is the smallest number k whose symmetric representation of sigma(k) has two parts and has a larger number of legs in its two parts than a(n-1); a(1)=3.

Original entry on oeis.org

3, 10, 44, 78, 136, 348, 592, 666, 820, 1272, 1652, 1830, 2144, 2628, 3320, 3738, 4656, 5886, 6328, 7620, 8384, 9042, 10728, 13040, 14532, 15752, 16290, 18528, 21100, 21944, 24084, 25424, 28920, 32382, 32896, 35508, 39340, 42192, 46050, 48828
Offset: 1

Views

Author

Hartmut F. W. Hoft, Dec 06 2016

Keywords

Comments

A number k with two parts in its symmetric representation of sigma(k) [ssrs(k) = 2] has the form k = q*p with q in A174973, p prime and 2*q < p. This implies that 2*q <= row(k) < p and the first 0 in the k-th row of A249223 (having row(k) = floor((sqrt(8*k+1)-1)/2) entries) occurs at position 2*q so that 2*q-1 is the number of legs in each of the two parts. Therefore, the numbers 2*q-1 with q in A174973 are the only possible leg counts when ssrs(k) = 2, and for given q in A174973 and smallest prime p(q) > 2*q the number k = q*p(q) is the smallest with a leg count of 2*q-1. Consequently, each number q*p in the column of the irregular triangle A239929 labeled by q in A174793 with p prime satisfies ssrs(q*p) = 2*q-1.
a(1) = 3 is the only odd number since 1 is the only odd number in A174973.
Every number n = 2^m * p, m >= 0, 2^(m+1) < p and p prime, in this sequence is the sum of 2^(m+1) consecutive positive integers which includes every number in A246956.

Examples

			a(3)=44 is the smallest number whose symmetric representation has 2 parts and 7 legs in each part.
a(4)=78 is the smallest number whose symmetric representation has 2 parts and 11 legs in each part.
No number k whose symmetric representation of sigma(k) has 2 parts can have 21 legs in its parts since there is no q in A174973 such that 2*q - 1 = 21.
		

Crossrefs

Right border of A239929.
Supersequence of A246956 and A262259.

Programs

  • Mathematica
    a174973Q[n_] := Module[{d=Divisors[n]}, Select[Rest[d] - 2*Most[d], #>0&]=={}]
    a279105[n_] := Map[# * NextPrime[2*#]&, Select[Range[n], a174973Q]]
    a279105[150] (* sequence data *)

Formula

a(n) = A174973(n) * A007918(2 * A174973(n) + 1).

A286264 a(n) = 2*(ceiling((n^2)/2)+1) - 1.

Original entry on oeis.org

3, 5, 11, 17, 27, 37, 51, 65, 83, 101, 123, 145, 171, 197, 227, 257, 291, 325, 363, 401, 443, 485, 531, 577, 627, 677, 731, 785, 843, 901, 963, 1025, 1091, 1157, 1227, 1297, 1371, 1445, 1523, 1601, 1683, 1765, 1851, 1937, 2027, 2117, 2211, 2305, 2403, 2501
Offset: 1

Views

Author

Ralf Steiner, May 05 2017

Keywords

Examples

			n=2: (1*3*5*7)/(2*4*6*8) = (1*1*5*7)/(2*4*2*8) => a(2) = 5 = A151800(2^2).
n=3: (1*3*5*7*9*11*13*15*17)/(2*4*6*8*10*12*14*16*18) = (1*1*1*1*1*11*13*15*17)/(2*4*2*8*2*12*2*16*2) => a(3) = 11 = A151800(3^2).
		

Crossrefs

Cf. A007918 (nextprime), A151800 (version 2).

Programs

  • Magma
    [3/2 - (-1)^n/2 + n^2 : n in [1..100]]; // Wesley Ivan Hurt, May 05 2017
  • Maple
    A286264:=n->3/2 - (-1)^n/2 + n^2: seq(A286264(n), n=1..100); # Wesley Ivan Hurt, May 05 2017
  • Mathematica
    Table[2 (Ceiling[n^2/2] + 1) - 1, {n, 1, 40}]
  • PARI
    Vec(x*(3 - x + x^2 + x^3) / ((1 - x)^3*(1 + x)) + O(x^60)) \\ Colin Barker, May 05 2017
    

Formula

a(n) > n^2.
From Colin Barker, May 05 2017: (Start)
G.f.: x*(3 - x + x^2 + x^3) / ((1 - x)^3*(1 + x)).
a(n) = 3/2 - (-1)^n/2 + n^2.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>4. (End)
Sum_{n>=1} 1/a(n) = Pi*coth(Pi/2)/4 + Pi*tanh(Pi/sqrt(2))/(4*sqrt(2)) - 1/2. - Amiram Eldar, Jul 26 2024

Extensions

More terms from Colin Barker, May 05 2017
Previous Showing 91-100 of 130 results. Next