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

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

A038110 Numerator of frequency of integers with smallest divisor prime(n).

Original entry on oeis.org

1, 1, 1, 4, 8, 16, 192, 3072, 55296, 110592, 442368, 13271040, 477757440, 19110297600, 802632499200, 1605264998400, 6421059993600, 12842119987200, 770527199232000, 50854795149312000, 3559835660451840000
Offset: 1

Views

Author

Keywords

Comments

Numerator of Product_{k=1..n-1} (1 - 1/prime(k)). - Jonathan Sondow, Jan 31 2014
Equivalently, denominator of Product_{k=1..n-1} prime(k)/(prime(k)-1) (cf. A060753). - N. J. A. Sloane, Apr 17 2015
Sum_{n>=1} a(n)/A038111(n) = 1. - Bob Selcoe, Jan 09 2015
a(n)/A038111(n) = (1/prime(n))*Product_{k=1..n-1} (1 - 1/prime(k)) ~ e^(-c)/ (prime(n)*log(prime(n))), where c=0.577... is the Euler constant. - Vladimir Shevelev, Jan 10 2015

Examples

			a(10) = 110592 = ( 1*2*4*6*10*12*16*18*22 ) / ( 2*3*5*11 ).
		

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1) to a(N)
    Q:= 1: p:= 1:
    for n from 1 to N do
      p:= nextprime(p);
      A[n]:= numer(Q);
      Q:= Q * (1 - 1/p);
    end:
    seq(A[n],n=1..N); # Robert Israel, Jul 14 2014
  • Mathematica
    Numerator@Table[ Product[ 1-1/Prime[ k ], {k, n-1} ]/Prime[ n ], {n, 64} ]
    (* Wouter Meeussen *)
    Numerator@Table[ Product[ 1 - 1/Prime[ k ], {k, n-1}], {n, 64} ]
    (* Jonathan Sondow, Jan 31 2014 *)
    Numerator@
    Table[EulerPhi[Exp[Sum[MangoldtLambda[m], {m, 1, Prime[n] - 1}]]]/
    Exp[Sum[MangoldtLambda[m], {m, 1, Prime[n]}]], {n, 21}]
    (* Fred Daniel Kline, Jul 14 2014 *)
  • PARI
    a(n) = numerator(prod(k=1, n-1, (1 - 1/prime(k)))); \\ Michel Marcus, Aug 05 2019

Formula

