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.

A370495 Oblong numbers of the form (k-1)*k where k is the product of an even number of distinct primes.

This page as a plain text file.
%I A370495 #10 Jan 28 2025 12:50:06
%S A370495 0,30,90,182,210,420,462,650,1056,1122,1190,1406,1482,2070,2550,2970,
%T A370495 3192,3306,3782,4160,4692,5402,5852,6642,7140,7310,7482,8190,8556,
%U A370495 8742,8930,11130,12210,13110,13806,14042,14762,15006,16512,17556,17822,19740,20022,20306
%N A370495 Oblong numbers of the form (k-1)*k where k is the product of an even number of distinct primes.
%H A370495 Amiram Eldar, <a href="/A370495/b370495.txt">Table of n, a(n) for n = 1..10000</a>
%F A370495 a(n) = A002378(A030229(n)-1).
%F A370495 Sum_{n>=2} 1/a(n) = (A368250 - A033150 + 1)/2 = 0.071711363929... .
%t A370495 Table[n*(n - 1), {n, Select[Range[150], MoebiusMu[#] == 1 &]}]
%o A370495 (PARI) lista(kmax) = forsquarefree(k=1, kmax, if(moebius(k) == 1, print1(k[1]*(k[1]-1), ", ")));
%o A370495 (Python)
%o A370495 from math import isqrt, prod
%o A370495 from sympy import primerange, integer_nthroot, primepi
%o A370495 def A370495(n):
%o A370495     def bisection(f,kmin=0,kmax=1):
%o A370495         while f(kmax) > kmax: kmax <<= 1
%o A370495         kmin = kmax >> 1
%o A370495         while kmax-kmin > 1:
%o A370495             kmid = kmax+kmin>>1
%o A370495             if f(kmid) <= kmid:
%o A370495                 kmax = kmid
%o A370495             else:
%o A370495                 kmin = kmid
%o A370495         return kmax
%o A370495     def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
%o A370495     def f(x): return int(n-1+x-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,i)) for i in range(2,x.bit_length(),2)))
%o A370495     return (k:=bisection(f,n,n))*(k-1) # _Chai Wah Wu_, Jan 28 2025
%Y A370495 Complement of A370494 within A368249.
%Y A370495 Cf. A002378, A030059, A033150, A368250.
%K A370495 nonn,easy
%O A370495 1,2
%A A370495 _Amiram Eldar_, Feb 20 2024