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

A215085 a(n) = (A214089(n)^2 - 1) divided by four times the product of the first n primes.

Original entry on oeis.org

1, 1, 1, 1, 19, 17, 1, 2567, 3350, 128928, 3706896, 1290179, 100170428, 39080794, 61998759572, 7833495265, 45119290746, 581075656330, 8672770990, 15792702394898740, 594681417768520250, 25509154378676494, 1642780344643617537867, 480931910076867717575
Offset: 1

Views

Author

J. Stauduhar, Aug 02 2012

Keywords

Comments

When floor(A214089(n) / 2) = A118478(n), a(n) = A215021(n).

Examples

			A214089(14) = 1430083494841, n#_14 = 13082761331670030, and (1430083494841^2 - 1) / (4 * 13082761331670030) = 39080794, so a(14) = 39080794.
		

Programs

  • Maple
    A215085 := proc(n)
            (A214089(n)^2-1)/4/A002110(n) ;
    end proc: # R. J. Mathar, Aug 21 2012
  • Python
    from itertools import product
    from sympy import sieve, prime, isprime, primorial
    from sympy.ntheory.modular import crt
    def A215085(n):
        return (
            1
            if n == 1
            else (
                int(
                    min(
                        filter(
                            isprime,
                            (
                                crt(tuple(sieve.primerange(prime(n) + 1)), t)[0]
                                for t in product((1, -1), repeat=n)
                            ),
                        )
                    )
                )
                ** 2
                - 1
            )
            // 4
            // primorial(n)
        )  # Chai Wah Wu, May 31 2022
    for n in range(1, 16):
        print(A215085(n), end=", ")

Formula

a(n) = (A214089(n)^2 - 1) / (4 * A002110(n)).

A073917 Smallest prime which leaves a remainder 1 when divided by primorial(n), i.e., when divided by first n primes.

Original entry on oeis.org

3, 7, 31, 211, 2311, 120121, 4084081, 106696591, 892371481, 71166625531, 200560490131, 29682952539241, 2129751844690471, 78496567990020181, 8608456956238879741, 97767475431570134191, 9613801750771063195351
Offset: 1

Views

Author

Amarnath Murthy, Aug 18 2002

Keywords

Comments

Let Pr(n) = the product of first n primes. Then a(n) is the smallest prime of the form k*Pr(n) + 1. k = 1 for first five terms.
Smallest prime p such that the prime factorization of p-1 contains the first n primes. - R. J. Mathar, Jul 03 2012

Crossrefs

Cf. A002110 (primorials), A073915, A103783, A214089.
Cf. A076689 (values of k).

Programs

  • PARI
    a(n)=if(n<0,0,s=1; while(prime(s)%prod(i=1,n, prime(i))>1,s++); s)

Extensions

More terms from Vladeta Jovovic, Aug 20 2002

A103783 Primes of the form primorial P(k)*n-1 with minimal n, n>0, k>=2.

Original entry on oeis.org

5, 29, 419, 2309, 30029, 1021019, 19399379, 669278609, 38818159379, 601681470389, 14841476269619, 304250263527209, 235489703970060539, 1844669347765474229, 228124109340330313109, 24995884552004764307909
Offset: 1

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Comments

Weak conjecture: sequence is defined for all k>=2; strong conjecture: n<(prime(k))^2;
Smallest prime p such that the prime factorization of p+1 contains the first n+1 primes. - R. J. Mathar, Jul 03 2012

Examples

			P(2)*1-1=5 is prime, so a(2)=5;
P(9)*3-1=669278609 is prime, so a(9)=669278609;
		

Crossrefs

Programs

  • Mathematica
    nmax = 2^2048; npd = 2; n = 2; npd = npd*Prime[n]; While[npd < nmax, tt = 1; cp = npd*tt - 1; While[(tt <= (Prime[n])^2) && (! (PrimeQ[cp])), tt = tt + 1; cp = npd*tt - 1]; Print[cp]; n = n + 1; npd = npd*Prime[n]]

A215021 a(n) = A118478(n)*(A118478(n)+1) divided by the product of the first n primes.

Original entry on oeis.org

1, 1, 1, 1, 19, 17, 1, 409, 604, 82, 20951, 229931, 411012, 39080794, 4382914408, 6345486566, 45119290746, 581075656330, 8672770990, 869561574799171, 71853663603175593, 25509154378676494, 24040267482771436703, 102403319155457392955, 11302410854347731819765
Offset: 1