a(n) = A005867(n-1) / A058250(n-1), where A058250(m) = gcd(A005867(m), A002110(m)). [Edited by Peter Munn, Jun 29 2025]
a(n)/A060753(n) = Product_{k=1..n-1} (1 - 1/prime(k)) ~ exp(-gamma)/log(n) as n->infinity (Mertens's 3rd theorem). - Jonathan Sondow, Jan 31 2014
a(n+1)/A038111(n+1) = a(n)/A038111(n) * (prime(n)-1)/prime(n+1). - Robert Israel, Jul 14 2014
a(n) = numerator of phi(e^(psi(p_n-1)))/e^(psi(p_n)), where psi(.) is the second Chebyshev function and phi(.) is Euler's totient function. - Fred Daniel Kline, Jul 17 2014

A286941 Irregular triangle read by rows: the n-th row corresponds to the totatives of the n-th primorial, A002110(n).

Original entry on oeis.org

1, 1, 5, 1, 7, 11, 13, 17, 19, 23, 29, 1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209
Offset: 1

Views

Author

Jamie Morken and Michael De Vlieger, May 16 2017

Keywords

Comments

Values in row n of a(n) are those of row n of A286942 complement those of row n of A279864.
From Michael De Vlieger, May 18 2017: (Start)
Numbers t < p_n# such that gcd(t, p_n#) = 0, where p_n# = A002110(n).
Numbers in the reduced residue system of A002110(n).
A005867(n) = number of terms of a(n) in row n; local minimum of Euler's totient function.
A048862(n) = number of primes in row n of a(n).
A048863(n) = number of nonprimes in row n of a(n).
Since 1 is coprime to all n, it delimits the rows of a(n).
The prime A000040(n+1) is the second term in row n since it is the smallest prime coprime to A002110(n) by definition of primorial.
The smallest composite in row n is A001248(n+1) = A000040(n+1)^2.
The Kummer numbers A057588(n) = A002110(n) - 1 are the last terms of rows n, since (n - 1) is less than and coprime to all positive n. (End)

Examples

			The triangle starts
1;
1, 5;
1, 7, 11, 13, 17, 19, 23, 29;
1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209;
		

Crossrefs

Cf. A285784 (nonprimes that appear), A335334 (row sums).

Programs

  • Mathematica
    Table[Function[P, Select[Range@ P, CoprimeQ[#, P] &]]@ Product[Prime@ i, {i, n}], {n, 4}] // Flatten (* Michael De Vlieger, May 18 2017 *)
  • PARI
    row(n) = my(P=factorback(primes(n))); select(x->(gcd(x, P) == 1), [1..P]); \\ Michel Marcus, Jun 02 2020

Extensions

More terms from Michael De Vlieger, May 18 2017

A309497 Irregular triangle read by rows: T(n,k) = A060753(n)*k-A038110(n)*A286941(n,k).

Original entry on oeis.org

0, 1, 2, 1, 11, 2, 1, 8, 7, 14, 13, 4, 27, -18, 1, 4, 23, 26, 13, 32, 19, 22, 41, 44, 31, 18, 37, 24, 27, 46, 33, 36, 23, -6, -3, 16, 19, 38, 41, 12, -1, 2, -11, 8, 11, -2, 17, 4, -9, -6, 13, 16, 3, 22, 9, 12, 31, 34, 53, 8
Offset: 0

Views

Author

Jamie Morken, Aug 05 2019

Keywords

Comments

The sequence is Primorial rows of A308121.
Row n has length A005867(n).
Row n > 1 average value = A060753(n)/2.
Row n > 1 has sum = A002110(n-1)*A038110(n)/2.
First value on row(n) = A161527(n-1).
Last value on row(n) = A038110(n) for n > 2.
For n > 1, A060753(n) = Max(row) + Min(row).
For values x and y on row n > 1 at positions a and b on the row:
x + y = A060753(n), where a = A005867(n-1) - (b-1).
For n > 2 the penultimate value on row A002110(n) is given by
Related identity:
A038110(n)/A038111(n)*(Prime(n)^2) - (A038110(n)/A038111(n)*((A038110(n)*Prime(n) - A060753(n))*Prime(n)/A038110(n))) = 1.

Examples

			The triangle starts:
row1: 0;
row2: 1;
row3: 2, 1;
row4: 11, 2, 1, 8, 7, 14, 13, 4;
row5: 27, -18, 1, 4, 23, 26, 13, 32, 19, 22, 41, 44, 31, 18, 37, 24, 27, 46, 33, 36, 23, -6, -3, 16, 19, 38, 41, 12, -1, 2, -11, 8, 11, -2, 17, 4, -9, -6, 13, 16, 3, 22, 9, 12, 31, 34, 53, 8;
		

Crossrefs

Programs

  • Mathematica
    row[0] = 0; row[n_] := -(v = Numerator[Product[1 - 1/Prime[i], {i, 1, n}] / Prime[n]] * Select[Range[(p = Product[Prime[i], {i, 1, n}])], CoprimeQ[p, #] &]) + Denominator[Product[((pr = Prime[i]) - 1)/pr, {i, 1, n}]] * Range[Length[v]]; Table[row[n], {n, 0, 4}] // Flatten (* Amiram Eldar, Aug 10 2019 *)

A161527 Numerators of cumulative sums of rational sequence A038110(k)/A038111(k).

Original entry on oeis.org

1, 2, 11, 27, 61, 809, 13945, 268027, 565447, 2358365, 73551683, 2734683311, 112599773191, 4860900544813, 9968041656757, 40762420985117, 83151858555707, 5085105491885327, 341472595155548909, 24295409051193284539, 1777124696397561611347
Offset: 1

Views

Author

Daniel Tisdale, Jun 12 2009

Keywords

Comments

By rewriting the sequence of sums as 1 - Product_{n>=1} (1 - 1/prime(n)), one can show that the product goes to zero and the sequence of sums converges to 1. This is interesting because the terms approach 1/(2*prime(n)) for large n, and a sum of such terms might be expected to diverge, since Sum_{n>=1} 1/(2*prime(n)) diverges.
Denominators appear to be given by A060753(n+1). - Peter Kagey, Jun 08 2019
A254196 appears to be a duplicate of this sequence. - Michel Marcus, Aug 05 2019

Crossrefs

Programs

  • Mathematica
    Numerator[Table[1 - Product[1 - (1/Prime[k]), {k,1,n}], {n,1,20}]]
  • PARI
    r(n) = prod(k=1, n-1, (1 - 1/prime(k)))/prime(n);
    a(n) = numerator(sum(k=1, n, r(k))); \\ Michel Marcus, Jun 08 2019

Formula

a(n) = A053144(n)/A058250(n). - Jamie Morken, Aug 28 2022

A335334 Sum of the integers in the reduced residue system of A002110(n).

Original entry on oeis.org

1, 6, 120, 5040, 554400, 86486400, 23524300800, 8045310873600, 4070927302041600, 3305592969257779200, 3074201461409734656000, 4094836346597766561792000, 6715531608420337161338880000, 12128250084807128913378017280000
Offset: 1

Views

Author

Jamie Morken, Jun 02 2020

Keywords

Comments

Sum of the integers up to A002110(n) and coprime to A002110(n).
The sequence gives the sum of row n of A286941(n).

Examples

			For n = 3: A002110(3) = 30, the reduced residue system of 30 is {1, 7, 11, 13, 17, 19, 23, 29}. The sum is a(3) = 120.
		

Crossrefs

Programs

  • Mathematica
    n = 15;
    A002110 = Drop[FoldList[Times, 1, Prime[Range[n]]], 1];
    A005867 = Drop[EulerPhi@FoldList[Times, 1, Prime@Range@n], 1];
    A002110*A005867/2
    (* Second program: *)
    Map[# EulerPhi[#]/2 &, FoldList[Times, Prime@ Range@ 14]] (* Michael De Vlieger, Apr 07 2021 *)
  • PARI
    a(n) = my(P=factorback(primes(n))); P*eulerphi(P)/2; \\ Michel Marcus, Jun 02 2020

Formula

a(n) = A023896(A002110(n)).
a(n) = A002110(n)*A005867(n)/2 = A070826(n)*A005867(n).
a(n) = (A002110(n)*A038110(n+1)/2)*A058250(n).

A307388 Length of the period of decimal representation of Product_{k=1..n} A038111(k)/A038110(k).

Original entry on oeis.org

1, 27, 729, 59049, 43046721, 31381059609, 68630377364883, 150094635296999121, 328256967394537077627, 717897987691852588770249, 4710128697246244834921603689, 92709463147897837085761925410587, 3649600726280146254718103955713167842
Offset: 9

Views

Author

Jamie Morken, Apr 06 2019

Keywords

Comments

The offset is 9 since for 0 < n < 5, the product is an integer, and for 4 < n < 9 the decimal expansion ends with zeros.

Examples

			For example for n=9 with (2/1) * (6/1) * (15/1) * (105/4) * (385/8) * (1001/16) * (17017/192) * (323323/3072) * (7436429/55296) = 2759414170256180364552625 / 154618822656 = 17846560482454.30745852273604315188195970323350694444444444444... so a(9) = 1.
		

Crossrefs

Programs

  • Mathematica
    Primorial[n_] := Times @@ Prime[Range[n]]
    ClearAll[iter]
    ClearAll[fracPer, vp];
    (*p-adic order*)
    vp[p_?PrimeQ, n_Integer] :=
      Length@NestWhileList[#/p &, n/p, IntegerQ] - 1;
    (*fraction decimal expansion period*)
    fracPer[q_Integer] := 0;
    fracPer[q_Rational] := Module[{den, p2, p5}, den = Denominator[q];
       p2 = vp[2, den];
       p5 = vp[5, den];
       den = den/2^p2/5^p5;
       If[den == 1, 0, MultiplicativeOrder[10, den]]];
    iter[{periods_, frac_, n_}] := {{periods, fracPer[#]}, #, n + 1} &[
       frac*Primorial[n]/EulerPhi[Primorial[Max[1, n - 1]]]];
    Flatten@First@
      Nest[iter, {0, Primorial[0]/EulerPhi[Primorial[0]], 0}, 50]
Showing 1-8 of 8 results.