A386881 a(n) is the number of occurrences of n in A386838.
1, 2, 2, 4, 2, 5, 2, 7, 4, 7, 3, 11, 4, 7, 6, 13, 3, 14, 5, 13, 7, 11, 3, 24, 7, 11, 8, 20, 4, 21, 8, 20, 10, 15, 7, 33, 7, 14, 12, 29, 4, 30, 8, 22, 15, 19, 7, 45, 10, 22, 14, 30, 8, 34, 12, 36, 16, 24, 7, 49, 12, 21, 20, 42, 10, 42, 12, 34, 13, 36, 10, 69, 15, 23, 23, 36
Offset: 1
Examples
a(5) = 2 since 5 appears twice in A386838.
Programs
-
PARI
a(n) = my(f, A = []); (f(n) = my(g, S, T = []); (g(n) = my(P = []); for(x = 0, sqrtint(n), my(y2 = n - x^2); if(issquare(y2), my(y = sqrtint(y2)); if(x <= y, P = concat(P, [[x, y]])))); return(P)); S = g(n); if(#S == 0, return(0), for(k = 1, #S, T = concat(T, S[k][1] + S[k][2] - gcd(S[k][1], S[k][2]))); return(vecmin(T)))); for(k = 1, 2*n^2, if(f(k) == n, A = concat(A, f(k)))); return(#A)
Comments