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

A249270 Decimal expansion of lim_{n->oo} (1/n)*Sum_{k=1..n} smallest prime not dividing k.

Original entry on oeis.org

2, 9, 2, 0, 0, 5, 0, 9, 7, 7, 3, 1, 6, 1, 3, 4, 7, 1, 2, 0, 9, 2, 5, 6, 2, 9, 1, 7, 1, 1, 2, 0, 1, 9, 4, 6, 8, 0, 0, 2, 7, 2, 7, 8, 9, 9, 3, 2, 1, 4, 2, 6, 7, 1, 9, 7, 7, 2, 6, 8, 2, 5, 3, 3, 1, 0, 7, 7, 3, 3, 7, 7, 2, 1, 2, 7, 7, 6, 6, 1, 2, 4, 1, 9, 0, 1, 7, 8, 1, 1, 2, 3, 1, 7, 5, 8, 3, 7, 4, 2, 2, 9, 8, 3
Offset: 1

Views

Author

Jean-François Alcover, Oct 24 2014

Keywords

Comments

The old definition was "Decimal expansion of the mean value over all positive integers of the least prime not dividing a given integer."
The integer parts of the sequence having this constant as starting value and thereafter x[n+1] = (frac(x[n])+1)*floor(x[n]), where floor and frac are integer and fractional part, are exactly the sequence of the prime numbers: see the Grime-Haran Numberphile video for details. - M. F. Hasler, Nov 28 2020

Examples

			2.9200509773161347120925629171120194680027278993214267...
		

References

  • Steven R. Finch, Meissel-Mertens constants: Quadratic residues, Mathematical Constants, Cambridge Univ. Press, 2003, pp. 96—98.

Crossrefs

