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-5 of 5 results.

A068902 Least multiple of n not less than the n-th prime.

Original entry on oeis.org

2, 4, 6, 8, 15, 18, 21, 24, 27, 30, 33, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 05 2002

Keywords

Programs

  • Magma
    [n*Ceiling(NthPrime(n)/n): n in [1..60]]; // G. C. Greubel, Jun 09 2019
    
  • Maple
    seq(n*ceil(ithprime(n)/n),n=1..60); # Robert Israel, Feb 27 2017
  • Mathematica
    Table[n Ceiling[Prime@ n/n], {n, 60}] (* Michael De Vlieger, Feb 27 2017 *)
  • PARI
    vector(60, n, n*ceil(prime(n)/n) ) \\ G. C. Greubel, Jun 09 2019
    
  • Sage
    [n*ceil(nth_prime(n)/n) for n in (1..60)] # G. C. Greubel, Jun 09 2019

Formula

a(n) = A000040(n) + A068901(n).
a(n) = n*ceiling(prime(n)/n). - Vladeta Jovovic, Apr 06 2003

A090973 a(n) = ceiling(prime(n)/n).

Original entry on oeis.org

2, 2, 2, 2, 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, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 1

Views

Author

Amarnath Murthy, Jan 04 2004

Keywords

Examples

			a(12) = 4 as pi(48) = 15 > 12 > pi(36) = 11.
		

Crossrefs

Cf. A068901. - Reinhard Zumkeller, Aug 16 2009

Programs

  • Magma
    [Ceiling(NthPrime(n)/n): n in [1..120]]; // G. C. Greubel, Feb 02 2019
    
  • Mathematica
    Table[Ceiling[Prime[n]/n], {n, 1, 120}] (* G. C. Greubel, Feb 02 2019 *)
  • PARI
    vector(120, n, ceil(prime(n)/n)) \\ G. C. Greubel, Feb 02 2019
    
  • Sage
    [ceil(nth_prime(n)/n) for n in (1..120)] # G. C. Greubel, Feb 02 2019

Formula

For n > 1, a(n) = A038605(n)+1. - David Wasserman, Feb 23 2006
a(A038606(n)) = n+1. - Reinhard Zumkeller, Aug 16 2009

Extensions

More terms from David Wasserman, Feb 23 2006

A131848 Least nonnegative number which when added to the n-th semiprime gives a multiple of n.

Original entry on oeis.org

0, 0, 0, 2, 1, 3, 0, 2, 2, 4, 0, 2, 4, 4, 6, 2, 2, 3, 2, 3, 5, 4, 4, 3, 1, 1, 26, 27, 1, 3, 2, 3, 5, 7, 34, 33, 33, 34, 37, 39, 1, 3, 0, 43, 1, 43, 46, 1, 2, 4, 49, 50, 0, 1, 54, 55, 51, 54, 53, 55, 57, 54, 51, 54, 57, 59, 62, 63, 63, 66, 69, 71, 1, 3, 4, 2, 73, 75, 69, 71
Offset: 1

Views

Author

Jonathan Vos Post, Oct 04 2007

Keywords

Comments

This is to semiprimes A001358 as A068901 is to primes A000040.

Examples

			a(1) = 0 because 1 | (0+semiprime(1)=4).
a(6) = 3 because 6 | (3+semiprime(3)=3+15=18).
a(25) = 1 because 25 | (1+semiprime(25)=1+74=75).
		

Crossrefs

Programs

  • Mathematica
    lnn[{s_,n_}]:=If[Divisible[s,n],0,n-Mod[s,n]]; lnn/@Module[{sp=Select[ Range[ 300], PrimeOmega[#] ==2&], len},len=Length[sp];Thread[{sp,Range[len]}]] (* Harvey P. Dale, Mar 23 2013 *)

Formula

a(n) = MIN{k=>0 such that n|(k+A001358(n))}.

Extensions

More terms from R. J. Mathar, Jan 15 2008

A364633 a(n) is the smallest nonnegative number k such that prime(n) + k is divisible by n + 1.

Original entry on oeis.org

0, 0, 3, 3, 1, 1, 7, 8, 7, 4, 5, 2, 1, 2, 1, 15, 13, 15, 13, 13, 15, 13, 13, 11, 7, 7, 9, 9, 11, 11, 1, 1, 33, 1, 31, 34, 33, 32, 33, 32, 31, 34, 29, 32, 33, 36, 29, 22, 23, 26, 27, 26, 29, 24, 23, 22, 21, 24, 23, 24, 27, 22, 13, 14, 17, 18, 9, 8, 3, 6, 7, 6, 3, 2, 1, 2, 1
Offset: 1

Views

Author

Andres Cicuttin, Jul 30 2023

Keywords

Comments

The sequence presents a pattern with large discontinuities at regular intervals in the logarithmic plot (See plots in Links).

Examples

			The following table shows the first 10 terms where the fourth column, a(n), plus the third column, prime(n), is divisible by the second column n+1:
   n   n+1 prime(n) a(n)
   1    2     2       0
   2    3     3       0
   3    4     5       3
   4    5     7       3
   5    6    11       1
   6    7    13       1
   7    8    17       7
   8    9    19       8
   9   10    23       7
  10   11    29       4
		

Crossrefs

Cf. A068901.

Programs

  • Mathematica
    a[n_]:=Module[{k},k=0;
    While[Mod[Prime[n]+k,n+1]!=0,k++];k];
    Table[a[n],{n,1,70}]
  • PARI
    a(n) = my(k=0, p=prime(n)); while ((p+k) % (n+1), k++); k; \\ Michel Marcus, Sep 05 2023
  • Python
    from sympy import prime
    def A364633(n): return (n+1)*(prime(n)//(n+1)+1)-prime(n) if n>2 else 0 # Chai Wah Wu, Sep 04 2023
    

Formula

a(n) = Min_{k | (n+1) divides (prime(n)+k)}.
a(n) = (n+1)*ceiling(prime(n)/(n+1)) - prime(n)

A379014 Least number k such that prime(n) + prime(k) is a multiple of n, or -1 if no such number exists.

Original entry on oeis.org

1, 2, 4, 3, 8, 3, 5, 3, 6, 5, 1, 5, 5, 6, 6, 5, 14, 5, 15, 10, 5, 11, 26, 4, 2, 2, 3, 3, 4, 4, 17, 10, 18, 11, 18, 10, 34, 27, 19, 19, 19, 10, 19, 20, 21, 11, 20, 7, 19, 20, 21, 21, 111, 8, 21, 7, 21, 8, 65, 8, 23, 7, 20, 21, 68, 6, 20, 2, 19, 20, 1, 21, 20, 20
Offset: 1

Views

Author

Jean-Marc Rebert, Dec 13 2024

Keywords

Comments

Indices n where a(n)=1 correspond with terms of A092044. - Bill McEachen, Dec 21 2024

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{k=1},While[!Divisible[Prime[n]+Prime[k],n], k++]; k]; Array[a,74] (* Stefano Spezia, Dec 13 2024 *)
  • PARI
    a(n) = my(k=1, p=prime(n)); while ((p+prime(k)) % n, k++); k; \\ Michel Marcus, Dec 13 2024

Formula

a(n) = A000720(A294639(n)). - Pontus von Brömssen, Dec 13 2024
Showing 1-5 of 5 results.