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.

A114461 Position in A112037 where the n-th prime appears.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 10, 16, 6, 8, 22, 12, 9, 14, 20, 11, 41, 26, 19, 35, 21, 23, 13, 15, 28, 37, 38, 39, 53, 17, 32, 18, 45, 33, 56, 49, 68, 40, 92, 24, 25, 52, 27, 43, 123, 44, 87, 98, 177, 100, 29, 30, 63, 31, 67, 69, 88, 71, 54, 34, 73, 36, 57, 76, 77, 252, 80, 118, 85, 121, 165
Offset: 1

Views

Author

Robert G. Wilson v, Nov 29 2005

Keywords

Crossrefs

Programs

  • Mathematica
    lst = {}; r[n_] := (len = Length@lst; lst = Flatten@ Join[lst, Select[First /@ FactorInteger[Prime@n - 1], ! MemberQ[lst, # ] &]]; If[l < Length@lst, 1, 0]); Do[ r[n], {n, 260}]; Table[Position[lst, Prime[n]], {n, 71}] // Flatten

A112038 The p values which produce new terms in A112037.

Original entry on oeis.org

3, 7, 11, 23, 29, 47, 53, 59, 83, 103, 107, 149, 167, 173, 179, 191, 227, 263, 269, 283, 293, 311, 317, 347, 359, 367, 383, 389, 467, 479, 503, 509, 557, 563, 569, 587, 607, 619, 643, 653, 709, 719, 773, 797, 823, 839, 863, 887, 907, 983, 1019, 1087, 1091
Offset: 1

Views

Author

Michel Dauchez (mdzdm(AT)yahoo.fr), Nov 28 2005

Keywords

Crossrefs

The p values which do not produce new terms in A112037 are given by A061303. - Ray Chandler, Nov 30 2005

Programs

  • Mathematica
    lst = {}; r[n_] := (len = Length@lst; lst = Flatten@ Join[lst, Select[First /@ FactorInteger[Prime@n - 1], ! MemberQ[lst, # ] &]]; If[l < Length@lst, 1, 0]); Prime /@ Select[Range@185, r[ # ] == 1 &] (* Robert G. Wilson v *)

Extensions

Better description from Jack Brennen, Nov 28 2005
Extended by Ray Chandler and Robert G. Wilson v, Nov 30 2005

A038111 Denominator of density of integers with smallest prime factor prime(n).

Original entry on oeis.org

2, 6, 15, 105, 385, 1001, 17017, 323323, 7436429, 19605131, 86822723, 3212440751, 131710070791, 5663533044013, 266186053068611, 613385252723321, 2783825377744303, 5855632691117327, 392327390304860909, 27855244711645124539, 2033432863950094091347, 160641196252057433216413
Offset: 1

Views

Author

Keywords

Comments

Denominator of (Product_{k=1..n-1} (1 - 1/prime(k)))/prime(n). - Vladimir Shevelev, Jan 09 2015
a(n)/a(n-1) = prime(n)/q(n) where q(n) is 1 or a prime for all n < 1000. What are the first indices for which q(n) is composite? - M. F. Hasler, Dec 04 2018

Examples

			From _M. F. Hasler_, Dec 03 2018: (Start)
The density of the even numbers is 1/2, thus a(1) = 2.
The density of the numbers divisible by 3 but not by 2 is 1/6, thus a(2) = 6.
The density of multiples of 5 not divisible by 2 or 3 is 2/30, thus a(3) = 15. (End)
		

Crossrefs

Programs

  • Maple
    N:= 100: # for the first N terms
    Q:= 1: p:= 1:
    for n from 1 to N do
      p:= nextprime(p);
      A[n]:= denom(Q/p);
      Q:= Q * (1 - 1/p);
    end:
    seq(A[n],n=1..N); # Robert Israel, Jul 14 2014
  • Mathematica
    Denominator@Table[ Product[ 1-1/Prime[ k ], {k, n-1} ]/Prime[ n ], {n, 1, 64} ]
    (* Wouter Meeussen *)
    Denominator@
    Table[EulerPhi[Exp[Sum[MangoldtLambda[m], {m, 1, Prime[n] - 1}]]]/
    Exp[Sum[MangoldtLambda[m], {m, 1, Prime[n]}]], {n, 1, 21}]
    (* Fred Daniel Kline, Jul 14 2014 *)
  • PARI
    apply( A038111(n)=denominator(prod(k=1,n-1,1-1/prime(k)))*prime(n), [1..30]) \\ M. F. Hasler, Dec 03 2018

Formula

a(n) = denominator 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
a(n) = prime(n)*A060753(n). - Vladimir Shevelev, Jan 10 2015
a(n) = a(n-1)*prime(n)/q(n), where q(n) = 1 except for q({3, 5, 6, 10, 11, 16, 17, 18, ...}) = (2, 3, 5, 11, 7, 23, 13, 29, ...), cf. A112037. - M. F. Hasler, Dec 03 2018

Extensions

Name edited by M. F. Hasler, Dec 03 2018

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

A236388 Primes in order of first appearance among the prime factors of p+1 where p is a prime.

Original entry on oeis.org

3, 2, 7, 5, 19, 11, 31, 17, 37, 13, 23, 79, 41, 29, 97, 53, 43, 139, 47, 71, 157, 83, 59, 199, 67, 211, 229, 61, 131, 271, 137, 307, 103, 107, 109, 331, 337, 113, 173, 367, 379, 127, 197, 439, 227, 163, 499, 101, 73, 263, 547, 281, 577, 293, 601, 607
Offset: 1

Views

Author

Joseph L. Pe, Jan 24 2014

Keywords

Comments

The first p+1 (p prime) is 2+1=3, so 3 is the first term of the sequence. The next is 3+1=4=2*2, and the prime 2 appears next, so it is the second term of the sequence. The next p+1 = 5+1 = 6 gives no new prime factor; neither do 7+1 = 8 and 11+1 = 12. 13+1 = 14 = 2*7 gives the new prime factor 7, so 7 is the third term of the sequence.
If "p+1" is changed to "p-1" we get A112037. - N. J. A. Sloane, Jan 24 2014

Crossrefs

Cf. A112037.

Programs

  • Mathematica
    DeleteDuplicates[ First /@ Flatten[FactorInteger[1 + Prime@Range@200], 1]] (* Giovanni Resta, Jan 24 2014 *)

A307805 a(n) = first position of prime(n) in A023503.

Original entry on oeis.org

2, 4, 5, 10, 9, 16, 27, 43, 15, 17, 64, 35, 23, 40, 61, 28, 127, 73, 57, 104, 62, 66, 39, 41, 77, 111, 114, 117, 182, 49, 97, 56, 143, 102, 196, 155, 248, 119, 346, 69, 72, 181, 76, 137, 497, 139, 318, 388, 721, 401, 91, 92, 229, 96, 243, 249, 325, 258, 186, 103
Offset: 1

Views

Author

Michael De Vlieger, Apr 29 2019

Keywords

Comments

Apparent permutation of A071349(n) apart from A071349(1) = 1.
Let i = a(n). Sorting prime(n) in order of increasing i yields A112037 = {2, 3, 5, 11, 7, 23, 13, 29, 41, ...}. The product of the first j terms of A112037 = A071350(j).

Examples

			a(1) = 2 since prime(1) = gpf(prime(2) - 1), i.e., 2 = gpf(2).
a(2) = 4 since prime(2) = gpf(prime(4) - 1), i.e., 3 = gpf(6).
a(3) = 5 since prime(3) = gpf(prime(5) - 1), i.e., 5 = gpf(10).
a(4) = 10 since prime(4) = gpf(prime(10) - 1), i.e., 7 = gpf(28).
		

Crossrefs

Programs

  • Mathematica
    With[{s = Array[FactorInteger[Prime@ # - 1][[-1, 1]] &, 1000]}, Reap[Do[If[FreeQ[s, #], Break[], Sow@ FirstPosition[s, #][[1]]] &@ Prime@ i, {i, Length@ s}]][[-1, -1]]]
  • PARI
    { a = vector(60); pr = primes(#a); u = 1; n = 1;
    forprime (p=3, oo, n++; f=factor(p-1); g=setsearch(pr, f[#f~,1]);
    if (g && !a[g], a[g]=n; while (a[u], print1 (a[u]", "); u++; if (u>#a, break (2))))) } \\ Rémy Sigrist, May 28 2019
Showing 1-6 of 6 results.