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

A028260 Numbers with an even number of prime divisors (counted with multiplicity); numbers k such that the Liouville function lambda(k) (A008836) is positive.

Original entry on oeis.org

1, 4, 6, 9, 10, 14, 15, 16, 21, 22, 24, 25, 26, 33, 34, 35, 36, 38, 39, 40, 46, 49, 51, 54, 55, 56, 57, 58, 60, 62, 64, 65, 69, 74, 77, 81, 82, 84, 85, 86, 87, 88, 90, 91, 93, 94, 95, 96, 100, 104, 106, 111, 115, 118, 119, 121, 122, 123, 126, 129, 132, 133, 134
Offset: 1

Views

Author

Dan Asimov (dan(AT)research.att.com)

Keywords

Comments

If k appears, p*k does not (p primes). - Philippe Deléham, Jun 10 2006
The product of any two terms of this sequence, or any two terms of the complement of this sequence (A026424), is a term of this sequence. The product of a term of this sequence and a term of A026424 is a term of A026424. The primitive terms of this sequence are the semiprimes (A001358). - Franklin T. Adams-Watters, Nov 27 2006
A072978 is a subsequence. - Reinhard Zumkeller, Sep 20 2008
Quadratic residues of A191089(n) as n -> oo. - Travis Scott, Jan 14 2023

Crossrefs

Cf. A001222, A001358, A008836, A026424 (complement), A145784, A065043 (char. func).

Programs

  • Haskell
    a028260 n = a028260_list !! (n-1)
    a028260_list = filter (even . a001222) [1..]
    -- Reinhard Zumkeller, Oct 05 2011
    
  • Maple
    with(numtheory); A028260 := proc(n) option remember: local k: if(n=1)then return 1: fi: for k from procname(n-1)+1 do if(bigomega(k) mod 2=0)then return k: fi: od: end: seq(A028260(n),n=1..63); # Nathaniel Johnston, May 27 2011
  • Mathematica
    Select[Range[200],EvenQ[PrimeOmega[#]]&] (* Harvey P. Dale, Aug 14 2011 *)
    Select[Range@ 134, LiouvilleLambda@# > 0 &] (* Robert G. Wilson v, Jul 06 2012 *)
  • PARI
    is(n)=bigomega(n)%2==0 \\ Charles R Greathouse IV, May 29 2013
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, primepi, integer_nthroot
    def A028260(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-1-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,m)) for m in range(2,x.bit_length()+1,2)))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Apr 10 2025

Formula

A066829(a(n)) = 0. - Reinhard Zumkeller, Jun 26 2009
A001222(a(n)) mod 2 = 0. - Reinhard Zumkeller, Oct 05 2011
Sum_{n>=1} 1/a(n)^s = (zeta(s)^2 + zeta(2*s))/(2*zeta(s)). - Enrique Pérez Herrero, Jul 06 2012

A191088 Least number k such that the first n primes have Kronecker symbol (p|k) = -1.

Original entry on oeis.org

3, 5, 43, 43, 67, 67, 163, 163, 163, 163, 163, 163, 74093, 77683, 214037, 214037, 214037, 2004917, 36254563, 51599563, 96295483, 96295483, 114148483, 163520117, 163520117, 261153653, 261153653, 585811843
Offset: 1

Views

Author

T. D. Noe, May 25 2011

Keywords

Comments

This implies, but is not equivalent to, that the first n primes are quadratic non-residues mod k. [Corrected by M. F. Hasler, Jan 18 2016]
The first 13 terms are prime. Sequence A191089 is similar, but forces k to be prime.
In case k is restricted to be a prime, the condition (p|k) = -1 becomes equivalent to saying that p is a quadratic non-residue (mod k). - M. F. Hasler, Jan 18 2016

Examples

			a(1) = 3 is the least number k such that prime(1) = 2 is not a square mod k (since for k=1 and k=2, p=2 would be zero, thus a square, mod k).
a(2) = 4 is the least number k such that prime(1) = 2 and prime(2) = 3 are not squares mod k (the only squares mod 4 are 0 = 0^1 = 2^2 and 1 = 1^2 = 3^3 (mod 4); while for k=2, p=2 would be zero, thus a square, and for k=3 this would be the case for p=3).
		

Crossrefs

Cf. A191089.

Programs

  • Mathematica
    Table[k = 2; While[Length[Select[Prime[Range[n]], JacobiSymbol[#, k] == -1 &]] < n, k++]; k, {n, 15}]
  • PARI
    q=2;for(k=3,1e9,forprime(p=2,q,if(kronecker(p,k)>=0,next(2)));print1(k", ");q=nextprime(q+1);k--) \\ Charles R Greathouse IV, Oct 10 2011

Extensions

a(16)-a(28) from Charles R Greathouse IV, Oct 10 2011

A306501 Primes p such that 2, 3, 5, 7, ..., 37 are all quadratic nonresidues modulo p.

Original entry on oeis.org

163, 74093, 92333, 170957, 222643, 225077, 253507, 268637, 292157, 328037, 360293, 517613, 524453, 530837, 613637, 641093, 679733, 781997, 847997, 852893, 979373, 991027, 1096493, 1110413, 1333963, 1398053, 1730357, 1821893, 2004917, 2055307, 2056147, 2079173
Offset: 1

Views

Author

Jianing Song, Feb 19 2019

Keywords

Comments

The prime number 163 is famous for having 2, 3, 5, 7, ..., 37 as quadratic nonresidues, because the smallest prime having 2, 3, 5, 7, ..., 41 as quadratic nonresidues, namely 74093, is 453.5 times larger. This is related to the fact that the quadratic field Q[sqrt(-163)] is a unique factorization domain.
If p is in the sequence then so are all primes q with q == p (mod 29682952539240), where 29682952539240 = 2^3*3*5*7*11*13*17*19*23*29*31*37. In particular, the sequence is infinite. - Robert Israel, Mar 31 2019

Crossrefs

Cf. A191089.

Programs

  • Maple
    N:= 3*10^6: # to get all terms <= N
    S:= {seq(8*i+3, i=1..(N-3)/8)} union {seq(8*i+5,i=1..(N-5)/8)}:
    for p in select(isprime, [$3..37]) do
      R:= select(t -> numtheory:-legendre(t,p) = 1, {$1..p-1});
      if p mod 4 = 1 then S:= remove(t -> member(t mod p, R), S)
      else S:= select(t -> member(t mod p, R) = evalb(t mod 4 = 3), S)
      fi;
    od:
    sort(convert(select(isprime,S),list)); # Robert Israel, Mar 31 2019
  • PARI
    forprime(p=2, 1e6, if(sum(k=1, 37, isprime(k)*kronecker(k, p))==-12, print1(p, ", ")))
Showing 1-3 of 3 results.