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

A048656 a(n) is the number of unitary (and also of squarefree) divisors of n!.

Original entry on oeis.org

1, 2, 4, 4, 8, 8, 16, 16, 16, 16, 32, 32, 64, 64, 64, 64, 128, 128, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 1024, 1024, 2048, 2048, 2048, 2048, 2048, 2048, 4096, 4096, 4096, 4096, 8192, 8192, 16384, 16384, 16384, 16384, 32768, 32768, 32768, 32768
Offset: 1

Views

Author

Keywords

Comments

Let K(n) be the field that is generated over the rationals Q by adjoining the square roots of the numbers 1,2,3,...,n, i.e., K(n) = Q(sqrt(1),sqrt(2),...,sqrt(n)); a(n) is the degree of this field over Q. - Avi Peretz (njk(AT)netvision.net.il), Mar 20 2001
For n>1, a(n) is the number of ways n! can be expressed as the product of two coprime integers p and q such that 0 < p/q < 1, if negative integers are considered as well. This is the answer to the 2nd problem of the International Mathematical Olympiad 2001. Example, for n = 3, the a(3) = 4 products are 3! = (-2)*(-3) = (-1)*(-6) = 1*6 = 2*3. - Bernard Schott, Jan 21 2021
a(n) = number of subsets S of {1,2,...,n} such that every number in S is a prime. - Clark Kimberling, Sep 17 2022

Examples

			For n = 7, n! = 5040 = 16*9*5*7 with 4 distinct prime factors, so a(7) = A034444(7!) = 16.
The subsets S of {1, 2, 3, 4} such that every number in S is a prime are these: {}, {2}, {3}, {2, 3}; thus, a(4) = 4. - _Clark Kimberling_, Sep 17 2022
		

Crossrefs

Programs

Formula

A001221(n!) = A000720(n) so a(n) = A034444(n!) = 2^A000720(n).
Sum_{n>=1} 1/a(n) = A098882 + 1 = A098990 - 1. - Amiram Eldar, Mar 13 2025

A053760 Smallest positive quadratic nonresidue modulo p, where p is the n-th prime.

Original entry on oeis.org

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

Views

Author

Steven Finch, Apr 05 2000

Keywords

Comments

Assuming the Generalized Riemann Hypothesis, Montgomery proved a(n) << (log p(n))^2, meaning that there is a constant c such that |a(n)| <= c*(log p(n))^2. - Jonathan Vos Post, Jan 06 2007
a(n) < 1 + sqrt(p), where p is the n-th prime (Theorem 3.9 in Niven, Zuckerman, and Montgomery). - Jonathan Sondow, May 13 2010
Treviño proves that a(n) < 1.1 p^(1/4) log p for n > 2 where p is the n-th prime. - Charles R Greathouse IV, Dec 06 2012
a(n) is always a prime, because if x*y is a nonresidue, then x or y must also be a nonresidue. - Jonathan Sondow, May 02 2013
a(n) is the smallest prime q such that the congruence x^2 == q (mod p) has no solution 0 < x < p, where p = prime(n). For n > 1, a(n) is the smallest base b such that b^((p-1)/2) == -1 (mod p), where odd p = prime(n). - Thomas Ordowski, Apr 24 2019

Examples

			The 5th prime is 11, and the positive quadratic residues mod 11 are 1^2 = 1, 2^2 = 4, 3^2 = 9, 4^2 = 5 and 5^2 = 3. Since 2 is missing, a(5) = 2.
The only positive quadratic redidue mod 2 is 1, so a(1)=2.
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 94-98.
  • Hugh L. Montgomery, Topics in Multiplicative Number Theory, 3rd ed., Lecture Notes in Mathematics, Vol. 227 (1971), MR 49:2616.
  • Ivan Niven, Herbert S. Zuckerman, and Hugh L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY 1991, p. 147.
  • Paulo Ribenboim, The New Book of Prime Number Records, 3rd ed., Springer-Verlag 1996; Math. Rev. 96k:11112.

