A218578 The number of times n occurs in A095972.
2, 1, 3, 1, 1, 3, 2, 0, 2, 2, 2, 1, 2, 1, 3, 1, 2, 0, 4, 0, 2, 2, 1, 2, 0, 2, 2, 1, 3, 1, 2, 1, 2, 3, 0, 1, 2, 2, 1, 1, 2, 1, 2, 0, 3, 1, 2, 1, 2, 0, 4, 1, 2, 3, 2, 0, 2, 1, 2, 0, 2, 1, 0, 2, 0, 3, 3, 0, 4, 1, 2, 0, 2, 1, 3, 2, 0, 0, 3, 1, 0, 3, 2, 3, 0, 1, 3
Offset: 0
Keywords
Examples
a(0) is 2, because 0 occurs only twice in A095972. a(1) is 1, because 1 occurs only once in A095972.
Links
- T. D. Noe, Table of n, a(n) for n = 0..10000
Programs
-
Maple
A218578 := proc(n) local f; f := 0 ; for q from 1 to 2*n+2 do if A095972(q) = n then f := f+1 ; end if; end do: f ; end proc: # R. J. Mathar, Nov 05 2012
-
Mathematica
nn = 100; t = Table[Length[Complement[Range[n-1], Union[Mod[Range[n]^2, n]]]], {n, 2*nn + 2}]; Table[Count[t, n], {n, 0, nn}] (* T. D. Noe, Nov 06 2012 *)
-
Python
from math import prod from sympy import factorint def A218578(n): return sum(1 for i in range(1,2*n+3) if n==i-prod((p**(e+1)//((p+1)*(q:=1+(p==2)))>>1)+q for p, e in factorint(i).items())) # Chai Wah Wu, Oct 07 2024
Comments