A264441 Length of row n of the irregular triangle A133995 (positive integers <= n which are neither divisors of n nor coprime to n).
1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 5, 4, 4, 1, 7, 1, 7, 6, 9, 1, 9, 3, 11, 6, 11, 1, 15, 1, 11, 10, 15, 8, 16, 1, 17, 12, 17, 1, 23, 1, 19, 16, 21, 1, 23, 5, 25, 16, 23, 1, 29, 12, 25, 18, 27, 1, 33, 1, 29, 22, 26, 14, 39, 1, 31, 22, 39, 1
Offset: 1
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
Maple
seq(max(1, n - numtheory:-tau(n) - numtheory:-phi(n) + 1), n=1..100); # Robert Israel, Jan 28 2016
-
Mathematica
a[1] = a[4] = 1; a[n_] := If[PrimeQ[n], 1, n + 1 - DivisorSigma[0, n] - EulerPhi[n]]; Array[a, 100] (* Jean-François Alcover, Jan 18 2016 *)
-
PARI
A264441(n) = max(1,n+1-numdiv(n)-eulerphi(n)); \\ Antti Karttunen, Mar 04 2018, after code in A045763.
Formula
a(n) = max(1, A045763(n)). - Robert Israel, Jan 28 2016