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

A105049 a(n) is the smallest prime p such that p+n! is prime and p differs from all a(i), i

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 19, 23, 17, 41, 29, 43, 67, 71, 149, 73, 31, 37, 89, 53, 47, 127, 97, 131, 107, 59, 137, 101, 223, 163, 241, 79, 139, 103, 61, 577, 311, 151, 269, 173, 211, 167, 109, 191, 239, 521, 233, 83, 383, 337, 271, 827, 449, 443, 229, 157, 179, 283, 293, 277
Offset: 1

Views

Author

R. J. Mathar, Aug 22 2007

Keywords

Comments

A variant of A130807.
If the requirement is dropped that a(n) be distinct from earlier primes in the list, the sequence becomes 2, 3, 5, 5, 7, 7, 11, 23, 17, 11, 17, 29, 67, 19, 43, 23, 31, 37, 89,.. which presumably duplicates A037153.

Programs

  • Maple
    A105049 := proc(nmin) local i,a,iused; a := [] ; iused := {} ; for n from 1 to nmin do i := 1; while not isprime(ithprime(i)+n!) or i in iused do i := i+1 ; od; iused := iused union {i} ; a := [op(a),ithprime(i)] ; od ; RETURN(a) ; end: A105049(80);

A082432 a(n) = p - A072181(n), where p is the least prime > A072181(n) + 1.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 11, 13, 13, 13, 13, 13, 17, 17, 17, 23, 59, 47, 41, 23, 23, 23, 83, 293, 383, 383, 103, 563, 107, 107, 71, 1399, 1399, 1399, 1399, 2803, 983, 983, 983, 10589, 5693, 5693, 19553, 827, 31699, 31699, 33001, 12193
Offset: 1

Views

Author

Naohiro Nomoto, Apr 25 2003

Keywords

Comments

Is a(n) always prime?

Examples

			a(4) = 17 - A072181(4) = 17 - 12 = 5.
		

Crossrefs

Extensions

a(36)-a(47) from Iain Fox, Nov 23 2017
a(48) from Iain Fox, Nov 29 2017

A160433 a(n) is the least number k such that (k-th prime after n!+1)-n! is not a prime.

Original entry on oeis.org

2, 2, 3, 7, 8, 15, 8, 18, 16, 19, 12, 20, 11, 8, 11, 6, 12, 23, 24, 15, 31, 21, 27, 15, 16, 26, 25, 17, 17, 29, 20, 27, 27, 30, 23, 16, 28, 23, 25, 29, 15, 24, 19, 36, 36, 39, 15, 36, 24, 44, 35, 29, 27, 25, 36, 22, 37, 31, 32, 41, 29, 55, 27, 45, 29, 59, 34, 37, 24, 49, 25, 40
Offset: 0

Views

Author

Frederick Magata (frederick.magata(AT)web.de), May 13 2009

Keywords

Comments

The conjectures from A037153 and A087202 can be rephrased using a(n):
Is a(n)>=2 for all n>=0 and a(n)>=3 for all n>=2?
Also compare this with the conjecture on the fortunate numbers A005235.
Is the following true: for every m there is an N such that for all n>N a(n)>m?
There even seems to be the estimate a(n)>log(n+1)*sqrt(n+1)/2.

Examples

			a(3)=7: The seven primes following 3!+1=7 are 11,13,17,19,23,29 and 31.
Subtracting 3!=6 from each of them gives 5,7,11,13,17,23 and 25.
The first six values are prime, while the seventh 25=5^2 is not.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) option remember; local k:
    for k from 1 while isprime((nextprime@@k)(n!+1)-n!) do od:
    k; end;

A385430 Least number k such that k and k + n! have the same number of divisors.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 11, 23, 17, 11, 17, 29, 46, 19, 43, 23, 31, 37, 89, 29, 31, 31, 97, 62, 41, 59, 47, 67, 159, 107, 127, 79, 37, 97, 61, 131, 86, 43, 97, 53, 61, 97, 71, 47, 94, 101, 233, 53, 83, 61, 249, 53, 71, 158, 71, 149, 107, 134, 254, 206, 166, 131, 271
Offset: 1

