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 21-30 of 45 results. Next

A060255 Smaller of twin primes {p, p+2} whose average p+1 = k*q is the least multiple of the n-th primorial number q such that k*q-1 and k*q+1 are twin primes.

Original entry on oeis.org

3, 5, 29, 419, 2309, 180179, 4084079, 106696589, 892371479, 103515091679, 4412330782859, 29682952539239, 22514519501013539, 313986271960080719, 22750921955774182169, 912496437361321252439, 26918644902158976946979, 1290172194953476680815969, 1901713815361424627522739779
Offset: 1

Views

Author

Labos Elemer, Mar 22 2001

Keywords

Comments

a(349) has 1001 digits. - Michael S. Branicky, Apr 19 2025

Examples

			a(13) = -1 + (2*3*5*7*...*41)*k(13) = 304250263527210*74 and {22514519501013539, 22514519501013542} are the corresponding primes; k(13)=74 is the smallest suitable multiplier. Twin primes obtained from primorial numbers with k=1 multiplier seem to be much rarer (see A057706).
For j=1,2,3,4,5,6, a(j)=A001359(1), A059960(1), A060229(1), A060230(1), A060231(1), A060232(1) respectively.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(q = prod(k=1, n, prime(k))); for(k=1, oo, if (isprime(q*k-1) && isprime(q*k+1), return(q*k-1)););} \\ Michel Marcus, Jul 10 2018
    
  • Python
    from itertools import count
    from sympy import primorial, isprime
    def a(n):
        p = primorial(n)
        return next(m-1 for m in count(p, p) if isprime(m-1) and isprime(m+1))
    print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Apr 18 2025

Formula

a(n) = p = k(n)*q(n)-1, where q(n)=A002110(n) and k(n)=A060256(n) is the smallest integer whose multiplication by the n-th primorial yields p+1.

Extensions

a(2)=5 corrected by Ray Chandler, Apr 03 2009
a(18) and beyond from Michael S. Branicky, Apr 18 2025

A066576 Composite Euclid numbers: numbers of the form p# + 1, where p# denotes the primorial of the prime p.

Original entry on oeis.org

30031, 510511, 9699691, 223092871, 6469693231, 7420738134811, 304250263527211, 13082761331670031, 614889782588491411, 32589158477190044731, 1922760350154212639071, 117288381359406970983271
Offset: 1

Views

Author

Joseph L. Pe, Jan 07 2002

Keywords

Comments

30031 appears in Wells's "Curious and Interesting Numbers" as the smallest composite number of the form p# + 1.

References

  • David Wells, "The Penguin Dictionary of Curious and Interesting Numbers," Revised Edition, Penguin Books, London, England, 1997, page 166.

Crossrefs

Programs

  • Magma
    [a: n in [2..19]| not IsPrime(a) where a is 1+&*[NthPrime(k):k in [1..n]]]; // Marius A. Burtea, Feb 18 2020
  • Mathematica
    Do[c = Product[ Prime[i], {i, 1, n}] + 1; If[ !PrimeQ[c], Print[c]], {n, 1, 20} ]

Extensions

Edited by Robert G. Wilson v, Jan 09 2002

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

Original entry on oeis.org

5, 29, 419, 2309, 30029, 1021019, 19399379, 892371479, 51757545839, 821495767572479, 14841476269619, 304250263527209, 54873078184468933509119, 2459559130353965639, 521426535635040715679, 15751252788463309939261439
Offset: 1

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Comments

Conjecture: sequence is defined for all k>=2

Examples

			P(2)*2^0-1=3*2-1=5 is prime, so a(2)=5;
P(4)*2^1-1=7*5*3*2*2-1=419 is prime, so a(4)=419;
		

Crossrefs

Programs

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

A189409 a(n) = prime(n)#^2 + 1, where prime(n)# is the n-th primorial (A002110).

Original entry on oeis.org

2, 5, 37, 901, 44101, 5336101, 901800901, 260620460101, 94083986096101, 49770428644836901, 41856930490307832901, 40224510201185827416901, 55067354465423397733736101, 92568222856376731590410384101
Offset: 0