Crossrefs

Programs

  • Mathematica
    Table[ p = Prime[n]; First[ Select[ Range[p], JacobiSymbol[#, p] != 1 &]], {n, 1, 100}] (* Jonathan Sondow, Mar 03 2013 *)
  • PARI
    residue(n,m)={local(r);r=0;for(i=0,floor(m/2),if(i^2%m==n,r=1));r}
    A053760(n)={local(r,m);r=0;m=0;while(r==0,m=m+1;if(!residue(m,prime(n)),r=1));m} \\ Michael B. Porter, May 02 2010
    
  • PARI
    qnr(p)=my(m);while(1,if(!issquare(Mod(m++,p)),return(m)))
    a(n)=if(n>1,qnr(prime(n)),2) \\ Charles R Greathouse IV, Feb 27 2013

Formula

a(n) = A020649(prime(n)) for n > 1. - Thomas Ordowski, Apr 24 2019
Asymptotic mean: lim_{n->oo} (1/n) * Sum_{k=1..n} a(k) = A098990 (Erdős, 1961). - Amiram Eldar, Oct 29 2020

Extensions

More terms from James Sellers, Apr 08 2000

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

A232927 a(n) is the smallest k such that the first k primes generate the multiplicative group modulo n.

Original entry on oeis.org

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

Views

Author

Steven Finch, Dec 02 2013

Keywords

Crossrefs

A098882 Decimal expansion of the Sum_{n>0} (A000040(n+1)-A000040(n))/(2^n), where A000040(k) gives the k-th prime number.

Original entry on oeis.org

1, 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 03 2004

Keywords

Examples

			1.6746439660113287789956763090840294116777975887794373283122052201763...
		

Crossrefs

Programs

  • Maple
    g:=N->sum((ithprime(n+1)-ithprime(n))/2^n,n=1..N); evalf[106](g(5000)); evalf[106](g(10000));
  • PARI
    suminf(k=1, (prime(k+1)-prime(k))/2^k) \\ Michel Marcus, Jan 13 2016

Formula

Equals A098990 - 2. - Amiram Eldar, Nov 17 2020

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

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Jul 08 2021

Keywords

Comments

This constant is irrational (Hančl and Tijdeman, 2004).

Crossrefs

Programs

  • Mathematica
    RealDigits[Sum[Prime[n]/2^Prime[n], {n, 1, 100}], 10, 100][[1]]
  • PARI
    suminf(k=1, prime(k)/2^prime(k)) \\ Michel Marcus, Jul 09 2021

Formula

1.09306425770250716540258595269676368295547596540121...

A162541 Primes p such that a splitting of the cyclic group Zp by the perfect 3-shift code {+-1,+-2,+-3} exists.

Original entry on oeis.org

7, 37, 139, 163, 181, 241, 313, 337, 349, 379, 409, 421, 541, 571, 607, 631, 751, 859, 877, 937, 1033, 1087, 1123, 1171, 1291, 1297, 1447, 1453, 1483, 1693, 1741, 1747, 2011, 2161, 2239, 2311, 2371, 2473, 2539, 2647, 2677, 2707, 2719, 2857, 3169, 3361, 3433, 3511, 3547
Offset: 1

Views

Author

Ctibor O. Zizka, Jul 05 2009

Keywords

Comments

This list was computed by S. Saidi.
From Travis Scott, Oct 04 2022: (Start)
These are also the p whose (phi/3)-th power residues have minimal bases at {1,2,3} (see under Example). Such covers {1
a(n)-> {1,2,3}(n) = 7, 37, 139, 163, 181, 241, ... ~ (9*n)*log(n)
{1,2,4}(n) = 13, 19, 61, 67, 73, 79, ... ~ (9*n/2)*log(n)
{1,3,5}(n) = 31, 223, 229, 277, 283, 397, ... ~ (27*n)*log(n)
{1,3,7}(n) = 43, 433, 457, 691, 1069, 1471, ... ~ (81*n/2)*log(n)
{1,3,9}(n) = 109, 127, 157, 601, 733, 739, ... ~ (81*n/4)*log(n)
{1,5,7}(n) = 307, 919, 1093, 2179, 2251, 3181, ... ~ (81*n)*log(n)
Note that the k-th q value takes A054272(k) x values and that a(n) = A040034(n) \ {1,2,4}(n). Following a result of Erdős (cf. A053760, A098990) the asymptotic means for q and x are Sum_{n>=1} prime(n)*2/3^n = 2.69463670741804726229622... and Sum_{n>=1} Sum_{prime(n) < k prime < prime(n)^2 OR k = prime(n)^2} D(prime(n),k)*k = 5.69767191389790422108748...
Subsequence of A040034 (2 is not a cubic residue modulo p) such that 3 is neither a residue nor in the same cubic power class as 2. (End)

Examples

			From _Travis Scott_, Oct 04 2022: (Start)
{1,2,3}^12 (mod 37) == {1,26,10} covers the 12th-power residues on Z/37Z.
{1,2,3}^14 (mod 43) == {1,1,36} misses 6. (End)
		

Crossrefs

Subsequence of A040034.

Programs

  • Mathematica
    Select[Prime@Range@497,Mod[#,3]==1&&DuplicateFreeQ@PowerMod[{1,2,3},(#-1)/3,#]&] (* Travis Scott, Oct 04 2022 *)

Formula

From Travis Scott, Oct 04 2022: (Start)
Primes of quadratic form 7x^2 +- 6xy + 36y^2 [from Saidi].
a(n) ~ 9*n*log(n). (End)

Extensions

Incorrect term deleted and more terms from Travis Scott, Oct 04 2022

A249271 Decimal expansion of the mean value over all positive integers of a function giving the least quadratic nonresidue modulo a given odd integer (this function is precisely defined in A053761).

Original entry on oeis.org

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

Author

Jean-François Alcover, Oct 24 2014

Keywords

Examples

			3.147755148502400312516674955879769209272937748793398864...
		

References

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

Crossrefs

Programs

  • Mathematica
    digits = 104; Clear[s]; s[m_] := s[m] = 1 + Sum[(Prime[j] + 1)*2^(-j + 1)* Product[1 - 1/Prime[i], {i, 1, j - 1}] // N[#, digits + 100]&, {j, 2, m}] ; s[10]; s[m = 20]; While[RealDigits[s[m]] != RealDigits[s[m/2]], Print[m]; m = 2*m]; RealDigits[s[m], 10, digits] // First
  • PARI
    do(lim)=my(p=2,pr=1.,s=1); forprime(q=3,lim, pr*=(1-1/p)/2; s+=(q+1)*pr; p=q); s \\ Charles R Greathouse IV, Dec 20 2017

Formula

1 + sum_{j=2..m} (p_j + 1)*2^(-j+1)*prod_{i=1..j-1} (1 - 1/p_i), where p_j is the j-th prime number.

A369508 Decimal expansion of Sum_{n>=1} prime(n)*(-1/2)^n (negated).

Original entry on oeis.org

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

Author

Pierluigi Failla, Jan 25 2024

Keywords

Examples

			0.662729784185267965388337694463998...
		

Crossrefs

Cf. A098990.

Programs

  • Mathematica
    First[RealDigits[Sum[Prime[n](-2)^-n,{n,1000}],10,85]] (* James C. McMahon, Jan 29 2024 *)
  • PARI
    suminf(k=1, prime(k)/(-2)^k) \\ Michel Marcus, Jan 25 2024
  • Python
    from sympy import prime
    from decimal import Decimal, getcontext
    getcontext().prec = 100
    def f(k):
        if k == 1:
            return prime(k) * Decimal(-0.5)
        return f(k-1) + prime(k) * Decimal(-0.5) ** k
    
Showing 1-9 of 9 results.