Views

Author

Robert G. Wilson v, Jul 31 2025

Keywords

Comments

Inspired by A284783.
First differs from A037153 at n=13 (and when they differ a(n) is a composite < A037153(n)).

Examples

			a(1) = 2 since d(2) = d(3) = 2;
a(5) = 7 since d(7) = d(7+5!) = 2;
a(13) = 46 since d(46) = d(46+13!) = 4; etc.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k = 2}, While[ DivisorSigma[0, k] != DivisorSigma[0, k + n!], k++]; k]; Array[ a, 51]
  • PARI
    a(n) = my(k=1); while (numdiv(k) != numdiv(k+n!), k++); k; \\ Michel Marcus, Aug 02 2025

Extensions

More terms from Sean A. Irvine, Aug 08 2025

A058020 Difference between lcm(1,..,n) and the smallest prime > lcm(1,...,n) + 1, where n runs over A000961, lcm(n) runs through A051451.

Original entry on oeis.org

3, 5, 5, 7, 11, 13, 11, 13, 31, 23, 19, 37, 41, 29, 31, 43, 53, 41, 53, 79, 59, 97, 59, 61, 113, 97, 179, 73, 73, 97, 103, 101, 109, 101, 229, 109, 139, 113, 227, 131, 191, 163, 139, 199, 151, 139, 181, 223, 229, 367, 239, 499, 251, 509, 251, 227, 373, 281, 233
Offset: 1

Views

Author

Labos Elemer, Nov 14 2000

Keywords

Comments

Analogous to Fortunate numbers and like them so far proved to be primes. This holds for x<=421: if Q is the first follower prime, then Q(421)-lcm(1,...421) = 557. For first some cases when 1+LCM is also a prime, the 2nd primes give 3,5,5,7,11,11,.. deviations, i.e. give primes.

Crossrefs

Programs

  • PARI
    N=1; for(n=2,1e3, if(isprimepower(n,&p), N*=p; print1(nextprime(N+2)-N", "))) \\ Charles R Greathouse IV, Nov 18 2015

Extensions

Name corrected by Charles R Greathouse IV, Nov 18 2015

A082433 a(n) = A072181(n) - p, where p is the largest prime < A072181(n) - 1.

Original entry on oeis.org

3, 5, 7, 7, 11, 11, 11, 11, 13, 23, 17, 17, 17, 41, 191, 47, 31, 53, 53, 53, 31, 179, 61, 61, 337, 131, 523, 523, 419, 223, 223, 223, 223, 79, 3821, 3821, 3821, 23399, 21269, 21269, 3607
Offset: 3

Views

Author

Naohiro Nomoto, Apr 25 2003

Keywords

Comments

Are all terms prime?
All terms are odd. - Michael S. Branicky, Sep 05 2021

Examples

			a(4) = A072181(4)-7 = 12-7 = 5.
		

Crossrefs

Programs

  • Python
    from sympy import factorint, isprime
    def afindn(terms):
        prev_factors, prevan, prevk, n = dict(), 1, None, 2
        for n in range(2, terms+1):
            n_factors, an = factorint(n), 1
            for pi in set(prev_factors.keys()) | set(n_factors.keys()):
                ei = prev_factors[pi] if pi in prev_factors else 1
                fi = n_factors[pi] if pi in n_factors else 1
                an *= pi**(ei*fi)
            if n >= 3:
                if an != prevan:
                    k = 3
                    while not isprime(an - k): k += 2
                else:
                    k = prevk
                print(k, end=", ")
                prevk = k
            prev_factors, prevan = factorint(an), an
    afindn(36) # Michael S. Branicky, Sep 05 2021

Extensions