Views

Author

John M. Campbell, Apr 21 2011

Keywords

Comments

A variation of Euclid numbers. It is unknown whether or not numbers in this sequence are always squarefree. It is unknown whether or not there exist infinitely many primes in this sequence. For Euclid numbers see A006862.
Comment from Abhiram R Devesh, Jan 23 2013: (Start)
(i) The last 3 digits of an entry is always either 101 or 901 (with the exception of the first 3 terms),
(ii) the thousand's place digit is an even number.
(End)

Examples

			(p_16#)^2+1 = 1062053250251407755176413469419400772901 is prime.
		

Crossrefs

A002110, A006862, A014545, A210482 (subsequence of primes).

Programs

  • Mathematica
    Table[Product[Prime[n]^2, {n, 1, k}] + 1, {k, 0, 16}]
    Join[{2},FoldList[Times,Prime[Range[20]]]^2+1] (* Harvey P. Dale, Jan 15 2019 *)
  • PARI
    list(maxx)={n=prime(1); cnt=0;print("0  2");
    while(n<=maxx,q=(prodeuler(p=1,n,p))^2+1;cnt++;
    print(cnt,"  ",q); n=nextprime(n+1)); } \\ Bill McEachen, Feb 03 2014
  • Python
    from functools import reduce
    import numpy as np
    def factors(n):
        return reduce(list._add_, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))
    mul = 1
    for i in range(1, 20):
        if len(factors(i))<3:
            mul *= i*i
            print(mul+1, factors(mul+1))
    # Abhiram R Devesh, Jan 23 2013
    

Formula

a(n)=(E(n)-1)^2+1, where E(n) is the n-th Euclid number.

Extensions

Typo in Mma fixed by Vincenzo Librandi, Feb 04 2014

A047847 Numbers n such that n + (n+1) and (n+2) + (n+3) are both prime.

Original entry on oeis.org

1, 3, 6, 9, 18, 21, 33, 39, 48, 51, 54, 63, 81, 96, 111, 114, 138, 153, 156, 174, 189, 198, 219, 228, 231, 243, 249, 306, 321, 336, 369, 378, 384, 411, 426, 429, 438, 441, 453, 468, 483, 504, 543, 546, 606, 639, 648, 651, 711, 714, 723, 741, 744, 774, 783, 789
Offset: 1

Views

Author

Keywords

Comments

Except for the first one, all terms are multiples of 3, as can be seen from the formula a(n+1) = 3*A056956(n). - Zak Seidov, Aug 26 2012

