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.

A131187 a(n) = the number of positive integers < n that are neither a divisor of n nor a divisor of (n+1).

This page as a plain text file.
%I A131187 #17 Feb 17 2025 12:09:48
%S A131187 0,0,0,1,1,2,3,3,4,6,5,6,9,8,8,11,11,12,13,12,15,18,15,15,20,20,19,22,
%T A131187 21,22,25,24,27,28,24,27,33,32,29,32,33,34,37,34,37,42,37,37,42,42,43,
%U A131187 46,45,44,45,46,51,54,47,48,57,54,52,55,55,58,61,60,59,62,59,60,69,66
%N A131187 a(n) = the number of positive integers < n that are neither a divisor of n nor a divisor of (n+1).
%H A131187 Robert Israel, <a href="/A131187/b131187.txt">Table of n, a(n) for n = 1..10000</a>
%F A131187 a(n) = n + 2 - d(n) - d(n+1), where d(n) is the number of positive divisors of n.
%e A131187 The divisors of 9 are 1,3,9. The divisors of 9+1=10 are 1,2,5,10. The 4 positive integers which are < 9 and are neither divisors of 9 nor of 10 are 4,6,7,8. So a(9) = 4.
%p A131187 A131187 := proc(n) local divs ; divs := ( numtheory[divisors](n) union numtheory[divisors](n+1) ) minus {n,n+1} ; n-1-nops(divs) ; end: seq(A131187(n),n=1..80) ; # _R. J. Mathar_, Oct 28 2007
%t A131187 Table[d=Divisors[n];dn=Divisors[n+1];Length[Complement[Range[n],Union[d,dn]]],{n,74}] (* _James C. McMahon_, Feb 17 2025 *)
%o A131187 (PARI) a(n) = n + 2 - numdiv(n) - numdiv(n+1); \\ _Michel Marcus_, Feb 17 2025
%Y A131187 Cf. A000005, A049820.
%K A131187 nonn
%O A131187 1,6
%A A131187 _Leroy Quet_, Sep 25 2007
%E A131187 More terms from _R. J. Mathar_, Oct 28 2007