Programs

  • Mathematica
    digits = 103; Clear[s]; s[m_] := s[m] = Sum[(Prime[k] - 1)/Product[Prime[j], {j, 1, k - 1}] // N[#, digits + 100]&, {k, 1, m}]; s[10]; s[m = 20]; While[RealDigits[s[m]] != RealDigits[s[m/2]], m = 2*m]; RealDigits[s[m], 10, digits] // First
  • Sage
    def sharp_primorial(n): return sloane.A002110(prime_pi(n));
    @CachedFunction
    def spv(n):
        b = 0
        for i in (0..n):
            b += 1 / sharp_primorial(i)
        return b
    N(spv(300), digits=108) # Jani Melik, Jul 22 2015

Formula

Sum_{k >= 1} (p_k - 1)/(p_1 p_2 ... p_{k-1}), where p_k is the k-th prime number.
Sum_{k >= 0} 1/A034386(k). - Jani Melik, Jul 22 2015
From Amiram Eldar, Oct 29 2020: (Start)
Equals lim_{n->oo} (1/n) * Sum_{k=1..n} A053669(k).
Equals 2 + Sum_{n>=1} (prime(n+1)-prime(n))/prime(n)# = 2 + Sum_{n>=1} A001223(n)/A002110(n). (End)
prime(n+1) = floor(C*prime(n)# - prime(n)*floor(C*prime(n-1)# - 1)) with prime(1)=2 where C is this constant. - Davide Rotondo, Sep 15 2023

Extensions

Definition revised by N. J. A. Sloane, Nov 29 2020

A232931 The least positive integer k such that Kronecker(D/k) = -1 where D runs through all positive fundamental discriminants (A003658).

Original entry on oeis.org

2, 3, 5, 2, 3, 2, 7, 5, 2, 5, 2, 7, 3, 3, 2, 3, 5, 13, 2, 3, 2, 5, 7, 2, 2, 5, 3, 3, 2, 5, 2, 3, 11, 2, 3, 11, 7, 7, 2, 7, 3, 3, 2, 7, 2, 3, 11, 2, 3, 2, 5, 5, 2, 5, 2, 11, 3, 3, 5, 2, 7, 11, 2, 3, 2, 5, 7, 2, 2, 5, 3, 3, 2, 7, 3, 11, 2, 3, 7, 7, 5, 2, 5, 2, 13, 3, 3, 2, 2, 3, 2, 3, 2, 5, 5, 11, 2, 7, 5, 3, 3, 5, 2, 3, 13, 5, 2, 3, 2, 17, 2, 2, 7, 3, 3, 2, 13, 2, 5, 2, 3, 5, 7, 5, 2, 5, 2, 11, 3, 2, 5, 2, 3, 7, 2, 3, 2, 17, 5, 7, 2, 7, 2, 5, 3, 3, 7, 2, 3, 7, 5, 2, 3
Offset: 2

Views

Author

Steven Finch, Dec 02 2013

Keywords

Comments

From Jianing Song, Jan 30 2019: (Start)
a(n) is necessarily prime. Otherwise, if a(n) is not prime, we have (D/p) = 0 or 1 for all prime divisors p of a(n), so (D/a(n)) must be 0 or 1 too, a contradiction.
a(n) is the least inert prime in the real quadratic field with discriminant D, D = A003658(n). (End)

Examples

			A003658(3) = 8, (8/3) = -1 and (8/2) = 0, so a(3) = 3.
		

Crossrefs

Programs

  • Mathematica
    nMax = 200; A003658 = Select[Range[4nMax], NumberFieldDiscriminant[Sqrt[#]] == #&]; f[d_] := For[k = 1, True, k++, If[FreeQ[{0, 1}, KroneckerSymbol[d, k]], Return[k]]]; a[n_] := f[A003658[[n]]]; Table[a[n], {n, 2, nMax}] (* Jean-François Alcover, Nov 05 2016 *)
  • PARI
    lp(D)=forprime(p=2,,if(kronecker(D,p)<0,return(p)))
    for(n=5,1e3,if(isfundamental(n),print1(lp(n)", "))) \\ Charles R Greathouse IV, Apr 23 2014

Formula

With D = A003658(n): Mollin conjectured, and Granville, Mollin, & Williams proved, that for n > 1128, a(n) <= D^0.5 / 2. Treviño proves that for n > 484, a(n) <= D^0.45. Asymptotically the best known upper bound for the exponent is less than 0.16 when D is prime and 1/4 + epsilon (for any epsilon > 0) for general D. - Charles R Greathouse IV, Apr 23 2014 (corrected by Enrique Treviño, Mar 18 2022)
a(n) = A092419(A003658(n) - floor(sqrt(A003658(n)))), n >= 2. - Jianing Song, Jan 30 2019

Extensions

Name simplified by Jianing Song, Jan 30 2019

A098990 Decimal expansion of Sum_{n>=1} prime(n)/(2^n).

Original entry on oeis.org

3, 6, 7, 4, 6, 4, 3, 9, 6, 6, 0, 1, 1, 3, 2, 8, 7, 7, 8, 9, 9, 5, 6, 7, 6, 3, 0, 9, 0, 8, 4, 0, 2, 9, 4, 1, 1, 6, 7, 7, 7, 9, 7, 5, 8, 8, 7, 7, 9, 4, 3, 7, 3, 2, 8, 3, 1, 2, 2, 0, 5, 2, 2, 0, 1, 7, 6, 3, 7, 9, 8, 6, 7, 0, 4, 4, 8, 2, 8, 3, 6, 0, 4, 1, 7, 4, 5, 4, 7, 6, 4, 5, 7, 8, 8, 0, 1, 9, 0, 1, 1, 3, 7, 5, 2
Offset: 1

Views

Author

Joseph Biberstine (jrbibers(AT)indiana.edu), Nov 07 2004

Keywords

Comments

Relates the growth of the n-th prime function A000040(n) to the base-2 exponential of n.

Examples

			3.6746439660113287789956763090840294116777975887794373283122052201763...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 2.2.1, p. 96.

Crossrefs

Programs

  • Maple
    f:=N->sum(ithprime(n)/2^n,n=1..N); evalf[106](f(500)); evalf[106](f(1000));
  • Mathematica
    RealDigits[Sum[Prime[i]/2^i,{i,1000}],10,120][[1]] (* Harvey P. Dale, Apr 10 2012 *)
  • PARI
    suminf(k=1, prime(k)/2^k) \\ Michel Marcus, Jan 13 2016

Formula

Equals Sum_{n>=1} prime(n)/2^n.
Equals 2 plus the constant in A098882. - R. J. Mathar, Sep 02 2008
Equals lim_{n->oo} (1/n) * Sum_{k=1..n} A053760(k). - Amiram Eldar, Oct 29 2020

A232932 The least positive integer k such that Kronecker(D/k) = -1 where D runs through all negative fundamental discriminants (-A003657).

Original entry on oeis.org

2, 3, 3, 5, 2, 7, 2, 11, 5, 13, 3, 2, 7, 3, 2, 5, 2, 3, 3, 11, 2, 2, 5, 7, 3, 2, 13, 5, 3, 2, 7, 3, 11, 2, 11, 2, 7, 11, 7, 2, 3, 2, 5, 3, 2, 5, 3, 3, 5, 2, 11, 2, 13, 5, 5, 2, 5, 3, 2, 7, 2, 3, 2, 2, 5, 13, 2, 3, 2, 5, 17, 3, 2, 7, 3, 3, 5, 2, 13, 2, 7, 5, 19, 2, 3, 11, 3, 2, 5, 2, 3, 3, 7, 2, 5, 2, 5, 11, 5, 3, 2, 5, 3, 2, 11, 2, 3, 7, 2, 2, 11, 7, 3, 2, 5, 3, 2, 5, 3, 3, 2, 11, 2, 19, 5, 5, 2, 3, 2, 17, 3, 2, 7, 2, 3, 3, 13, 2, 5, 2, 5, 11, 7, 3, 2, 7, 3, 13, 2, 3, 5, 2, 2
Offset: 1

Views

Author

Steven Finch, Dec 02 2013

Keywords

Comments

From Jianing Song, Feb 14 2019: (Start)
a(n) is necessarily prime. Otherwise, if a(n) is not prime, we have (D/p) = 0 or 1 for all prime divisors p of a(n), so (D/a(n)) must be 0 or 1 too, a contradiction.
a(n) is the least inert prime in the imaginary quadratic field with discriminant D, D = -A003657(n). (End)

Examples

			A003657(4) = 8, (-8/5) = -1, (-8/3) = 1 and (-8/2) = 0, so a(4) = 5.
		

Crossrefs

Programs

  • Mathematica
    nMax = 200; FundamentalDiscriminantQ[n_] := n != 1 && (Mod[n, 4] == 1 || ! Unequal[Mod[n, 16], 8, 12]) && SquareFreeQ[n/2^IntegerExponent[n, 2]]; discrims = Select[-Range[4 nMax], FundamentalDiscriminantQ]; f[d_] := For[k = 1, True, k++, If[FreeQ[{0, 1}, KroneckerSymbol[d, k]], Return[k] ] ]; a[n_] := f[discrims[[n]]]; Table[a[n], {n, 1, nMax}] (* Jean-François Alcover, Nov 05 2016, after Robert G. Wilson v *)

Formula

a(n) = A306220(A003657(n)). - Jianing Song, Feb 14 2019

Extensions

Name simplified by Jianing Song, Feb 14 2019

A232929 For each complex nonprincipal Dirichlet character chi modulo n, let f(chi) be the least positive integer k for which chi(k) is not in the set {0,1}. Then a(n) is the sum of f(chi) over all such chi.

Original entry on oeis.org

2, 3, 6, 5, 11, 11, 10, 9, 18, 17, 22, 15, 19, 23, 31, 25, 34, 29, 25, 31, 45, 47, 38, 39, 34, 35, 54, 53, 63, 47, 41, 45, 47, 57, 70, 51, 51, 61, 79, 61, 84, 61, 51, 65, 93, 87, 83, 57, 71, 75, 102, 85, 79, 81, 73, 81, 114, 119, 118, 87, 85, 95, 97, 97, 130, 95, 89, 85, 143, 127, 151, 107, 83, 109, 119, 125, 155, 125, 106, 125, 162, 135, 133, 123, 113, 125, 181, 165, 147, 131, 139, 137, 147, 167, 193, 123, 121, 125, 198, 157, 203, 161, 123, 153, 210, 177, 216, 121, 151, 153, 225, 183, 179, 169, 159, 179, 201, 255
Offset: 3

Views

Author

Steven Finch, Dec 02 2013

Keywords

Examples

			a(6) = 5 since there is one nonprincipal Dirichlet character mod 6, namely A134667, whose fifth term is -1.
		

Crossrefs

Cf. A000010.

A232930 For each complex primitive Dirichlet character chi modulo n, let f(chi) be the least positive integer k for which chi(k) is not in the set {0,1}. Then a(n) is the sum of f(chi) over all such chi.

Original entry on oeis.org

2, 3, 6, 0, 11, 8, 8, 0, 18, 5, 22, 0, 11, 12, 31, 0, 34, 17, 10, 0, 45, 20, 32, 0, 24, 17, 54, 0, 63, 24, 21, 0, 30, 20, 70, 0, 27, 22, 79, 0, 84, 27, 24, 0, 93, 20, 72, 0, 36, 33, 102, 0, 55, 38, 37, 0, 114, 27, 118, 0, 52, 48, 69, 0, 130, 47, 42, 0, 143, 40, 151, 0, 32, 55, 90, 0, 155, 52, 72, 0, 162, 33, 96, 0, 57, 56, 181, 0, 114, 63, 58, 0, 107, 40, 193, 0, 72, 48, 198, 0, 203, 78, 39, 0, 210, 60, 216, 0, 79, 60, 225, 0, 126, 85, 100, 0, 159, 46
Offset: 3

Views

Author

Steven Finch, Dec 02 2013

Keywords

Examples

			a(6)=0 since there are no primitive Dirichlet characters mod 6.
		

Crossrefs

Cf. A007431.

A232928 a(n) is the smallest q such that the primes<=q generate the multiplicative group modulo n.

Original entry on oeis.org

2, 3, 2, 5, 3, 5, 2, 3, 2, 7, 2, 3, 7, 5, 3, 5, 2, 11, 5, 7, 5, 13, 2, 5, 2, 5, 2, 11, 3, 5, 5, 3, 3, 7, 2, 3, 7, 11, 3, 11, 3, 7, 7, 5, 5, 13, 3, 3, 5, 5, 2, 5, 3, 11, 5, 3, 2, 13, 2, 3, 5, 5, 3, 7, 2, 5, 5, 19, 7, 13, 5, 5, 7, 7, 3, 7, 3, 11, 2, 5, 2, 13, 3, 3, 5, 7, 3, 11, 3, 5, 11, 5, 7, 13, 5, 3, 5, 11, 2, 7, 3, 11, 13, 3, 2, 7, 3, 7, 11, 11, 3, 13, 7, 7, 7, 11, 11, 17
Offset: 3

Views

Author

Steven Finch, Dec 02 2013

Keywords

A249272 Decimal expansion of a constant associated with fundamental discriminants and Dirichlet characters.

Original entry on oeis.org

4, 9, 8, 0, 9, 4, 7, 3, 3, 9, 6, 1, 4, 9, 3, 4, 1, 5, 0, 7, 9, 1, 3, 2, 5, 3, 2, 5, 8, 8, 0, 7, 7, 5, 2, 8, 1, 2, 3, 7, 7, 3, 2, 6, 9, 6, 5, 8, 5, 2, 0, 4, 7, 9, 5, 4, 6, 2, 3, 3, 1, 2, 7, 1, 8, 6, 7, 3, 3, 2, 6, 3, 8, 1, 9, 6, 8, 0, 0, 3, 8, 1, 5, 2, 0, 9, 0, 4, 7, 7, 4, 9, 0, 0, 6, 1, 7, 6, 1, 6, 2, 1, 2
Offset: 1

Views

Author

Jean-François Alcover, Oct 24 2014

Keywords

Examples

			4.9809473396149341507913253258807752812377326965852...
		

Crossrefs

Programs

  • Mathematica
    digits = 103; Clear[s, P]; P[j_] := P[j] = Product[(Prime[k] + 2)/(2*(Prime[k] + 1)), {k, 1, j - 1}] // N[#, digits + 100]&; s[m_] := s[m] = Sum[Prime[j]^2/(2*(Prime[j] + 1))*P[j], {j, 1, m}]; s[10]; s[m = 20]; While[RealDigits[s[m]] != RealDigits[s[m/2]], Print[m, " ", N[s[m]]]; m = 2*m]; RealDigits[s[m], 10, digits] // First
  • PARI
    suminf(k=1, prime(k)^2/(2*(prime(k)+1))*prod(i=1, k-1, (prime(i)+2)/(2*(prime(i)+1)))); \\ Michel Marcus, Apr 15 2017

Formula

sum_{q} q^2/(2(q+1)) prod_{p

A249273 Decimal expansion of a constant associated with the set of all complex nonprincipal Dirichlet characters.

Original entry on oeis.org

2, 5, 3, 5, 0, 5, 4, 1, 8, 0, 3, 6, 0, 4, 3, 8, 8, 3, 0, 1, 6, 5, 5, 3, 0, 0, 0, 7, 1, 8, 5, 9, 0, 8, 3, 5, 0, 8, 6, 1, 1, 7, 8, 0, 1, 3, 8, 5, 3, 7, 0, 1, 6, 4, 5, 3, 7, 7, 5, 1, 2, 6, 4, 9, 4, 3, 6, 4, 1, 4, 7, 5, 3, 8, 2, 9, 6, 7, 8, 5, 4, 7, 0, 1, 7, 0, 3, 3, 6, 6, 5, 1, 7, 9, 1, 0, 9, 0, 3, 4, 2, 4, 5
Offset: 1

Author

Jean-François Alcover, Oct 24 2014

Keywords

Examples

			2.5350541803604388301655300071859083508611780138537...
		

Crossrefs

Programs

  • Mathematica
    digits = 103; Clear[s]; s[m_] := s[m] = Sum[Prime[k]^2/Product[Prime[j] + 1, {j, 1, k}] , {k, 1, m}] // N[#, digits + 100]&; s[10]; s[m = 20]; While[RealDigits[s[m]] != RealDigits[s[m/2]], Print[m, " ", N[s[m]]]; m = 2*m]; RealDigits[s[m], 10, digits] // First

Formula

sum_{k >= 1} p_k^2/((p_1 + 1)(p_2 + 1)...(p_k + 1)), where p_k is the k-th prime number.

A249274 Decimal expansion of a constant associated with the set of all complex primitive Dirichlet characters.

Original entry on oeis.org

2, 1, 5, 1, 4, 3, 5, 1, 0, 5, 6, 8, 6, 1, 4, 6, 5, 4, 8, 6, 2, 4, 2, 8, 1, 0, 0, 5, 0, 9, 6, 5, 8, 4, 0, 5, 3, 2, 6, 3, 3, 0, 4, 5, 7, 1, 8, 5, 8, 4, 5, 7, 8, 9, 5, 8, 8, 9, 7, 3, 3, 3, 9, 1, 0, 7, 8, 1, 8, 4, 2, 8, 7, 3, 2, 5, 7, 4, 6, 4, 5, 2, 0, 7, 1, 8, 4, 6, 3, 0, 4, 2, 4, 4, 6, 9, 1, 7, 9, 3, 2
Offset: 1

Author

Jean-François Alcover, Oct 24 2014

Keywords

Examples

			2.1514351056861465486242810050965840532633...
		

Crossrefs

Programs

  • Mathematica
    digits = 101; Clear[s, P]; P[j_] := P[j] = Product[(Prime[k]^2 - Prime[k] - 1)/((Prime[k] + 1)^2*(Prime[k] - 1)), {k, 1, j - 1}] // N[#, digits + 100]&; s[m_] := s[m] = Sum[Prime[j]^4/((Prime[j] + 1)^2*(Prime[j] - 1))*P[j], {j, 1, m}]; s[10]; s[m = 20]; While[ RealDigits[s[m]] != RealDigits[s[m/2]], Print[m, " ", N[s[m]]]; m = 2*m]; RealDigits[s[m], 10, digits] // First

Formula

sum_{q} q^4/((q+1)^2 (q-1)) prod_{p
Showing 1-10 of 10 results.