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 51-60 of 106 results. Next

A078558 GCD of sigma(p#) and phi(p#) where p# = A002110(n) is the product of the first n primes.

Original entry on oeis.org

1, 2, 8, 48, 96, 1152, 9216, 1658880, 3317760, 92897280, 2786918400, 100329062400, 802632499200, 370816214630400, 741632429260800, 2966529717043200, 29665297170432000, 355983566045184000
Offset: 1

Views

Author

Labos Elemer, Dec 06 2002

Keywords

Examples

			m=2,3,30,210 primorials are balanced numbers so these GCD() equals phi(): a(n)=1,2,8,48 (see A005867).
		

Crossrefs

Programs

  • Mathematica
    GCD[DivisorSigma[1,#],EulerPhi[#]]&/@FoldList[Times,Prime[Range[20]]] (* Harvey P. Dale, Feb 28 2016 *)
  • PARI
    a(n)=gcd(prod(i=1,n,prime(i)-1),prod(i=1,n,prime(i)+1)) \\ Charles R Greathouse IV, Dec 09 2013

Formula

a(n) = gcd(A000203(A002110(n)), A000005(A002110(n))) = gcd(A005867(n), A054640(n)).

A279864 Irregular triangle read by rows: the n-th row corresponds to the natural numbers not exceeding A002110(n) and divisible by the n-th prime but not by a smaller prime.

Original entry on oeis.org

2, 3, 5, 25, 7, 49, 77, 91, 119, 133, 161, 203, 11, 121, 143, 187, 209, 253, 319, 341, 407, 451, 473, 517, 583, 649, 671, 737, 781, 803, 869, 913, 979, 1067, 1111, 1133, 1177, 1199, 1243, 1331, 1397, 1441, 1507, 1529, 1573, 1639, 1661, 1727, 1793, 1837, 1859
Offset: 1

Views

Author

Rémy Sigrist, Dec 21 2016

Keywords

Comments

The n-th row has A005867(n-1) terms.
The n-th row starts with the n-th prime.
The terms of this sequence appear, in that order, while applying the sieve of Eratosthenes; the n-th rows matches the first A005867(n-1) terms of the n-th row of A083140.
Any number n>1 can be uniquely written as n = T(i,j)+k*A002110(i) (with k>=0); in that case:
- i = A055396(n),
- k = floor( (n-1)/A002110(A055396(n)) ).
This sequence corresponds to the numbers n>1 such that n <= A002110(A055396(n)).
Let S(i,j) = { T(i,j)+k*A002110(i) with k>=0 }, then:
- For any n>0, { S(n,j) } is a partition of the numbers divisible by the n-th prime but not by a smaller prime,
- For any n>0, { S(i,j) such that i<=n } is a partition of the numbers divisible by the n-th prime,
- { S(i,j) } is a partition of the numbers > 1.

Examples

			From _M. F. Hasler_, May 16 2017: (Start)
The triangle starts
2;
3;
5, 25;
7, 49, 77, 91, 119, 133, 161, 203;
11, 121, 143, 187, 209, 253, 319, 341, 407, 451, 473, 517, 583, 649, 671, 737, 781, 803, 869, 913, 979, 1067, 1111, 1133, 1177, 1199, 1243, 1331, 1397, 1441, 1507, 1529, 1573, 1639, 1661, 1727, 1793, 1837, 1859, 1903, 1969, 1991, 2057, 2101, 2123, 2167, 2189, 2299;
... (End)
		

Crossrefs

Programs

  • Mathematica
    Table[Function[p, Select[Range[Times @@ p], Function[k, And[Divisible[k, Last@ p], Total@ Boole@ Divisible[k, Most@ p] == 0]]]]@ Prime@ Range@ n, {n, 5}] // Flatten (* Michael De Vlieger, Dec 21 2016 *)
    a[1] = {2}; a[2] = {3}; t[2] = {1, 5}; a[n_] := a[n] = Prime[n]*t[n - 1]; t[x_] := t[x] = Complement[Flatten[Table[k*Product[Prime[j], {j, x - 1}] + t[x - 1], {k, 0, Prime[x] - 1}]], a[x]]; Flatten[Table[a[n], {n, 6}]] (* L. Edson Jeffery, May 16 2017 *)
  • PARI
    pp=1; for (r=1, 5, forstep(n=prime(r), pp*prime(r), prime(r), if (gcd(n,pp)==1, print1 (n ", "))); pp *= prime(r); print(""))
    
  • PARI
    A279864_row(r,p=prime(r),P=prod(i=1,r-1,prime(i)))=select(n->gcd(n,P)==1,p*[1..P])  \\ M. F. Hasler, May 16 2017

Formula

T(n,1) = A000040(n) for any n>0.
T(n,k) = A083140(n,k) for any n>0 and k<=A005867(n-1).

A323739 a(n) is the number of residues modulo (4*primorial(n)) of the squares of primes greater than or equal to prime(n+1).

Original entry on oeis.org

2, 1, 1, 2, 6, 30, 180, 1440, 12960, 142560, 1995840, 29937600, 538876800, 10777536000, 226328256000, 5205549888000, 135344297088000, 3924984615552000, 117749538466560000, 3885734769396480000, 136000716928876800000, 4896025809439564800000, 190945006568143027200000
Offset: 0

Views

Author

Jon E. Schoenfield, Feb 20 2019

Keywords

Comments

Here, "primorial(n)" is A002110(n) = Product_{k=1..n} prime(k).
For n >= 1, a(n) is the number of coprime squares modulo 4*primorial(n). Note that 4*primorial(n) = A102476(n+1) is the smallest k such that rank((Z/kZ)*) = n+1 for n >= 1. (The rank of a finitely generated group rank(G) is defined to be the size of the minimal generating sets of G. In particular, rank((Z/kZ)*) = 0 if k <= 2 and A046072(k) otherwise.) - Jianing Song, Oct 18 2021

Examples

			a(3) = 2 because, for every prime p >= prime(3+1) = 7, p^2 mod (4*2*3*5 = 120) is one of the 2 values {1, 49}:
   7^2 mod 120 =  49 mod 120 = 49
  11^2 mod 120 = 121 mod 120 =  1
  13^2 mod 120 = 169 mod 120 = 49
  17^2 mod 120 = 289 mod 120 = 49
  19^2 mod 120 = 361 mod 120 =  1
  23^2 mod 120 = 529 mod 120 = 49
  29^2 mod 120 = 841 mod 120 =  1
  ...
.
   q=(n+1)st        b =          residues p^2 mod b
n    prime    4*primorial(n)         for p >= q         a(n)
=  =========  ===============  =======================  ====
0      2      4         =   4           {0,1}             2
1      3      4*2       =   8            {1}              1
2      5      4*2*3     =  24            {1}              1
3      7      4*2*3*5   = 120           {1,49}            2
4     11      4*2*3*5*7 = 840  {1,121,169,289,361,529}    6
		

Crossrefs

Programs

Formula

Conjecture: a(n) = 2^(1-n)*Product_{j=1..n} (prime(j)-1) for n >= 0, so a(n) = a(n-1)*(prime(n)-1)/2 for n >= 1.
From Charlie Neder, Feb 28 2019: (Start)
Conjecture is true. Since there exists a prime congruent to r modulo 4*primorial(n) for any r coprime to primorial(n), this set is precisely the set of coprime quadratic residues of 4*primorial(n). If n >= 1, each residue can be broken down into congruences modulo 8 and the first n-1 odd primes, each odd prime p has (p-1)/2 residue classes, and every combination eventually occurs, giving the formula. (End)

Extensions

More terms from Jianing Song, Oct 18 2021

A377469 a(n) = (A003309(n)-1)*a(n-1) (n > 1), a(1) = 1, where A003309 are the ludic numbers.

Original entry on oeis.org

1, 1, 2, 8, 48, 480, 5760, 92160, 2027520, 48660480, 1362493440, 49049763840, 1961990553600, 82403603251200, 3790565749555200, 197109418976870400, 11826565138612224000, 780553299148406784000, 54638730940388474880000, 4152543551469524090880000, 340508571220500975452160000
Offset: 1

Views

Author

M. F. Hasler, Nov 13 2024

Keywords

Comments

The analog of A005867 for ludic numbers A003309 instead of primes A000040. Since A003309(9) = 23 > A000040(8) = 19 is the first term that differs in the two sequences (up to offset and initial 1's), this sequence differs from A005867 also from the 9th term on, which is a(9) = (23-1)*92160 = 2027520 instead of A005867(8) = (19-1)*92160 = 1658880.
This sequence gives the (pseudo) period lengths of the rows of the ludic sieve array A255127, in which row r is pseudo-periodic, A255127(r, c) = A255127(r, c-a(r)) + S(r), with the shift S(r) given by the ludic factorials A376237.

Examples

			Since A003309 = (1, 2, 3, 5, 7, 11, 13,17, 23, 25, ...), we get:
a(2) = (2-1)*1 = 1, a(3) = (3-1)*1 = 2, a(4) = (5-1)*2 = 8, a(5) = (7-1)*8 = 48,
a(6) = (11-1)*48 = 480, a(7) = (13-1)*480 = 5760, a(8) = (17-1)*2 = 92160,
a(9) = (23-1)*92160 = 2027520, a(10) = (25-1)*2027520 = 48660480, and so on.
		

Crossrefs

Cf. A003309 (ludic numbers), A255127 (ludic sieve array), A376237 (ludic factorials), A005867 (analog of this sequence for primes), A000040 (the primes).

Programs

Formula

a(n) = A005867(n-1) up to n = 8.

A071349 Numbers k for which the GCD of the k-th primorial number and its totient (A058250) sets record.

Original entry on oeis.org

1, 2, 4, 5, 9, 10, 15, 16, 17, 23, 27, 28, 35, 39, 40, 41, 43, 49, 56, 57, 61, 62, 64, 66, 69, 72, 73, 76, 77, 91, 92, 96, 97, 102, 103, 104, 107, 111, 114, 117, 119, 127, 128, 137, 139, 143, 146, 150, 154, 155, 166, 171, 181, 182, 186, 195, 196, 201, 208, 214, 215
Offset: 1

Views

Author

Labos Elemer, May 21 2002

Keywords

Crossrefs

Programs

  • Mathematica
    q[n_] := Product[Prime[i], {i, 1, n}]; fq[n_] := Product[Prime[i] - 1, {i, 1, n}];
    a=0; Do[s=GCD[q[n], fq[n]]; If[s>a, a=s; Print[n]], {n, 1, 1000}]

Formula

If A058250(m) > A058250(k) for all k < m then m is a term.

A071350 Distinct values of A058250; these terms appear first at subscripts listed in A071349.

Original entry on oeis.org

1, 2, 6, 30, 330, 2310, 53130, 690690, 20030010, 821230410, 13960916970, 739928599410, 27377358178170, 2272320728788110, 97709791337888730, 8696171429072096970, 165227257152369842430, 18670680058217792194590
Offset: 1

Views

Author

Labos Elemer, May 21 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Prepend[FoldList[Times,DeleteDuplicates[Rest[Flatten[FactorInteger[#][[All, 1]]&/@(Prime[Range[100]]-1)]]]],1] (* Jamie Morken, Apr 27 2021 after Harvey P. Dale at A112037, May 26 2019 *)
  • PARI
    f(n) = my(pr=prod(k=1, n, prime(k))); gcd(pr, eulerphi(pr)); \\ A058250
    lista(nn) = Set(vector(nn, k, f(k))); \\ Michel Marcus, Apr 27 2021

Formula

a(n) = a(n-1) * A112037(n), n >= 2. - David A. Corneth, Apr 27 2021

A098591 a(k) contains primality information for the numbers in the interval (k*30,...,(k+1)*30) packed into one byte using the fact that only numbers == 1, 7, 11, 13, 17, 19, 23, 29 mod 30 can be prime.

Original entry on oeis.org

223, 239, 126, 182, 219, 61, 249, 213, 79, 30, 243, 234, 166, 237, 158, 230, 12, 211, 211, 59, 221, 89, 165, 106, 103, 146, 189, 120, 30, 166, 86, 86, 227, 173, 45, 222, 42, 76, 85, 217, 163, 240, 159, 3, 84, 161, 248, 46, 253, 68, 233, 102, 246, 19, 58, 184, 76
Offset: 1

Views

Author

Hugo Pfoertner, Sep 16 2004

Keywords

Comments

This sequence illustrates an efficient method for storing all prime numbers up to some moderate limit. With this method all prime numbers < 2^31 can be stored in a 70-MByte file.
Because of divisibility by 7, 254 appears only as the zeroth term, and 127 and 255 do not appear at all. All other single-byte numbers (0..255) appear. 247 is the last to appear, first appearing as the 22621st term.
0 and at least one nonzero term must both appear infinitely often. (Probably every number 0..126 and 128..253 appears infinitely often, but this may be hard to prove.) - Keith F. Lynch, Sep 09 2018

Examples

			a(1)=223: From the list of prime candidates between 30 and 60 only the number 49 is composite. Therefore
a(1) =   2^0 (representing 30 +  1)
       + 2^1 (representing 30 +  7)
       + 2^2 (representing 30 + 11)
       + 2^3 (representing 30 + 13)
       + 2^4 (representing 30 + 17)
       + 2^6 (representing 30 + 23)
       + 2^7 (representing 30 + 29)
     = 1 + 2 + 4 + 8 + 16 + 64 + 128 = 223.
a(17): There are 2 primes in the interval (17*30, 17*30 + 30) = (510,540): 521 == 11 (mod 30) and 523 == 13 (mod 30). Therefore a(17) = 2^2 (representing 510 + 11) + 2^3 (representing 510 + 13) = 4 + 8 = 12.
a(360) = 0 (1st occurrence), no primes between 360*30 = 10800 and 10830. - _Frank Ellermann_, Apr 03 2020
		

Crossrefs

Cf. A000040 (prime numbers), A006880 (number of primes < 10^n), A098592 (number of primes in intervals (30*k, 30*(k+1))), A005867 (primorial sieving candidates), A007775 (7-rough numbers, corresponding to the bits).

Programs

  • Mathematica
    With[{s = Select[Range@ 30, CoprimeQ[#, 30] &]}, Array[Total[2^(Position[30 # + s, ?PrimeQ][[All, 1]] - 1) ] &, 57]] (* _Michael De Vlieger, Sep 10 2018 *)
  • PARI
    a(k) = {vec = [1, 7, 11, 13, 17, 19, 23, 29]; return (sum(i=1, length(vec), isprime(30*k+vec[i])*(1 << (i-1))));} \\ Michel Marcus, Jan 31 2013
    
  • Python
    from sympy import isprime
    v = [1, 7, 11, 13, 17, 19, 23, 29]
    def a(n): return sum(2**k for k, vk in enumerate(v) if isprime(n*30+vk))
    print([a(n) for n in range(1, 58)]) # Michael S. Branicky, Oct 10 2021

Formula

a(n) = Sum_{k=0..7} (2^k)*isprime(30*n + offset(k)), where isprime(x)=1 for x prime, otherwise 0, and offset(k) = {1, 7, 11, 13, 17, 19, 23, 29} for k=0..7.

A216868 Nicolas's sequence whose positivity is equivalent to the Riemann hypothesis.

Original entry on oeis.org

3, 4, 13, 67, 560, 6095, 87693, 1491707, 30942952, 795721368, 22614834943, 759296069174, 28510284114397, 1148788714239052, 50932190960133487, 2532582753383324327, 139681393339880282191, 8089483267352888074399, 512986500081861276401709, 34658318003703434434962860
Offset: 1

Views

Author

Jonathan Sondow, Sep 29 2012

Keywords

Comments

a(n) = p(n)# - floor(phi(p(n)#)*log(log(p(n)#))*exp(gamma)), where p(n)# is the n-th primorial, phi is Euler's totient function, and gamma is Euler's constant.
All a(n) are > 0 if and only if the Riemann hypothesis is true. If the Riemann hypothesis is false, then infinitely many a(n) are > 0 and infinitely many a(n) are <= 0. Nicolas (1983) proved this with a(n) replaced by p(n)#/phi(p(n)#)-log(log(p(n)#))*exp(gamma). Nicolas's refinement of this result is in A233825.
See A185339 for additional links, references, and formulas.
Named after the French mathematician Jean-Louis Nicolas. - Amiram Eldar, Jun 23 2021

Examples

			prime(2)# = 2*3 = 6 and phi(6) = 2, so a(2) = 6 - floor(2*log(log(6))*e^gamma) = 6 - floor(2*0.58319...*1.78107...) = 6 - floor(2.07...) = 6 - 2 = 4.
		

References

  • J.-L. Nicolas, Petites valeurs de la fonction d'Euler et hypothèse de Riemann, in Seminar on Number Theory, Paris 1981-82 (Paris 1981/1982), Birkhäuser, Boston, 1983, pp. 207-218.

Crossrefs

Programs

  • Mathematica
    primorial[n_] := Product[Prime[k], {k, n}]; Table[With[{p = primorial[n]}, p - Floor[EulerPhi[p]*Log[Log[p]]*Exp[EulerGamma]]], {n, 1, 20}]
  • PARI
    nicolas(n) = {p = 2; pri = 2;for (i=1, n, print1(pri - floor(eulerphi(pri)*log(log(pri))*exp(Euler)), ", ");p = nextprime(p+1);pri *= p;);} \\ Michel Marcus, Oct 06 2012
    
  • PARI
    A216868(n)={(n=prod(i=1,n,prime(i)))-floor(eulerphi(n)*log(log(n))*exp(Euler))}  \\ M. F. Hasler, Oct 06 2012

Formula

a(n) = prime(n)# - floor(phi(prime(n)#)*log(log(prime(n)#))*e^gamma).
a(n) = A002110(n) - floor(A005867(n)*log(log(A002110(n)))*e^gamma).
Limit_{n->oo} a(n)/p(n)# = 0.

A309802 a(n) is the coefficient of x^n in the polynomial Product_{i=1..n+2} (prime(i)*x-1).

Original entry on oeis.org

1, 10, 101, 1358, 20581, 390238, 8130689, 201123530, 6166988769, 201097530280, 7754625545261, 329758834067168, 14671637258193181, 711027519310719868, 38706187989054920001, 2338431642812927422310, 145908145906128304198449, 9976861293427674211625032
Offset: 0

Views

Author

Alexey V. Bazhin, Aug 17 2019

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> coeff(mul(ithprime(i)*x-1, i=1..n+2), x, n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 18 2019

Formula

a(n) = [x^n] Product_{i=1..n+2} (prime(i)*x-1).
a(n) = abs(A070918(n+2,2)).
a(n) = abs(A238146(n+2,n)) for n>0.
a(n) = A260613(n+2,n).

A309803 a(n) is the coefficient of x^n in the polynomial Product_{i=1..n+3} (prime(i)*x-1).

Original entry on oeis.org

-1, -17, -288, -5102, -107315, -2429223, -64002818, -2057205252, -69940351581, -2788890538777, -122099137635118, -5580021752377242, -276932659619923555, -15388458479166668283, -946625238259888348698, -60082571176666116692888, -4171440414742758122621945
Offset: 0

Views

Author

Alexey V. Bazhin, Aug 17 2019

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> coeff(mul(ithprime(i)*x-1, i=1..n+3), x, n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 19 2019

Formula

a(n) = [x^n] Product_{i=1..n+3} (prime(i)*x-1).
a(n) = -abs(A070918(n+3,3)).
a(n) = -abs(A238146(n+3,n)) for n>0.
a(n) = -A260613(n+3,n).
Previous Showing 51-60 of 106 results. Next