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.

A233999 Values of n such that numbers of the form x^2+n*y^2 for some integers x, y cannot have prime factor of 7 raised to an odd power.

This page as a plain text file.
%I A233999 #53 Feb 16 2025 08:33:21
%S A233999 1,2,4,8,9,11,15,16,18,22,23,25,29,30,32,36,37,39,43,44,46,49,50,51,
%T A233999 53,57,58,60,64,65,67,71,72,74,78,79,81,85,86,88,92,93,95,98,99,100,
%U A233999 102,106,107,109,113,114,116,120,121,123,127,128,130,134,135,137,141,142,144,148,149
%N A233999 Values of n such that numbers of the form x^2+n*y^2 for some integers x, y cannot have prime factor of 7 raised to an odd power.
%C A233999 Equivalently, numbers of the form 49^n*(7m+1), 49^n*(7m+2), or 49^n*(7m+4). [Corrected by _Charles R Greathouse IV_, Jan 12 2017]
%C A233999 From _Peter Munn_, Feb 08 2024: (Start)
%C A233999 Numbers whose squarefree part is congruent to a (nonzero) quadratic residue modulo 7.
%C A233999 The integers in a subgroup of the positive rationals under multiplication.  As such the sequence is closed under multiplication and - where the result is an integer - under division. The subgroup has index 4 and is generated by the primes congruent to a quadratic residue (1, 2 or 4) modulo 7, the square of 7, and 3 times the other primes; that is a generator corresponding to each prime: 2, 3*3, 3*5, 7^2, 11, 3*13, 3*17, 3*19, 23, 29, 3*31, ... .
%C A233999 (End)
%H A233999 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SquarefreePart.html">Squarefree Part</a>.
%F A233999 a(n) = 16n/7 + O(log n). - _Charles R Greathouse IV_, Jan 12 2017
%o A233999 (PARI) is(n)=n/=49^valuation(n, 49); n%7==1||n%7==2||n%7==4 \\ _Charles R Greathouse IV_ and _V. Raman_, Dec 19 2013
%o A233999 (PARI) is_A233999(n)=bittest(22,n/49^valuation(n, 49)%7) \\ - _M. F. Hasler_, Jan 02 2014
%o A233999 (PARI) list(lim)=my(v=List(),t,u); forstep(k=1,lim\=1,[1,2,4], listput(v,k)); for(e=1,logint(lim,49), u=49^e; for(i=1,#v, t=u*v[i]; if(t>lim, break); listput(v,t))); Set(v) \\ _Charles R Greathouse IV_, Jan 12 2017
%o A233999 (Python)
%o A233999 from sympy import integer_log
%o A233999 def A233999(n):
%o A233999     def bisection(f,kmin=0,kmax=1):
%o A233999         while f(kmax) > kmax: kmax <<= 1
%o A233999         kmin = kmax >> 1
%o A233999         while kmax-kmin > 1:
%o A233999             kmid = kmax+kmin>>1
%o A233999             if f(kmid) <= kmid:
%o A233999                 kmax = kmid
%o A233999             else:
%o A233999                 kmin = kmid
%o A233999         return kmax
%o A233999     def f(x):
%o A233999         c = n+x
%o A233999         for i in range(integer_log(x,49)[0]+1):
%o A233999             m = x//49**i
%o A233999             c -= (m-1)//7+(m-2)//7+(m-4)//7+3
%o A233999         return c
%o A233999     return bisection(f,n,n) # _Chai Wah Wu_, Feb 14 2025
%Y A233999 Cf. A055046, A233998.
%Y A233999 Numbers whose squarefree part is congruent to a coprime quadratic residue modulo k: A003159 (k=2), A055047 (k=3), A277549 (k=4), A352272 (k=6), A234000 (k=8), A334832 (k=24).
%Y A233999 First differs from A047350 by including 49.
%K A233999 nonn,easy
%O A233999 1,2
%A A233999 _V. Raman_, Dec 18 2013