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.

A279436 Number of nonprimes less than or equal to n that do not divide n.

This page as a plain text file.
%I A279436 #13 May 24 2017 13:07:53
%S A279436 0,0,0,0,1,1,2,1,3,4,5,3,6,6,7,6,9,7,10,8,11,12,13,9,14,15,15,15,18,
%T A279436 15,19,16,20,21,22,18,24,24,25,22,27,24,28,26,27,30,31,25,32,31,34,33,
%U A279436 36,32,37,34,39,40,41,34,42,42,41,40,45,43,47,45,48,46,50,42,51,51,50,51,54,52,56,50,55,58,59,52,60,61,62,59,64,57,65,64,67,68,69,62,71,69,70,68
%N A279436 Number of nonprimes less than or equal to n that do not divide n.
%H A279436 G. C. Greubel, <a href="/A279436/b279436.txt">Table of n, a(n) for n = 1..5000</a>
%F A279436 G.f.: A(x) = B(x) + C(x) - D(x), where B(x) = Sum_{k>=1} x^(2*k+1)/((1 - x^k)*(1 - x^(k+1))), C(x) = Sum_{k>=1} x^prime(k)/(1 - x^prime(k)), D(x) = Sum_{k>=1} x^prime(k)/(1 - x).
%F A279436 a(n) = n - A000720(n) - A000005(n) + A001221(n).
%F A279436 a(n) = A062298(n) - A033273(n).
%F A279436 a(n) = A049820(n) - A048865(n).
%F A279436 a(n) = A229109(n) - A082514(n).
%F A279436 a(A000040(n)) = A065890(n).
%F A279436 a(A000040(n)) + 1 = A014689(n).
%F A279436 A000040(n) - a(A000040(n)) = n + 1.
%e A279436 a(10) = 4 because 10 has 4 divisors {1,2,5,10} therefore 6 non-divisors {3,4,6,7,8,9} out of which 4 are nonprimes {4,6,8,9}.
%t A279436 Table[n - PrimePi[n] - DivisorSigma[0, n] + PrimeNu[n], {n, 1, 100}]
%o A279436 (PARI) for(n=1,50, print1(n - primepi(n) - numdiv(n) + omega(n), ", ")) \\ _G. C. Greubel_, May 22 2017
%o A279436 (PARI) first(n)=my(v=vector(n),pp); forfactored(k=1,n, if(k[2][,2]==[1]~, pp++); v[k[1]]=k[1] - pp - numdiv(k) + omega(k)); v \\ _Charles R Greathouse IV_, May 23 2017
%o A279436 (Python)
%o A279436 from sympy import primepi, divisor_count, primefactors
%o A279436 def a(n): return 0 if n==1 else n - primepi(n) - divisor_count(n) + len(primefactors(n)) # _Indranil Ghosh_, May 23 2017
%Y A279436 Cf. A000005, A000040, A000720, A001221, A014689, A033273, A048865, A049820, A062298, A065890, A082514, A229109.
%K A279436 nonn
%O A279436 1,7
%A A279436 _Ilya Gutkovskiy_, Dec 12 2016