Examples

			If n = 6, then 6 + 7 = 13 and 8 + 9 = 17 are both prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[790], And @@ PrimeQ[{2*# + 1, 2*# + 5}] &] (* Jayanta Basu, Aug 11 2013 *)
    Select[Range[800],AllTrue[2#+{1,5},PrimeQ]&] (* Harvey P. Dale, Jan 28 2023 *)
  • PARI
    is_A047847(n)=isprime(n*2+1)&isprime(n*2+5)  \\ - M. F. Hasler, Aug 26 2012

Formula

a(n) = (A023200(n)-1)/2 = (A046132(n)-5)/2 = 3*A056956(n-1) (for n>1).

Extensions

Corrected by Henry Bottomley, Jul 18 2000

A066542 Nonnegative integers all of whose anti-divisors are either 2 or odd.

Original entry on oeis.org

3, 4, 5, 7, 8, 11, 13, 16, 17, 19, 23, 29, 31, 32, 37, 41, 43, 47, 53, 59, 61, 64, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251
Offset: 1

Views

Author

John W. Layman, Jan 07 2002

Keywords

Comments

See A066272 for definition of anti-divisor.
The following conjectures have been proved by Bob Selcoe. - Michael Somos, Feb 28 2014
Additional conjectures suggested by computational experiments:
1) Numbers all of whose anti-divisors (AD's) are odd => {2^k} (A000079).
2) Numbers with AD 2, all other AD's odd => primes (A000040).
3) Numbers none of whose AD's are multiples of 3 => 3*2^k (A007283).
4) Numbers all of whose AD's are even => 3*A002822 = A040040 (except for a(0)=1), both related to twin prime pairs.
Calculations suggest the following conjecture. This sequence consists of all odd primes and nonnegative powers of 2 and no other terms. This has been verified for to n=100000. Robert G. Wilson v extended the conjecture out to 2^20.
From Bob Selcoe, Feb 24 2014: (Start)
The sequence consists of all odd primes and powers of two (>=2^2) and no other terms.
Proof: Denote the even anti-divisors of n as ADe(n). ADe(n) is defined as the set of numbers x satisfying the equation n(mod x)=x/2. Substitute x = 2n/y, since it can be shown that ADe(n) => 2n divided by the odd divisors of n when n>1 (This is because 2j anti-divides only numbers of the form 3j+2j*k; j>=1, k>=0. For example: j=7; 14 anti-divides only 21,35,49,63.... So in other words, even numbers anti-divide only odd multiples (>=3) of themselves, divided by 2). Therefore, ADe(n) is n(mod [2n/y])=n/y, and y must be an odd divisor of n and 2n, y>1. Since y is the only odd divisor of n when y>1 iff n is prime, then ADe(n) => 2 when n is prime. Since 2n has no odd divisors when n=2^k, then ADe(n) is null when n=2^k. Therefore, the only numbers whose anti-divisors are either 2 or odd must be primes and powers of 2.
Similarly, for odd anti-divisors (ADo(n)): Given 2j+1 (odd numbers) anti-divide only numbers of the forms [(3j+1)+(2j+1)*k] and [(3j+2)+(2j+1)*k]; j>=1, k>=0. (For example: j=6; 13 anti-divides only 19,20, 32,33, 45,46...). Since odd n divided by its odd divisors ARE its odd divisors, then ADo(n) => the divisors of 2n-1 and 2n+1 (except 1, 2n-1 and 2n+1).
By extension:
1) Numbers all of whose anti-divisors (AD's) are odd => {2^k} (A000079).
2) Numbers with ADe(n)=2, all other AD's odd => primes (A000040).
3) Numbers none of whose AD's are multiples of j => j*2^k.
4) When 2n-1 and 2n+1 are twin primes, (A040040, except for a(0)=1) then n has only even AD's.
(End)
If 1 and 2 are included, this sequence contains all positive integers not contained in A111774. - Bob Selcoe, Sep 09 2014 [corrected by Wolfdieter Lang, Nov 06 2020]

Examples

			From _Bob Selcoe_, Feb 24 2014: (Start)
ADe(420): Odd divisors of 420 are: 3,5,7,15,21,35, 105. ADe(420) => 840/{3,5,7,15,21,35,105} = 8,24,40,56,120,168 and 280.
ADo(420) => the divisors of 839 and 841, which are (a) for 839: null (839 is prime); and (b) for 841: 29 (841 is 29^2).
All AD's (AD(420)) => 8,24,29,40,56,120,168 and 280 (End)
		

Crossrefs