a(36)-a(40) from Jinyuan Wang, Sep 05 2020
a(41)-a(43) from Michael S. Branicky, Sep 05 2021

A190801 Least semiprime whose prime factors differ by n!.

Original entry on oeis.org

6, 15, 55, 145, 889, 5089, 55561, 927889, 6169249, 39916921, 678585889, 13891047241, 417210398089, 1656387533161, 56229997825849, 481224167424529, 11026310270976961, 236887827111937369, 10826413936386055921
Offset: 1

Views

Author

Michel Lagneau, May 20 2011

Keywords

Comments

Appears to be the same as A037152(n) * A037153(n).

Examples

			a(5) = 889 because 889 = 7 * 127 , and 127 - 7 = 120 = 5!
		

Programs

  • Mathematica
    f[n_] := Block[{p=2}, While[! PrimeQ[p+n!], p=NextPrime[p]]; p*(p+n!)]; Table[f[n], {n, 60}]

A248714 a(n) = p - prime(n)#^2, where prime(n)# is the product of the first n primes and p is the smallest prime > prime(n)#^2 + 1.

Original entry on oeis.org

3, 5, 7, 11, 17, 29, 23, 41, 29, 37, 89, 79, 89, 71, 439, 389, 163, 79, 151, 73, 89, 211, 113, 113, 419, 167, 139, 199, 173, 137, 487, 197, 401, 167, 739, 641, 461, 199, 223, 331, 379, 401, 293, 223, 251, 647, 593, 613, 317, 271, 257, 947, 331, 347, 593, 433
Offset: 1

Views

Author

Werner D. Sand, Oct 12 2014

Keywords

Comments

Conjecture: Analogous to Fortune's Conjecture (A005235) all a(n) are prime, so are all members of a(n)=p-k*prime(n)#, k=natural number.
Besides, many powers p-prime(n)#^m, m=natural number, behave as well, e.g. p-prime(n)#^29 does, p-prime(n)#^30 does not.

Crossrefs

Programs

  • MuPAD
    q:=1;p:=1;for i from 1 to 100 do q:=nextprime(q+1);p:=p*q;N:=nextprime(p^2+2)-p^2;print(i,N);end_for: \\ Werner D. Sand, Oct 13 2014
  • PARI
    a(n) = {hp = prod(ip=1, n, prime(ip)); nextprime(hp^2+2) - hp^2;} \\ Michel Marcus, Oct 12 2014
    

A343593 a(n) is the smallest number k > 0 such that n! + n + k is prime.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 15, 8, 1, 6, 17, 54, 5, 28, 7, 14, 19, 70, 9, 10, 9, 74, 107, 16, 33, 20, 39, 194, 77, 96, 47, 4, 63, 26, 95, 274, 5, 58, 13, 20, 55, 28, 3, 194, 55, 186, 5, 34, 11, 220, 1, 18, 169, 16, 93, 50, 225, 234, 211, 708, 69, 208, 3, 128, 217
Offset: 0

Views

Author

Ventsislav D. Tsenov, Apr 21 2021

Keywords

Examples

			For n = 2: the smallest value of k such that 2! + 2 + k = 4 + k is prime is 1.
		

Crossrefs

Programs

  • Maple
    a:= n-> (t-> nextprime(t)-t)(n!+n):
    seq(a(n), n=0..80);  # Alois P. Heinz, Apr 21 2021
  • Mathematica
    a[n_] := NextPrime[(m = n! + n)] - m; Array[a, 100, 0] (* Amiram Eldar, Apr 21 2021 *)
  • PARI
    a(n) = my(s=n!+n); nextprime(s+1) - s; \\ Michel Marcus, Apr 21 2021

Formula

a(n) = A037153(n) - n for n >= 1.
a(n) = A090786(n) + 1.

Extensions

More terms from Alois P. Heinz, Apr 21 2021
Previous Showing 11-19 of 19 results.