Views

Author

N. J. A. Sloane, Aug 02 2012, following a comment in A118478 made by Robert G. Wilson v on May 13 2006

Keywords

Comments

When floor(A214089(n) / 2) = A118478(n), a(n) = A215085(n).

Crossrefs

Extensions

a(18)-a(25) from J. Stauduhar, Aug 17 2012

A214149 Least prime p such that the factorization of p^2-9 contains n consecutive primes beginning with prime(3)=5.

Original entry on oeis.org

7, 17, 157, 283, 20023, 20023, 6446437, 14382547, 122862737, 12925003913, 625586209427, 761375971073, 92757861866387, 15447055149567577, 192604162645538927, 192604162645538927, 724012906264106939197, 2667069644892918607163, 235168333030918497994787
Offset: 1

Views

Author

Robin Garcia, Jul 05 2012

Keywords

Comments

We consider prime-smoothness for primes >=5, because primes p>3 are not divisible by 3, and so p-3 and p+3 are not divisible by 3.

Examples

			20020 = 2^2*5*7*11*13, 20026 = 2*17*19*31; 20023^2-9 contains 6 all-consecutive primes beginning with 5.
6446437^2-9 = 2^4*5*7^2*11*13*17^2*19*23*587 contains 7 all-consecutive primes, the first one being 5.
		

Crossrefs

Programs

  • PARI
    A214149(n)={ local(a, k=1, p) ; a=prod(j=3, n+2, prime(j)) ; while(1, if( issquare(k*a+9), p=sqrtint(k*a+9) ; if(isprime(p),return(p); ) ;  ) ; k++ ; ) }
    
  • Python
    from itertools import product
    from sympy import isprime, sieve, prime
    from sympy.ntheory.modular import crt
    def A214149(n): return 7 if n == 1 else int(min(filter(lambda n: n > 3 and isprime(n),(crt(tuple(sieve.primerange(5,prime(n+2)+1)), t)[0] for t in product((3,-3),repeat=n))))) # Chai Wah Wu, Jun 01 2022

Extensions

More terms from Max Alekseyev, Aug 22 2012

A214150 Least prime p such that the factorization of p^2 - 25 contains n consecutive primes beginning with prime(4)=7.

Original entry on oeis.org

19, 61, 863, 5231, 84859, 532537, 3432203, 255634241, 4594884299, 44139608287, 644772297031, 33055909092211, 271103095974079, 93380069969929969, 1151842860713446127, 22664072571698543617, 2801339281067798957117, 137197247292115717439959
Offset: 1

Views

Author

Robin Garcia, Jul 05 2012

Keywords

Comments

p^2 - 25 does contain the prime factors 2, 3, but not 5: p - 5 and p + 5 are not divisible by 5 and p^2 - 25 is divisible by 24 as primes are 1 or 2 mod 3 and thus p - 5 or p + 5 are 0 mod 3 and primes are 1 or 3 mod 4 and thus p - 5 or p + 5 are 0 mod 4 and both p - 5 and p + 5 are even.
In general, if p > k is prime and k is odd and not divisible by 3, p^2 - k^2 is divisible by 24.

Examples

			a(4) = 5231, 5226 = 2*3*13*67, 5236 = 2^2*7*11*17, the factorization of  5231^2 - 25 contains the 4 consecutive primes 7, 11, 13 and 17 beginning with 7.
		

Crossrefs

Programs

  • PARI
    A214150(n)=
    { local(a, k=1, p);
        a=prod(j=4, n+3, prime(j));
        while( 1,
            if( issquare(24*k*a+25, &p),
                if( ispseudoprime(p), return(p) )
            );
            k++;
    )}
    
  • Python
    from itertools import product
    from sympy import isprime, sieve, prime
    from sympy.ntheory.modular import crt
    def A214150(n): return 19 if n == 1 else int(min(filter(lambda n: n > 5 and isprime(n),(crt(tuple(sieve.primerange(7,prime(n+3)+1)), t)[0] for t in product((5,-5),repeat=n))))) # Chai Wah Wu, Jun 01 2022

Extensions

More terms from Max Alekseyev, Aug 22 2012
Showing 1-6 of 6 results.