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.
%I A284203 #41 May 15 2025 01:01:14 %S A284203 0,0,1,0,1,1,1,0,1,1,1,1,1,1,2,0,1,1,1,1,2,1,0,1,1,1,1,1,1,2,1,0,2,1, %T A284203 2,1,0,1,2,1,1,2,1,1,2,0,0,1,1,1,2,1,0,1,2,1,2,1,1,2,1,1,2,0,2,2,0,1, %U A284203 1,2,1,1,1,0,2,1,2,2,0,1,1,1,0,2,2,1,2,1,0,2,2,0,2,0,2,1,0,1,2,1,1,2,1,1,3,0,1,1,1,2 %N A284203 Number of twin prime (A001097) divisors of n. %H A284203 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TwinPrimes.html">Twin Primes</a>. %F A284203 G.f.: Sum_{k>=1} x^A001097(k)/(1 - x^A001097(k)). %F A284203 a(A062729(n)) = 0. - _Ilya Gutkovskiy_, Apr 02 2017 %F A284203 From _Amiram Eldar_, Jun 03 2024: (Start) %F A284203 a(A048599(n)) = n. %F A284203 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A065421 - 1/5 = 1.7021605... . (End) %F A284203 Additive with a(p^e) = 1 if p is in A001097, and 0 otherwise. - _Amiram Eldar_, May 15 2025 %F A284203 a(A037074(n)) = 2. - _Michel Marcus_, May 15 2025 %e A284203 -------------------------------------------- %e A284203 | n | divisors of n | twin prime | a(n) | %e A284203 | | | divisors of n | | %e A284203 |------------------------------------------ %e A284203 | 1 | {1} | {-} | 0 | %e A284203 | 2 | {1, 2} | {-} | 0 | %e A284203 | 3 | {1, 3} | {3} | 1 | %e A284203 | 4 | {1, 2, 4} | {-} | 0 | %e A284203 | 5 | {1, 5} | {5} | 1 | %e A284203 | 6 | {1, 2, 3, 6} | {3} | 1 | %e A284203 | 7 | {1, 7} | {7} | 1 | %e A284203 | 8 | {1, 2, 4, 8} | {-} | 0 | %e A284203 | 9 | {1, 3, 9} | {3} | 1 | %e A284203 -------------------------------------------- %t A284203 nmax = 110; Rest[CoefficientList[Series[Sum[Boole[PrimeQ[k] && (PrimeQ[k - 2] || PrimeQ[k + 2])] x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]] %t A284203 Table[Length[Select[Divisors[n], PrimeQ[#] && (PrimeQ[# - 2] || PrimeQ[# + 2]) &]], {n, 110}] %o A284203 (PARI) concat([0, 0],Vec(sum(k=1, 110, (isprime(k) && (isprime(k - 2) || isprime(k + 2)))* x^k/(1 - x^k)) + O(x^111))) \\ _Indranil Ghosh_, Mar 22 2017 %o A284203 (PARI) a(n) = sumdiv(n, d, isprime(d) && (isprime(d-2) || isprime(d+2))); \\ _Amiram Eldar_, Jun 03 2024 %o A284203 (Python) %o A284203 from sympy import isprime, divisors %o A284203 print([len([i for i in divisors(n) if isprime(i) and (isprime(i - 2) or isprime(i + 2))]) for n in range(1, 111)]) # _Indranil Ghosh_, Mar 22 2017 %Y A284203 Cf. A001097, A001221, A005087, A037074, A062729, A065421, A284599. %Y A284203 Cf. A048599 (positions of records). %K A284203 nonn %O A284203 1,15 %A A284203 _Ilya Gutkovskiy_, Mar 22 2017