Programs

  • Mathematica
    antid[n_] := Select[ Union[ Join[ Select[ Divisors[2n - 1], OddQ[ # ] && # != 1 &], Select[ Divisors[2n + 1], OddQ[ # ] && # != 1 &], 2n / Select[ Divisors[2*n], OddQ[ # ] && # != 1 &]]], # < n & ]; f[n_] := Select[ antid[n], EvenQ[ # ] && # > 2 & ]; Select[ Range[3, 300], f[ # ] == {} & ]

A076689 Smallest k such that k*prime(n)# + 1 is prime where prime(n)# is the n-th primorial number A002110(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 8, 11, 4, 11, 1, 4, 7, 6, 14, 3, 5, 2, 7, 3, 6, 20, 2, 9, 20, 2, 5, 7, 31, 2, 12, 13, 24, 7, 39, 21, 35, 24, 22, 3, 21, 8, 9, 13, 39, 21, 29, 10, 3, 62, 52, 21, 3, 36, 28, 15, 18, 33, 7, 46, 33, 20, 14, 22, 41, 7, 27, 39, 20, 4, 4, 5, 15, 27, 1, 44, 99, 9, 52, 2, 27, 12
Offset: 1

Views

Author

Jason Earls, Nov 10 2002

Keywords

Comments

From Pierre CAMI, Sep 12 2017: (Start)
Conjectures:
lim_{N->infinity} (Sum_{n=1..N} a(n)) / (Sum_{n=1..N} n) = 1/2;
a(n)/n is always < 4.
This is certified for the first 3100 primes a(n)*prime(n)#+1.
(End)

Crossrefs

Cf. A002110, A014545 (n for which k=1), A073917 (the primes).

Programs

  • Mathematica
    With[{P = FoldList[Times, Prime@ Range@ 120]}, Table[k = 1; While[CompositeQ[k P[[n]] + 1], k++]; k, {n, Length@ P}]] (* Michael De Vlieger, Sep 18 2017 *)
  • PARI
    a(n) = my(k=1, pr = prod(i=1, n, prime(i))); while (! isprime(k*pr+1), k++); k; \\ Michel Marcus, Oct 09 2017

A081548 Smallest composite number which is 1 more than the product of n distinct primes.

Original entry on oeis.org

4, 15, 106, 391, 3991, 30031, 510511, 9699691, 223092871, 6469693231, 255887521891, 7420738134811, 304250263527211, 13082761331670031, 614889782588491411, 32589158477190044731, 1922760350154212639071, 117288381359406970983271, 7858321551080267055879091, 557940830126698960967415391
Offset: 1

Views

Author

Amarnath Murthy, Apr 01 2003

Keywords

Crossrefs

Formula

If n is in A014545, then a(n) > A002110(n)+1, otherwise a(n) = A002110(n)+1. - Chai Wah Wu, Sep 02 2024

Extensions

Corrected and extended by David Wasserman, Jun 08 2004
a(18)-a(20) from Chai Wah Wu, Sep 02 2024

A103782 a(n) = minimal m >= 0 that makes primorial P(n)*2^m-1 prime.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 2, 3, 12, 1, 0, 22, 2, 4, 13, 12, 6, 1, 4, 1, 4, 0, 2, 9, 5, 6, 2, 1, 9, 17, 22, 7, 19, 73, 23, 12, 5, 27, 33, 64, 33, 5, 7, 41, 44, 35, 29, 3, 19, 6, 26, 5, 11, 9, 33, 34, 16, 63, 46, 8, 4, 24, 48, 0, 11, 0, 26, 6, 25, 17, 31, 6, 46, 33, 46, 17, 8, 61, 12, 23, 76, 20, 17
Offset: 2

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Comments

The values of n in A103515

Examples

			P(2)*2^0-1=5 is prime, so a(2)=0; P(9)*2^2-1=892371479 is prime, so a(9)=2;
		

Crossrefs

Programs

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

A104876 Semiprimes of the form primorial(k) - 1.

Original entry on oeis.org

209, 510509, 6469693229, 200560490129, 13082761331670029, 1922760350154212639069, 557940830126698960967415389, 40729680599249024150621323469, 2305567963945518424753102147331756069, 232862364358497360900063316880507363069
Offset: 1

Views

Author

Jonathan Vos Post, Mar 28 2005

Keywords

Examples

			4# - 1 = 209 = 11 * 19.
7# - 1 = 510509 = 61 * 8369.
10# - 1 = 6469693229 = 79 * 81894851.
		

Crossrefs

Programs

  • Mathematica
    Bigomega[n_]:=Plus@@Last/@FactorInteger[n]; SemiprimeQ[n_]:=Bigomega[n]==2; Primorial[n_]:=Product[Prime[i], {i, n}]; Select[Table[Primorial[n]-1, {n, 30}], SemiprimeQ] (* Ray Chandler, Mar 28 2005 *)

Formula

n# - 1 iff semiprime. Equals {A002110(i) - 1} intersection {A001358(j)}.

Extensions

Entry revised by N. J. A. Sloane, Apr 01 2006
Previous Showing 21-30 of 45 results. Next